commit 70cc274cf6bf8006f2fb37667f7c5fb2c57e479b
parent 142a3586d933762af58547c845529942c4c45364
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Thu, 9 Oct 2025 01:01:17 +0000
Bug 1993201 - add a UA override for portal.pilot.ly; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D267978
Diffstat:
3 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -5432,5 +5432,20 @@
"ua_string": ["add_Chrome"]
}
]
+ },
+ "1993201": {
+ "label": "portal.pilot.ly",
+ "bugs": {
+ "1993201": {
+ "issue": "firefox-blocked-completely",
+ "matches": ["*://portal.pilot.ly/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["all"],
+ "ua_string": ["add_Chrome"]
+ }
+ ]
}
}
diff --git a/browser/extensions/webcompat/manifest.json b/browser/extensions/webcompat/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
- "version": "145.7.0",
+ "version": "145.8.0",
"browser_specific_settings": {
"gecko": {
"id": "webcompat@mozilla.org",
diff --git a/testing/webcompat/interventions/tests/test_1993201_portal_pilot_ly.py b/testing/webcompat/interventions/tests/test_1993201_portal_pilot_ly.py
@@ -0,0 +1,39 @@
+import pytest
+
+URL = "https://previewinsights.qualtrics.com/jfe/form/SV_a5Gnoq0OsdUzvGm?Q_DL=hq7SUdQWjweSxhT_a5Gnoq0OsdUzvGm_CGC_DNCiEfKhsuDlymq&Q_CHL=email"
+
+WATCH_NOW_CSS = "a[href*='portal.pilot.ly/process-target']"
+AVANTI_CSS = "button.begin-registration"
+SUPPORTED_CSS = "#root .pilotly-player"
+UNSUPPORTED_TEXT1 = "Firefox not supported"
+UNSUPPORTED_TEXT2 = "Google Chrome"
+
+
+async def get_to_page(client):
+ await client.navigate(URL, wait="none")
+ client.soft_click(client.await_css(WATCH_NOW_CSS, is_displayed=True))
+ client.soft_click(client.await_css(AVANTI_CSS, is_displayed=True))
+
+
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ await get_to_page(client)
+ assert client.await_css(SUPPORTED_CSS, is_displayed=True)
+ assert not client.find_text(UNSUPPORTED_TEXT2, is_displayed=True)
+ assert not client.find_text(UNSUPPORTED_TEXT2, is_displayed=True)
+
+
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ await get_to_page(client)
+ no_firefox, use_chrome = client.await_first_element_of(
+ [
+ client.text(UNSUPPORTED_TEXT1),
+ client.text(UNSUPPORTED_TEXT2),
+ ],
+ is_displayed=True,
+ )
+ assert no_firefox or use_chrome
+ assert not client.find_css(SUPPORTED_CSS, is_displayed=True)