commit c5e11eb9de568f2f4932849748a6f45ee97a7a37
parent d77a8a4b6f38c98315b612a7892d9c86e01a6efa
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Fri, 31 Oct 2025 15:54:26 +0000
Bug 1933929 - update our webcompat intervention for toei-anim.co.jp; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D270742
Diffstat:
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -4134,9 +4134,7 @@
{
"find": "Date\\.parse\\(e\\.newsInfoDetail\\.date\\)",
"replace": "Date.parse(s.newsInfoDetail.date)",
- "urls": [
- "https://www.toei-anim.co.jp/_next/static/chunks/585-f8188c5d925661df.js"
- ]
+ "urls": ["https://www.toei-anim.co.jp/_next/static/chunks/585-*.js"]
}
]
}
diff --git a/testing/webcompat/interventions/tests/test_1933929_toei-anim_co_jp.py b/testing/webcompat/interventions/tests/test_1933929_toei-anim_co_jp.py
@@ -1,4 +1,5 @@
import pytest
+from webdriver.error import NoSuchElementException
URL = "https://www.toei-anim.co.jp/"
@@ -9,14 +10,22 @@ ERROR_TEXT = "a client-side exception has occurred"
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
- await client.navigate(URL)
- assert client.await_css(SUCCESS_CSS, is_displayed=True)
- assert not client.find_text(ERROR_TEXT, is_displayed=True)
+ for _ in range(5):
+ await client.navigate(URL)
+ assert client.await_css(SUCCESS_CSS, is_displayed=True, timeout=4)
+ assert not client.find_text(ERROR_TEXT, is_displayed=True)
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
- await client.navigate(URL)
- assert client.await_text(ERROR_TEXT, is_displayed=True, timeout=20)
- assert not client.find_css(SUCCESS_CSS, is_displayed=True)
+ saw_failure = False
+ for _ in range(5):
+ await client.navigate(URL)
+ try:
+ assert client.await_text(ERROR_TEXT, is_displayed=True, timeout=4)
+ except NoSuchElementException:
+ continue
+ saw_failure = True
+ assert not client.find_css(SUCCESS_CSS, is_displayed=True)
+ assert saw_failure