tor-browser

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

test_1842767_passport_bilibili_com.py (664B)


      1 import asyncio
      2 
      3 import pytest
      4 
      5 URL = "https://passport.bilibili.com"
      6 DESKTOP_CSS = "html:not([data-dpr]) #app-main"
      7 MOBILE_CSS = "html[data-dpr] #app"
      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    assert client.await_css(MOBILE_CSS)
     16    assert not client.find_css(DESKTOP_CSS)
     17 
     18 
     19 @pytest.mark.only_platforms("android")
     20 @pytest.mark.asyncio
     21 @pytest.mark.without_interventions
     22 async def test_disabled(client):
     23    await client.navigate(URL)
     24    await asyncio.sleep(3)
     25    assert client.await_css(DESKTOP_CSS)
     26    assert not client.find_css(MOBILE_CSS)