summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/interventions/tests/test_1836178_atracker_pro.py
blob: 78dbbaf1ddb3246122749a15c00ba17060bbcc06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pytest

URL = "https://atracker.pro/"
LOGIN_CSS = "a[onclick='openWebVersionWindow()']"


async def get_login_popup_url(client, popup_url):
    popup = await client.await_popup(popup_url)
    await client.navigate(URL, wait="load")
    client.soft_click(client.await_css(LOGIN_CSS))
    return await popup


@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
    assert await get_login_popup_url(client, "index.html")


@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
    assert await get_login_popup_url(client, "BrowserCheck")