tor-browser

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

test_1830796_copyleaks_com.py (725B)


      1 import time
      2 
      3 import pytest
      4 
      5 URL = "https://copyleaks.com/ai-content-detector"
      6 IFRAME_CSS = "#ai-content-detector"
      7 UNSUPPORTED_CSS = "#outdated"
      8 
      9 
     10 @pytest.mark.only_platforms("android")
     11 @pytest.mark.asyncio
     12 @pytest.mark.with_interventions
     13 async def test_enabled(client):
     14    await client.navigate(URL)
     15    client.switch_to_frame(client.await_css(IFRAME_CSS))
     16    time.sleep(2)
     17    assert not client.find_css(UNSUPPORTED_CSS, is_displayed=True)
     18 
     19 
     20 @pytest.mark.only_platforms("android")
     21 @pytest.mark.asyncio
     22 @pytest.mark.without_interventions
     23 async def test_disabled(client):
     24    await client.navigate(URL)
     25    client.switch_to_frame(client.await_css(IFRAME_CSS))
     26    assert client.await_css(UNSUPPORTED_CSS, is_displayed=True)