summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/shims/tests/test_1775099_google_publisher_tags.py
blob: 1e4e5955610b760fc131061877d55c6d2b5dd016 (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://themighty.com/topic/fibromyalgia/difficulties-sitting-chronic-pain-fibromyalgia/"
PLACEHOLDER = ".tm-ads"


from .common import GPT_SHIM_MSG, is_gtag_placeholder_displayed


@pytest.mark.asyncio
@pytest.mark.with_strict_etp
@pytest.mark.with_shims
async def test_enabled(client):
    assert not await is_gtag_placeholder_displayed(
        client, URL, client.css(PLACEHOLDER), await_console_message=GPT_SHIM_MSG
    )


@pytest.mark.asyncio
@pytest.mark.with_strict_etp
@pytest.mark.without_shims
async def test_disabled(client):
    assert await is_gtag_placeholder_displayed(client, URL, client.css(PLACEHOLDER))