From 37586b444666839c8cfd8e00c269a4f8be574bee Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 23:00:21 +0900 Subject: [PATCH 1/2] =?UTF-8?q?test(e2e):=20=EC=83=9D=EC=84=B1=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20e2e=EC=9D=98=20=EC=98=A4=EB=A5=98=20=EC=9D=91?= =?UTF-8?q?=EB=8B=B5=EC=9D=84=20=EC=A7=9D=20=EB=B0=B1=EC=97=94=EB=93=9C=20?= =?UTF-8?q?Envelope=20=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EB=A7=9E=EC=B6=98?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 생성 기능 e2e는 짝 백엔드의 Envelope을 흉내 낸다고 적지만 실패 응답이 다르다. 429에 RATE_LIMITED와 category SYSTEM을, 500에 category SYSTEM을 보낸다. 짝 백엔드는 RATE_LIMIT_EXCEEDED(RATE_LIMIT, 429, retryable)와 INTERNAL_ERROR(INTERNAL, 500)를 보낸다(OperationalError.java). 지금은 판정이 status만 보아 결과가 같지만, code나 category를 읽게 바뀌면 시험이 실제와 다른 답으로 통과한다. 고른 방법: failure()가 category를 받고 두 응답을 백엔드 행 값으로 보낸다. 위험·한계: 짝 백엔드 행이 바뀌면 손으로 다시 맞춘다(pin 대조 밖). 검증: tests/e2e/generated-feature.spec.ts 세 엔진(desktop, PR 본문). RED 없음 — 시험 자료만 실제 값으로 바꾼다. Refs: 1112/03-09 --- tests/e2e/generated-feature.spec.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/e2e/generated-feature.spec.ts b/tests/e2e/generated-feature.spec.ts index f80d424f..63af5ac4 100644 --- a/tests/e2e/generated-feature.spec.ts +++ b/tests/e2e/generated-feature.spec.ts @@ -59,10 +59,17 @@ function envelope(data: unknown) { return { success: true, data, meta: META }; } -function failure(code: string, retryable: boolean) { +/** + * 1112/03-09. The paired backend's failure Envelope: code, category and + * retryable as its OperationalError row gives them + * (clean-architecture-backend-template src/shared-contract/.../OperationalError.java: + * RATE_LIMIT_EXCEEDED is RATE_LIMIT, 429, retryable; INTERNAL_ERROR is + * INTERNAL, 500, not retryable). + */ +function failure(code: string, category: string, retryable: boolean) { return { success: false, - error: { code, category: "SYSTEM", message: "backend message", retryable }, + error: { code, category, message: "backend message", retryable }, meta: META, }; } @@ -243,7 +250,7 @@ test.describe("the save", () => { route.fulfill({ status: 429, headers: { "retry-after": "1" }, - json: failure("RATE_LIMITED", true), + json: failure("RATE_LIMIT_EXCEEDED", "RATE_LIMIT", true), }); test("keeps the input and saves on retry", async ({ page }) => { @@ -281,7 +288,7 @@ test.describe("the save", () => { "x-correlation-id": "corr-save-500", "access-control-expose-headers": "x-correlation-id", }, - json: failure("INTERNAL_ERROR", false), + json: failure("INTERNAL_ERROR", "INTERNAL", false), }); // 0929/08-04. The case a user most wants to report shows the id support From 4a9c3186482fe8ecbcdb6c34cddb2fa5ea65deda Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 23:00:21 +0900 Subject: [PATCH 2/2] =?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( [