From 4a9c3186482fe8ecbcdb6c34cddb2fa5ea65deda Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 23:00:21 +0900 Subject: [PATCH] =?UTF-8?q?test(e2e):=20=EC=98=A4=EB=9E=98=EB=90=9C=20?= =?UTF-8?q?=ED=83=AD=20=EC=8B=9C=ED=97=98=EC=9D=98=20preload=20=ED=97=88?= =?UTF-8?q?=EC=9A=A9=EC=9D=84=20=EA=B2=80=EC=82=AC=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=EC=9D=98=20=EC=B2=AD=ED=81=AC=EB=A1=9C=20?= =?UTF-8?q?=EC=A2=81=ED=9E=8C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 오래된 탭 시험은 A 탭의 플랫폼 화면과 함께 preload된 청크도 preloadunused 허용에 넣는다. 그러나 strict fixture의 preload 검사는 끝에 열린 문서만 읽고, A 탭은 그때 reload로 B 문서가 된다. 그래서 A 목록은 A 문서에 쓰일 일이 없고, B 문서에 같은 이름으로 나타나는 정말 쓰이지 않은 preload를 가릴 수만 있다. 고른 방법: A 목록을 지우고 B context routes 모듈의 청크만 허용한다. 주석을 fixture 동작(끝에 열린 문서만)에 맞춘다. 위험·한계: B 빌드가 A와 같은 이름의 공유 청크를 preload하고 쓰지 않으면 이제 실패한다. 그것이 이 시험이 잡아야 할 것이다. 검증: 이 spec을 세 엔진에서 세 번씩 돌린다(desktop, PR 본문). RED 없음 — 허용을 좁히는 변경이라 지금 통과가 그대로여야 한다. Refs: 1112/03-06 --- tests/e2e/old-tab-chunk-recovery.spec.ts | 26 ++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/tests/e2e/old-tab-chunk-recovery.spec.ts b/tests/e2e/old-tab-chunk-recovery.spec.ts index 36dc61d1..d43f549d 100644 --- a/tests/e2e/old-tab-chunk-recovery.spec.ts +++ b/tests/e2e/old-tab-chunk-recovery.spec.ts @@ -179,25 +179,21 @@ async function preloadedWith(dist: string, page: string): Promise { } // 1103/11-09. Vite preloads a chunk together with the chunks it imports, so a -// missing chunk leaves itself and the chunks preloaded with it unused: in the -// A tab those of A's platform page (the tab is still on A while recovery -// reads the release manifest), in the B tab those of B's context routes -// module for the feature's list page. The fixture's preload check reports them in every -// engine (WebKit's own three-second warning only did when its timer ran -// before the test ended). They are the provoked failure's own effect; only -// those chunks are allowed. +// missing chunk leaves itself and the chunks preloaded with it unused. The +// fixture's preload check reads only the documents open at the end +// (tests/support/browser/preload-use.ts), and the A tab has become a B +// document by then, so only B's: those of B's context routes module for the +// feature's list page. The check reports them in every engine (WebKit's own +// three-second warning only did when its timer ran before the test ended). +// They are the provoked failure's own effect; only those chunks are allowed +// (1112/03-06: the A list here covered nothing but a B chunk of the same name). test.use({ allowedBrowserFailure: async ({ browserName: _engine }, provide) => { if (!builds) throw new Error("Fixture builds were not prepared."); - const aManifest = await viteManifest(builds.dist.a); const bManifest = await viteManifest(builds.dist.b); - const files = [ - ...(await preloadedWith(builds.dist.a, pageSource(aManifest, PLATFORM))), - ...(await preloadedWith( - builds.dist.b, - routesSource(bManifest, pageSource(bManifest, FEATURE())), - )), - ].map((file) => file.replaceAll(".", String.raw`\.`)); + const files = ( + await preloadedWith(builds.dist.b, routesSource(bManifest, pageSource(bManifest, FEATURE()))) + ).map((file) => file.replaceAll(".", String.raw`\.`)); await provide( new RegExp( [