summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/interventions/tests/test_1829126_otsuka_co_jp.py
blob: fe7ad3071c336f8e0c81d97974625f68af073b0b (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
import pytest

URL = "https://www.otsuka.co.jp/fib/"
SPLASH_CSS = ".splash"

# Note this site can be really slow


async def splash_is_hidden(client):
    await client.navigate(URL, wait="none")
    splash = client.await_css(SPLASH_CSS, is_displayed=True, timeout=20)
    assert splash
    client.await_element_hidden(client.css(SPLASH_CSS), timeout=20)
    return not client.is_displayed(splash)


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


@pytest.mark.only_platforms("android")
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
    assert not await splash_is_hidden(client)