test_1995452_polymarket_com.py (864B)
1 import pytest 2 3 URL = "https://polymarket.com/sports/live" 4 5 CONTAINER_CSS = "#scoreboard-scroll-container" 6 7 8 async def is_scrollbar_visible(client): 9 await client.navigate(URL) 10 container = client.await_css(CONTAINER_CSS) 11 return client.execute_script( 12 """ 13 const container = arguments[0]; 14 return Math.round(container.getBoundingClientRect().height) != container.clientHeight; 15 """, 16 container, 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 is_scrollbar_visible(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 is_scrollbar_visible(client)