test_1899945_nytimes_com.py (685B)
1 import pytest 2 3 URL = "https://www.nytimes.com/interactive/projects/modern-love/36-questions/?ref=redirector" 4 5 START_BUTTON_CSS = "#intro .button.full-width" 6 UNSUPPORTED_TEXT = "Android Chrome" 7 8 9 @pytest.mark.only_platforms("android") 10 @pytest.mark.asyncio 11 @pytest.mark.with_interventions 12 async def test_enabled(client): 13 await client.navigate(URL) 14 client.await_css(START_BUTTON_CSS) 15 assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True) 16 17 18 @pytest.mark.only_platforms("android") 19 @pytest.mark.asyncio 20 @pytest.mark.without_interventions 21 async def test_disabled(client): 22 await client.navigate(URL) 23 assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)