summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/shims/tests/test_1694168_google_analytics_and_tag_manager.py
blob: a00e617bdb07c944ef651114c5b815c72b7043aa (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://agspares.co.nz/category/Super-Store-Tractor-Linkage-Pins-Lynch-Pins-R-Clips"
ITEM = ".productsListed.item a[onclick]"


from .common import GAGTA_SHIM_MSG, clicking_link_navigates


@pytest.mark.asyncio
@pytest.mark.with_strict_etp
@pytest.mark.with_shims
async def test_enabled(client):
    assert await clicking_link_navigates(
        client, URL, client.css(ITEM), await_console_message=GAGTA_SHIM_MSG
    )


@pytest.mark.asyncio
@pytest.mark.with_strict_etp
@pytest.mark.without_shims
async def test_disabled(client):
    assert not await clicking_link_navigates(client, URL, client.css(ITEM))