commit c1ba184ae9fbe4c88848a4e3cb6b5aef93898d19
parent 7f06dbd6b7659c62e55937c15f6c4604cd7f920a
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Fri, 17 Oct 2025 21:02:59 +0000
Bug 1902520 - add a Mac and Windows UA override for keisan.nta.go.jp/kyoutu/ky/sm; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D269108
Diffstat:
2 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -3270,6 +3270,25 @@
}
]
},
+ "1902520": {
+ "label": "www.keisan.nta.go.jp",
+ "bugs": {
+ "1902520": {
+ "issue": "firefox-blocked-completely",
+ "matches": ["*://www.keisan.nta.go.jp/kyoutu/ky/sm/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["mac"],
+ "ua_string": ["Safari_with_FxQuantum"]
+ },
+ {
+ "platforms": ["windows"],
+ "ua_string": ["Chrome_with_FxQuantum"]
+ }
+ ]
+ },
"1902527": {
"label": "app.gather.town",
"bugs": {
diff --git a/testing/webcompat/interventions/tests/test_1902520_keisan_nta_go_jp.py b/testing/webcompat/interventions/tests/test_1902520_keisan_nta_go_jp.py
@@ -0,0 +1,37 @@
+import pytest
+
+URL = "https://www.keisan.nta.go.jp/kyoutu/ky/sm/top_web#bsctrl"
+CARD_YES_CSS = "#card_yes + label"
+PHONE_AND_READER_YES_CSS = "#phoneAndReader_yes + label"
+SUBMIT_CSS = "[onclick*=doSubmit][onclick*=csw0100_myno_qr]"
+NOTICE_CSS = "[onclick*=openExternalSubGuidance][onclick*=recommend]"
+PROGRESS_CSS = "form[action*=cmw0900] .yeartitle.tounen"
+
+
+async def is_blocked(client):
+ await client.navigate(URL)
+ client.await_css(CARD_YES_CSS, is_displayed=True).click()
+ client.await_css(PHONE_AND_READER_YES_CSS, is_displayed=True).click()
+ client.await_css(SUBMIT_CSS, is_displayed=True).click()
+ bad, good = client.await_first_element_of(
+ [
+ client.css(NOTICE_CSS),
+ client.css(PROGRESS_CSS),
+ ],
+ is_displayed=True,
+ )
+ return bad is not None
+
+
+@pytest.mark.only_platforms("mac", "windows")
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ assert not await is_blocked(client)
+
+
+@pytest.mark.only_platforms("mac", "windows")
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ assert await is_blocked(client)