summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/interventions/tests/test_1738319_yebocasino_co_za.py
blob: 6b09cbec87c2faf92eaf7fc5fbff879515ccc2a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pytest

URL = "https://www.yebocasino.co.za/webplay/"
PRACTICE_CSS = "#lobbybox_featuredgames .gamebox .cta.practice"
IFRAME_CSS = "#gameiframe"
UNSUPPORTED_CSS = ".unsupported-device-box"
SUPPORTED_CSS = "#game_main"


async def get_to_page(client):
    await client.navigate(URL)
    client.soft_click(client.await_css(PRACTICE_CSS))
    client.switch_to_frame(client.await_css(IFRAME_CSS))


@pytest.mark.only_platforms("android")
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
    await get_to_page(client)
    assert client.await_css(SUPPORTED_CSS)


@pytest.mark.only_platforms("android")
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
    await get_to_page(client)
    assert client.await_css(UNSUPPORTED_CSS)