commit 26591faa8a814e9d7dccfa80cffd1beeb3fedc53
parent a9de61ec60b5207c09c4c3a37cb389e9996e6f3c
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Fri, 19 Dec 2025 23:16:55 +0000
Bug 2004025 - add a UA override for chatbot.weixin.qq.com/webapp; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D276951
Diffstat:
2 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -6187,6 +6187,21 @@
}
]
},
+ "2004025": {
+ "label": "chatbot.weixin.qq.com",
+ "bugs": {
+ "2004025": {
+ "issue": "firefox-blocked-completely",
+ "matches": ["*://chatbot.weixin.qq.com/webapp/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["all"],
+ "ua_string": ["Chrome_with_FxQuantum"]
+ }
+ ]
+ },
"2004610": {
"label": "character.ai",
"bugs": {
diff --git a/testing/webcompat/interventions/tests/test_2004025_chatbot_weixin_qq_com.py b/testing/webcompat/interventions/tests/test_2004025_chatbot_weixin_qq_com.py
@@ -0,0 +1,21 @@
+import pytest
+
+URL = "https://chatbot.weixin.qq.com/webapp/V4poszKZgOynfZUpQvoMWtJcprqIOK?robotName="
+SUPPORTED_CSS = "textarea"
+UNSUPPORTED_TEXT = "浏览器不兼容"
+
+
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ await client.navigate(URL, wait="none")
+ assert client.await_css(SUPPORTED_CSS, is_displayed=True)
+ assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True)
+
+
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ await client.navigate(URL, wait="none")
+ assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)
+ assert not client.find_css(SUPPORTED_CSS, is_displayed=True)