From cfe587c13e25c38ead5ab431939f374a02d27501 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 15:03:16 +0900 Subject: [PATCH] =?UTF-8?q?test(e2e):=20HTTP=20=EA=B3=84=EC=95=BD=20?= =?UTF-8?q?=EC=8B=9C=ED=97=98=EC=9D=B4=20=EA=B2=BD=EB=A1=9C=20=ED=8C=A8?= =?UTF-8?q?=ED=84=B4=EC=9C=BC=EB=A1=9C=20=EC=84=9C=EB=B9=99=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=A7=80=EA=B8=88=20=EC=84=9C=EB=B2=84=EB=A5=BC=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6784eb1(08-20)부터 운영 서버는 빌드가 본 slug 목록이 아니라 등록된 Public 경로 패턴으로 SPA를 낸다. 빌드 뒤에 게시한 기록도 열려야 하기 때문이다. 그래서 /projects/missing-project는 이제 200으로 SPA를 받고, 화면 안에서 not-found를 보인다. 시험은 아직 그 경로가 edge 404라고 기대해 세 엔진 모두 떨어진다. 모르는 slug는 200 SPA를 기대한다. edge 404 사례는 경로 매개변수가 한 segment만 맞는다는 것을 보이는 /projects/missing-project/unknown-tab으로 바꾼다. 경로가 없는 /definitely-not-a-product-route는 그대로 둔다. 검증: tech-log-http-contract.spec.ts가 세 엔진 모두 통과한다. --- tests/e2e/tech-log-http-contract.spec.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/e2e/tech-log-http-contract.spec.ts b/tests/e2e/tech-log-http-contract.spec.ts index 9563094..0ab228a 100644 --- a/tests/e2e/tech-log-http-contract.spec.ts +++ b/tests/e2e/tech-log-http-contract.spec.ts @@ -34,8 +34,24 @@ for (const path of knownSpaPaths) { }); } +// 6784eb1 (08-20). The server matches each registered Public route as a +// pattern, not the slugs the build saw, so a record published after the build +// is reachable. A slug nobody published is the SPA's in-shell not-found, not an +// edge 404. +test("production HTTP serves the SPA for a slug the build has not seen", async ({ + request, +}) => { + const response = await request.get("/projects/missing-project"); + + expect(response.status()).toBe(200); + expect(response.headers()["content-type"]).toBe("text/html;charset=UTF-8"); + expect((await response.text()).startsWith("")).toBe(true); +}); + +// A route parameter matches one segment, so a second segment is still an edge +// 404, as is a path no route declares. for (const path of [ - "/projects/missing-project", + "/projects/missing-project/unknown-tab", "/definitely-not-a-product-route", ]) { test(`production HTTP returns the source-exact raw 404 for ${path}`, async ({