test_1924334_neopets_com.py (713B)
1 import pytest 2 3 URL = "https://www.neopets.com/explore.phtml" 4 HERO_CSS = "body > span[style*='left: -1000px;']" 5 6 7 async def is_screen_too_wide(client): 8 await client.navigate(URL, wait="none") 9 assert client.await_css(HERO_CSS) 10 return client.execute_script( 11 """ 12 return document.documentElement.scrollWidth > window.innerWidth; 13 """ 14 ) 15 16 17 @pytest.mark.only_platforms("android") 18 @pytest.mark.asyncio 19 @pytest.mark.with_interventions 20 async def test_enabled(client): 21 assert not await is_screen_too_wide(client) 22 23 24 @pytest.mark.only_platforms("android") 25 @pytest.mark.asyncio 26 @pytest.mark.without_interventions 27 async def test_disabled(client): 28 assert await is_screen_too_wide(client)