test_1767270_rva311_com_pbm_fix.py (962B)
1 import pytest 2 3 URL = "https://www.rva311.com/rvaone" 4 SHIM_ACTIVE_MSG = "Private Browsing Web APIs is being shimmed by Firefox" 5 IDB_FAILURE_MSG = "InvalidStateError: A mutation operation was attempted on a database" 6 7 8 @pytest.mark.asyncio 9 @pytest.mark.with_private_browsing 10 @pytest.mark.with_shims 11 async def test_with_shim(client, platform): 12 msg = None if platform == "android" else SHIM_ACTIVE_MSG 13 await client.navigate(URL, await_console_message=msg) 14 desktop, mobile = client.await_first_element_of( 15 [client.css("#root nav"), client.css("#mobilePageTitle")], is_displayed=True 16 ) 17 assert desktop or mobile 18 19 20 @pytest.mark.asyncio 21 @pytest.mark.with_private_browsing 22 @pytest.mark.without_shims 23 async def test_without_shim(client, platform): 24 msg = None if platform == "android" else IDB_FAILURE_MSG 25 await client.navigate(URL, await_console_message=msg) 26 assert client.find_css("#root [class*='loading-dot']", is_displayed=True)