test(e2e): allow WebKit's own wording for the missing old-tab chunk (11-05)

WebKit reports the failed dynamic import as "TypeError: Importing a
module script failed." without the chunk URL, so the strict console
check rejected an expected failure. The recovery assertions already
passed on WebKit; the spec now passes on chromium, firefox and webkit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
donghyeon-ka
2026-09-28 01:43:57 +09:00
co-authored by Claude Opus 5.5
parent f1002fd928
commit b1a36ab26b
+4 -2
View File
@@ -58,8 +58,9 @@ async function routeChunk(dist: string, chunkId: string): Promise<string> {
}
// Each missing page chunk fails its request and the dynamic import. Chromium
// may also log the 404 itself (without its URL), and Firefox logs the error
// object React caught. Nothing else is allowed.
// may also log the 404 itself (without its URL), Firefox logs the error
// object React caught, and WebKit logs its own import error without the URL.
// Nothing else is allowed.
const MISSING_PAGE = String.raw`/assets/(?:platform-overview|ui-gallery)-page-[\w-]+\.js`;
test.use({
allowedBrowserFailure: new RegExp(
@@ -69,6 +70,7 @@ test.use({
String.raw`^console:error:\[JavaScript Error: "Loading module from “http://127\.0\.0\.1:\d+${MISSING_PAGE}” was blocked`,
String.raw`^console:error:Failed to load resource: the server responded with a status of 404 \(Not Found\)$`,
String.raw`^console:error:JSHandle@object$`,
String.raw`^console:error:TypeError: Importing a module script failed\.$`,
].join("|"),
"u",
),