test_1898923_trade-in_vodafone_com.py (678B)
1 import pytest 2 3 URL = "https://trade-in.vodafone.com/diagnostics/ie/index.html" 4 SUPPORTED_DESKTOP_ERR = "Cannot run DTL on non mobile browsers" 5 SUPPORTED_MOBILE_ERR = "Auth token does not exist in memory" 6 UNSUPPORTED_TEXT = "switch to Chrome" 7 8 9 @pytest.mark.asyncio 10 @pytest.mark.with_interventions 11 async def test_enabled(client, platform): 12 expected = SUPPORTED_DESKTOP_ERR 13 if platform == "android": 14 expected = SUPPORTED_MOBILE_ERR 15 await client.navigate(URL, await_console_message=expected) 16 17 18 @pytest.mark.asyncio 19 @pytest.mark.without_interventions 20 async def test_disabled(client): 21 await client.navigate(URL) 22 assert client.await_text(UNSUPPORTED_TEXT)