commit 4b662a30b0046d4ab7b06fc8d9c89ad05805f11f
parent 01a366d9582c7420ad9a9ed6295205842b8289d2
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Tue, 25 Nov 2025 16:52:45 +0000
Bug 2002012 - add a desktop-only UA override for bbs.colg.cn; r=denschub,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D273916
Diffstat:
2 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -6145,5 +6145,20 @@
}
}
]
+ },
+ "2002012": {
+ "label": "bbs.colg.cn",
+ "bugs": {
+ "2002012": {
+ "issue": "broken-layout",
+ "matches": ["*://bbs.colg.cn/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["desktop"],
+ "ua_string": ["Chrome_with_FxQuantum"]
+ }
+ ]
}
}
diff --git a/testing/webcompat/interventions/tests/test_2002012_bbs_colg_cn.py b/testing/webcompat/interventions/tests/test_2002012_bbs_colg_cn.py
@@ -0,0 +1,36 @@
+import pytest
+
+URL = "https://bbs.colg.cn/new"
+
+HERO_CSS = ".home-page-right"
+MOBILE_ERROR_TEXT = "Discuz! Mobile System Error"
+
+
+async def check_content_is_all_onscreen(client):
+ await client.navigate(URL, wait="none")
+ client.await_css(HERO_CSS, is_displayed=True)
+ return client.execute_script(
+ "return document.scrollingElement.scrollWidth <= window.outerWidth"
+ )
+
+
+@pytest.mark.skip_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ assert await check_content_is_all_onscreen(client)
+
+
+@pytest.mark.skip_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ assert not await check_content_is_all_onscreen(client)
+
+
+@pytest.mark.only_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_regression(client):
+ await client.navigate(URL, wait="none")
+ assert client.await_text(MOBILE_ERROR_TEXT, is_displayed=True)