From 9077a8d987714df9ce020375300f47290349a80c Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 15:03:17 +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=B4=20=ED=99=88=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=AF=B8=EB=A6=AC=20=EB=B0=9B=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=ED=99=94=EB=A9=B4=20=EC=B2=AD=ED=81=AC=EB=A5=BC=20?= =?UTF-8?q?=EC=93=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit old-tab-chunk-recovery 시험은 A 빌드 탭을 연 채 B를 배포하고 「탐색」을 누른다. A의 탐색 청크가 서버에 없으니 탭이 한 번 B로 다시 불러와야 한다. 그런데 홈 화면이 탐색(과 프로필) 청크를 modulepreload로 미리 받는다. 탭이 이미 그 청크를 가지고 있어 서버에 묻지 않고, 다시 불러오기가 0번이라 떨어진다. 미리 받지 않는 「프로젝트」와 「주제」 화면으로 바꾼다. 허용하는 실패 요청 정규식도 그 두 청크 이름으로 바꾼다. 검증: 이 시험이 chromium·firefox·webkit 모두 통과한다. 홈에서 받는 route 청크 목록(explore·case·profile·search·not-found·home)은 빌드한 앱을 열어 performance 항목으로 확인했다. --- tests/e2e/old-tab-chunk-recovery.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/e2e/old-tab-chunk-recovery.spec.ts b/tests/e2e/old-tab-chunk-recovery.spec.ts index ef4083a..e23f66a 100644 --- a/tests/e2e/old-tab-chunk-recovery.spec.ts +++ b/tests/e2e/old-tab-chunk-recovery.spec.ts @@ -21,10 +21,12 @@ import { startBuildServer } from "./support/service-worker-builds.ts"; // Template sync (af3d8e6). Upstream uses two of its example pages, which this // product deleted; two TechLog primary-navigation pages play the same part. -const PLATFORM = ROUTE_REGISTRY.TECH_LOG_EXPLORE; +// Not Explore: the home page preloads the Explore (and Profile) chunk, so a +// tab on A already holds it and never asks the server for it again. +const PLATFORM = ROUTE_REGISTRY.TECH_LOG_PROJECTS; const UI = ROUTE_REGISTRY.TECH_LOG_TOPICS; const PAGES = [ - "src/features/tech-log/presentation/public/pages/explore-page.tsx", + "src/features/tech-log/presentation/public/pages/projects-page.tsx", "src/features/tech-log/presentation/public/pages/topics-page.tsx", ] as const; @@ -63,7 +65,7 @@ async function routeChunk(dist: string, chunkId: string): Promise { // 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/route-tech-log-(?:explore|topics)-[\w-]+\.js`; +const MISSING_PAGE = String.raw`/assets/route-tech-log-(?:projects|topics)-[\w-]+\.js`; test.use({ allowedBrowserFailure: new RegExp( [