tor-browser

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

test_1836109_watch_tonton_com_my.py (807B)


      1 import pytest
      2 
      3 URL = "https://watch.tonton.com.my/#/"
      4 UNSUPPORTED_CSS = ".ua-barrier"
      5 LOGIN_CSS = ".login-page-container"
      6 
      7 
      8 # The site can take a little time to load, and this includes
      9 # interstitial ads, so for now we give it 20 seconds.
     10 
     11 
     12 # Skip Android as the site blocks many Android devices including the emulator
     13 # Skip Linux as it's unsupported by the site.
     14 @pytest.mark.skip_platforms("android", "linux")
     15 @pytest.mark.asyncio
     16 @pytest.mark.with_interventions
     17 async def test_enabled(client):
     18    await client.navigate(URL)
     19    assert client.await_css(LOGIN_CSS, timeout=20)
     20 
     21 
     22 @pytest.mark.skip_platforms("android", "linux")
     23 @pytest.mark.asyncio
     24 @pytest.mark.without_interventions
     25 async def test_disabled(client):
     26    await client.navigate(URL)
     27    assert client.await_css(UNSUPPORTED_CSS, timeout=20)