summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/interventions/tests/test_1855088_125039_hrmis2_eghrmis_gov_my.py
blob: 33f0193b9a76fe6a238b66efce4763b8a5eba3d7 (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
import time

import pytest

URL = "https://hrmis2.eghrmis.gov.my/HRMISNET/Common/Main/Login.aspx"
DIALOG_CSS = "#dialog4"


async def is_dialog_shown(client):
    await client.navigate(URL)
    time.sleep(2)
    dialog = client.await_css(DIALOG_CSS)
    return client.is_displayed(dialog)


@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
    assert not await is_dialog_shown(client)


@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
    assert await is_dialog_shown(client)