test_1779908_play_google_com.py (920B)
1 import pytest 2 3 URL = "https://play.google.com/store/games" 4 TOP_BAR_CSS = ".aoJE7e" 5 6 7 async def top_bar_has_extra_scrollbar(client): 8 await client.navigate(URL) 9 top_bar = client.await_css(TOP_BAR_CSS) 10 return client.execute_script( 11 """ 12 const top_bar = arguments[0]; 13 const top_bar_item = top_bar.firstElementChild; 14 return top_bar.getBoundingClientRect().height > top_bar_item.getBoundingClientRect().height; 15 """, 16 top_bar, 17 ) 18 19 20 @pytest.mark.skip_platforms("android") 21 @pytest.mark.need_visible_scrollbars 22 @pytest.mark.asyncio 23 @pytest.mark.with_interventions 24 async def test_enabled(client): 25 assert not await top_bar_has_extra_scrollbar(client) 26 27 28 @pytest.mark.skip_platforms("android") 29 @pytest.mark.need_visible_scrollbars 30 @pytest.mark.asyncio 31 @pytest.mark.without_interventions 32 async def test_disabled(client): 33 assert await top_bar_has_extra_scrollbar(client)