tor-browser

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

test_1830739_1902452_eternalslots_com.py (968B)


      1 import pytest
      2 
      3 URL = "https://eternalslots.com/games/new-games"
      4 FIRST_GAME_CSS = ".gameGrid .AsyncImage-image[src]"
      5 PLAY_FOR_FUN_CSS = "#BtnUserPlayNow"
      6 IFRAME_CSS = "iframe[src*=gameLauncher]"
      7 UNSUPPORTED_CSS = ".unsupported-device-box"
      8 SUPPORTED_CSS = "#game_main"
      9 
     10 
     11 async def get_to_page(client):
     12    await client.navigate(URL)
     13    client.soft_click(client.await_css(FIRST_GAME_CSS, is_displayed=True))
     14    client.soft_click(client.await_css(PLAY_FOR_FUN_CSS, is_displayed=True))
     15    client.switch_to_frame(client.await_css(IFRAME_CSS))
     16 
     17 
     18 @pytest.mark.only_platforms("android")
     19 @pytest.mark.asyncio
     20 @pytest.mark.with_interventions
     21 async def test_enabled(client):
     22    await get_to_page(client)
     23    assert client.await_css(SUPPORTED_CSS, timeout=30)
     24 
     25 
     26 @pytest.mark.only_platforms("android")
     27 @pytest.mark.asyncio
     28 @pytest.mark.without_interventions
     29 async def test_disabled(client):
     30    await get_to_page(client)
     31    assert client.await_css(UNSUPPORTED_CSS, timeout=30)