test_1873166_108408_secure_nsandi_com.py (940B)
1 import pytest 2 3 URL = "https://secure.nsandi.com/thc/policyenforcer/pages/loginB2C.jsf?sec_token=1LF0-PP4E-GVWV-J8DB-1QOR-O84E-W0GD-GIGC" 4 5 CHAT_BUTTON_CSS = "#GCLauncherbtn" 6 UNSUPPORTED_CSS1 = "#unsupported-browser" 7 UNSUPPORTED_CSS2 = ".browser-warning-fade" 8 9 10 async def is_warning_shown(client): 11 await client.navigate(URL) 12 client.await_css(CHAT_BUTTON_CSS, is_displayed=True) 13 client.await_css(UNSUPPORTED_CSS1) 14 client.await_css(UNSUPPORTED_CSS2) 15 return client.find_css(UNSUPPORTED_CSS1, is_displayed=True) or client.find_css( 16 UNSUPPORTED_CSS2, is_displayed=True 17 ) 18 19 20 @pytest.mark.only_platforms("android") 21 @pytest.mark.asyncio 22 @pytest.mark.with_interventions 23 async def test_enabled(client): 24 assert not await is_warning_shown(client) 25 26 27 @pytest.mark.only_platforms("android") 28 @pytest.mark.asyncio 29 @pytest.mark.without_interventions 30 async def test_disabled(client): 31 assert await is_warning_shown(client)