tor-browser

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

test_1845299_docs_google_com_presentation.py (871B)


      1 import pytest
      2 
      3 URL = "https://docs.google.com/presentation/d/1Xb82OcbdIFC0LjFok2IA2G_oGdtpueysQXHb78d_iUU/edit"
      4 
      5 SCROLL_CONTAINER_CSS = "#speakernotes"
      6 
      7 
      8 async def is_scrollbar_hidden(client):
      9    await client.navigate(URL)
     10    container = client.await_css(SCROLL_CONTAINER_CSS, is_displayed=True)
     11    return client.execute_script(
     12        """
     13       return arguments[0].clientWidth == arguments[0].offsetWidth;
     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 await is_scrollbar_hidden(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 not await is_scrollbar_hidden(client)