From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../interventions/tests/test_1582582_sling_com.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 testing/webcompat/interventions/tests/test_1582582_sling_com.py (limited to 'testing/webcompat/interventions/tests/test_1582582_sling_com.py') diff --git a/testing/webcompat/interventions/tests/test_1582582_sling_com.py b/testing/webcompat/interventions/tests/test_1582582_sling_com.py new file mode 100644 index 0000000000..71f6910af9 --- /dev/null +++ b/testing/webcompat/interventions/tests/test_1582582_sling_com.py @@ -0,0 +1,26 @@ +import pytest + +URL = "https://watch.sling.com/" +INCOMPATIBLE_CSS = "[class*='unsupported-browser']" +LOADER_CSS = ".loader-container" +VPN_TEXT = "ONLY AVAILABLE INSIDE THE US" + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + await client.navigate(URL) + loader, vpn = client.await_first_element_of( + [client.css(LOADER_CSS), client.text(VPN_TEXT)], timeout=20 + ) + assert loader or vpn + assert not client.find_css(INCOMPATIBLE_CSS) + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + await client.navigate(URL) + assert client.await_css(INCOMPATIBLE_CSS, timeout=2000) -- cgit v1.2.3