commit c15c4a58076cd5e54e529a91dd463024306a69b1
parent 46bf658f7956ec2aaf121a22d49f7ebd39931dbe
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Thu, 2 Oct 2025 15:11:00 +0000
Bug 1924441 - re-add our desktop-only UA override for contractorinduction.colesgroup.com.au; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D266997
Diffstat:
2 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -3801,6 +3801,21 @@
}
]
},
+ "1924441": {
+ "label": "contractorinduction.colesgroup.com.au",
+ "bugs": {
+ "1924441": {
+ "issue": "firefox-blocked-completely",
+ "matches": ["*://contractorinduction.colesgroup.com.au/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["desktop"],
+ "ua_string": ["add_Chrome"]
+ }
+ ]
+ },
"1925508": {
"label": "developer.apple.com",
"bugs": {
diff --git a/testing/webcompat/interventions/tests/test_1924441_contractorinduction_colesgroup_com_au.py b/testing/webcompat/interventions/tests/test_1924441_contractorinduction_colesgroup_com_au.py
@@ -0,0 +1,38 @@
+import pytest
+
+URL = "https://contractorinduction.colesgroup.com.au/"
+
+CAPTCHA_CSS = "iframe[src*='Incapsula_Resource']"
+SUPPORTED_CSS = "#EmailAddress"
+UNSUPPORTED_TEXT = "we do not support your current browser"
+
+
+async def visit_site(client):
+ await client.navigate(URL, wait="none")
+ _, _, vpn = client.await_first_element_of(
+ [
+ client.css(SUPPORTED_CSS),
+ client.text(UNSUPPORTED_TEXT),
+ client.css(CAPTCHA_CSS),
+ ],
+ is_displayed=True,
+ )
+ if vpn:
+ pytest.skip("Region-locked, cannot test. Try using a VPN set to Australia.")
+
+
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ await visit_site(client)
+ assert client.await_css(SUPPORTED_CSS, is_displayed=True)
+ assert not client.find_text(UNSUPPORTED_TEXT)
+
+
+@pytest.mark.skip_platforms("android") # currently works on Android; see bz1924441#c7
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ await visit_site(client)
+ assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)
+ assert not client.find_css(SUPPORTED_CSS)