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

URL = "https://game.granbluefantasy.jp/"


def content_is_full_width(client):
    return client.execute_script(
        """
        return document.querySelector("#wrapper").offsetWidth == document.body.clientWidth;
    """
    )


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


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