test(browser-capabilities): pin chunk-failure wording on all three engines (R3-7)
Run the app's isChunkLoadFailure (served by the dev server) against the real error each engine raises for a missing dynamic-import chunk. Passes on Chromium, Firefox and WebKit. Record the WebKit run (e2e 39, capabilities 17). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
89fc4d4bd7
commit
d7fc464426
+2
-1
@@ -154,4 +154,5 @@ T51–T115를 모두 커밋했다. 레인 9개와 T115를 병합할 때마다
|
||||
- 여러 탭 OPFS 경합은 결정적으로 재현할 방법이 없어 스펙을 넣지 않았다. 60초 이상 grace period를 기다려야 하고, 페이지 쪽 참조 확인 사이에 끼워 넣을 수단이 없다.
|
||||
- Firefox에서는 Playwright의 SW 제어 제약 때문에 SW 업데이트 스펙이 skip된다.
|
||||
- 최종 확인(깨끗한 체크아웃): 모든 게이트 통과(unit 2077, component 182, integration 151, check:optional-recipes 포함). Playwright Chromium·Firefox는 e2e 76건 통과(skip 2), browser-capabilities 34건 통과.
|
||||
- 남은 것: T122 WebKit(시스템 라이브러리 설치 필요), T123 push와 PR. SW 파일에 `Cache-Control: no-cache` 헤더가 붙는지는 호스팅 검사가 확인하지 않는다(범위 밖).
|
||||
- T122 WebKit: 시스템 라이브러리를 설치한 뒤 e2e 39건과 browser-capabilities 17건이 모두 통과했다. 청크 오류 문구 스펙(`tests/browser-capabilities/chunk-load-error.spec.ts`)은 Chromium·Firefox·WebKit에서 앱 판별 함수가 실제 엔진 문구를 인식하는지 확인하고, 세 엔진 모두 통과했다.
|
||||
- 남은 것: T123 push와 PR. SW 파일에 `Cache-Control: no-cache` 헤더가 붙는지는 호스팅 검사가 확인하지 않는다(범위 밖).
|
||||
|
||||
+1
-1
@@ -436,5 +436,5 @@
|
||||
- [x] T119 R3-4 `idle` 비동기 상태 — `application/view-models/async-state.ts`, presentation
|
||||
- [x] T120 R3-5 SSE 바이트 단위 파싱 — `realtime/sse/*`
|
||||
- [x] T121 R3-6 실제 브라우저 Playwright 스펙 — `tests/e2e`, `tests/browser-capabilities`
|
||||
- [ ] T122 R3-7 WebKit 전체 실행
|
||||
- [x] T122 R3-7 WebKit 전체 실행
|
||||
- [ ] T123 R3-8 push + Gitea PR
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
// R3-7. The chunk-recovery classifier matches engine error wording. Run the
|
||||
// app's own classifier (served by the dev server) against the error each real
|
||||
// engine reports for a dynamic import whose chunk is gone after a deploy, so a
|
||||
// wording change in Chromium, Firefox or WebKit fails here.
|
||||
test("classifies the engine's missing dynamic-import chunk error as a chunk failure", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
const result = await page.evaluate(async () => {
|
||||
// A browser URL served by the dev server, not a module tsc resolves.
|
||||
const classifierUrl = "/src/presentation/boundaries/chunk-recovery-boundary.tsx";
|
||||
const { isChunkLoadFailure } = (await import(classifierUrl)) as {
|
||||
isChunkLoadFailure: (error: unknown) => boolean;
|
||||
};
|
||||
try {
|
||||
await import(`/assets/removed-after-deploy-${Date.now()}.js`);
|
||||
return { reported: "no error", classified: false };
|
||||
} catch (error) {
|
||||
return {
|
||||
reported: error instanceof Error ? `${error.name}: ${error.message}` : String(error),
|
||||
classified: isChunkLoadFailure(error),
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
expect(result.classified, result.reported).toBe(true);
|
||||
});
|
||||
Reference in New Issue
Block a user