test_1582582_watch_sling_com.py (669B)
1 import pytest 2 3 URL = "https://watch.sling.com/" 4 INCOMPATIBLE_CSS = "[class*='unsupported-browser']" 5 LOADER_CSS = ".loader-container" 6 VPN_TEXT = "Looks like a location issue" 7 8 9 @pytest.mark.asyncio 10 @pytest.mark.with_interventions 11 async def test_enabled(client): 12 await client.navigate(URL) 13 loader, vpn = client.await_first_element_of( 14 [client.css(LOADER_CSS), client.text(VPN_TEXT)], timeout=20 15 ) 16 assert loader or vpn 17 assert not client.find_css(INCOMPATIBLE_CSS) 18 19 20 @pytest.mark.asyncio 21 @pytest.mark.without_interventions 22 async def test_disabled(client): 23 await client.navigate(URL) 24 assert client.await_css(INCOMPATIBLE_CSS, timeout=20)