diff options
Diffstat (limited to '')
-rw-r--r-- | testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py b/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py new file mode 100644 index 0000000000..2e30bae2cb --- /dev/null +++ b/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py @@ -0,0 +1,26 @@ +import pytest + +URL = "https://www.rva311.com/rvaone" +SHIM_ACTIVE_MSG = "Private Browsing Web APIs is being shimmed by Firefox" +IDB_FAILURE_MSG = "InvalidStateError: A mutation operation was attempted on a database" + + +@pytest.mark.asyncio +@pytest.mark.with_private_browsing +@pytest.mark.with_shims +async def test_with_shim(client, platform): + msg = None if platform == "android" else SHIM_ACTIVE_MSG + await client.navigate(URL, await_console_message=msg) + desktop, mobile = client.await_first_element_of( + [client.css("#root nav"), client.css("#mobilePageTitle")], is_displayed=True + ) + assert desktop or mobile + + +@pytest.mark.asyncio +@pytest.mark.with_private_browsing +@pytest.mark.without_shims +async def test_without_shim(client, platform): + msg = None if platform == "android" else IDB_FAILURE_MSG + await client.navigate(URL, await_console_message=msg) + assert client.find_css("#root [class*='loading-dot']", is_displayed=True) |