blob: 8caa33b53d9555f0c0be8c6e1656bd4437a0315c (
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
30
|
import pytest
URL = "https://cov19ent.kdca.go.kr/cpassportal/biz/beffatstmnt/step1.do?flightPortSe=1&lang=en"
HEADER_CSS = "header.mouseOn"
# This site can be very slow, and prone to not finishing loading
async def get_header_position(client):
await client.navigate(URL, wait="complete")
header = client.await_css(HEADER_CSS, timeout=60)
return client.execute_script(
"""
return window.getComputedStyle(arguments[0]).position;
""",
header,
)
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
assert "absolute" == await get_header_position(client)
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
assert "absolute" != await get_header_position(client)
|