tor-browser

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

test_1904952_idp5_civis_bz_it.py (1246B)


      1 import pytest
      2 
      3 URL = "https://idp5.civis.bz.it/Shibboleth.sso/cielogin?SAMLDS=1&target=https%3A%2F%2Fidp5.civis.bz.it%2Fidp%2FAuthn%2FExternal%3Fconversation%3De2s1&entityID=https%3A%2F%2Fidserver.servizicie.interno.gov.it%2Fidp%2Fprofile%2FSAML2%2FPOST%2FSSO&authnContextClassRef=https%3A%2F%2Fwww.spid.gov.it%2FSpidL2&authnContextComparison=minimum&forceAuthn=true"
      4 
      5 BUTTON_CSS = "a.btn-primary.btn-card"
      6 SUPPORTED_CSS = "a[href='https://play.google.com/store/apps/details?id=it.ipzs.cieid']"
      7 UNSUPPORTED_CSS = "#mobile_noChrome"
      8 
      9 
     10 async def click_button(client):
     11    await client.navigate(URL, wait="none")
     12    client.await_css(BUTTON_CSS, is_displayed=True).click()
     13 
     14 
     15 @pytest.mark.only_platforms("android")
     16 @pytest.mark.asyncio
     17 @pytest.mark.with_interventions
     18 async def test_enabled(client):
     19    await click_button(client)
     20    assert client.await_css(SUPPORTED_CSS, is_displayed=True)
     21    assert not client.find_css(UNSUPPORTED_CSS, is_displayed=True)
     22 
     23 
     24 @pytest.mark.only_platforms("android")
     25 @pytest.mark.asyncio
     26 @pytest.mark.without_interventions
     27 async def test_disabled(client):
     28    await click_button(client)
     29    assert client.await_css(UNSUPPORTED_CSS, is_displayed=True)
     30    assert not client.find_css(SUPPORTED_CSS, is_displayed=True)