tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_1942292_beterbed_nl.py (942B)


      1 import pytest
      2 
      3 URL = "https://www.beterbed.nl/matrassen/m-line?SelectedFacetIds[1dfabd26b0e444e68fc92fd50281f0be]=M%20line&SortBy=DiscountPercentage"
      4 CONTAINER_CSS = ".slider-content"
      5 
      6 
      7 async def is_scrollbar_visible(client):
      8    await client.navigate(URL)
      9    container = client.await_css(CONTAINER_CSS)
     10    return client.execute_script(
     11        """
     12      const container = arguments[0];
     13      return Math.round(container.getBoundingClientRect().height) != container.clientHeight;
     14    """,
     15        container,
     16    )
     17 
     18 
     19 @pytest.mark.skip_platforms("android")
     20 @pytest.mark.need_visible_scrollbars
     21 @pytest.mark.asyncio
     22 @pytest.mark.with_interventions
     23 async def test_enabled(client):
     24    assert not await is_scrollbar_visible(client)
     25 
     26 
     27 @pytest.mark.skip_platforms("android")
     28 @pytest.mark.need_visible_scrollbars
     29 @pytest.mark.asyncio
     30 @pytest.mark.without_interventions
     31 async def test_disabled(client):
     32    assert await is_scrollbar_visible(client)