tor-browser

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

test_1800880_clipchamp_com.py (925B)


      1 import pytest
      2 
      3 URL = "http://clipchamp.com"
      4 SUPPORTED_TEXT = "Continue with Microsoft"
      5 UNSUPPORTED_CSS = "a[href*='google.com/chrome']"
      6 
      7 
      8 async def visit_site(client):
      9    await client.navigate(URL, wait="none")
     10    client.await_css(
     11        "a",
     12        condition="elem.innerText.includes('Try for free')",
     13        is_displayed=True,
     14    ).click()
     15 
     16 
     17 @pytest.mark.skip_platforms("android")
     18 @pytest.mark.asyncio
     19 @pytest.mark.with_interventions
     20 async def test_enabled(client):
     21    await visit_site(client)
     22    assert client.await_text(SUPPORTED_TEXT, is_displayed=True)
     23    assert not client.find_css(UNSUPPORTED_CSS, is_displayed=True)
     24 
     25 
     26 @pytest.mark.skip_platforms("android")
     27 @pytest.mark.asyncio
     28 @pytest.mark.without_interventions
     29 async def test_disabled(client):
     30    await visit_site(client)
     31    assert client.await_css(UNSUPPORTED_CSS, is_displayed=True)
     32    assert not client.find_text(SUPPORTED_TEXT, is_displayed=True)