tor-browser

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

test_1986438_gamma_app.py (899B)


      1 import pytest
      2 from webdriver import NoSuchElementException
      3 
      4 URL = "https://gamma.app/signup"
      5 UNSUPPORTED_TEXT = "works best on Chrome"
      6 
      7 
      8 async def does_warning_show(client):
      9    await client.navigate(URL)
     10    try:
     11        client.await_text(UNSUPPORTED_TEXT, is_displayed=True, timeout=3)
     12        return True
     13    except NoSuchElementException:
     14        return False
     15 
     16 
     17 @pytest.mark.skip_platforms("android")
     18 @pytest.mark.asyncio
     19 @pytest.mark.with_interventions
     20 async def test_enabled(client):
     21    assert not await does_warning_show(client)
     22 
     23 
     24 @pytest.mark.skip_platforms("android")
     25 @pytest.mark.asyncio
     26 @pytest.mark.without_interventions
     27 async def test_disabled(client):
     28    assert await does_warning_show(client)
     29 
     30 
     31 @pytest.mark.only_platforms("android")
     32 @pytest.mark.asyncio
     33 @pytest.mark.without_interventions
     34 async def test_not_shown_on_android(client):
     35    assert not await does_warning_show(client)