From f3a4e83b7eed7c9204d40b10024f1996eda06a2b Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 16:59:22 +0900 Subject: [PATCH] =?UTF-8?q?test(visual):=20=EB=AA=A8=EB=A5=B4=EB=8A=94=20s?= =?UTF-8?q?lug=20=ED=99=94=EB=A9=B4=EC=9D=B4=20SPA=20=EC=95=88=EC=9D=98=20?= =?UTF-8?q?not-found=EB=A5=BC=20=EC=B0=8D=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit visual의 「unknown Public …」 20건은 /projects/missing-project 같은 경로가 서버의 평문 「Not Found」를 받는다고 기대하고, 그것을 찍는다. 6784eb1 (08-20)부터 서버는 등록된 Public 경로 패턴이면 SPA를 내고, 게시되지 않은 slug는 화면 안의 not-found(「페이지를 찾을 수 없습니다.」)가 된다. 그래서 글자를 찾지 못해 스크린샷 전에 떨어진다. 화면 안의 not-found h1과 site-frame을 확인하고 찍는다. 경로가 없는 NOT_FOUND의 평문 응답 visual은 그대로다. 기준 이미지는 visual 기준 갱신 커밋에서 새로 만든다. --- tests/visual/tech-log.visual.spec.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/visual/tech-log.visual.spec.ts b/tests/visual/tech-log.visual.spec.ts index f0a258c..1e8823f 100644 --- a/tests/visual/tech-log.visual.spec.ts +++ b/tests/visual/tech-log.visual.spec.ts @@ -60,13 +60,19 @@ for (const [state, path] of TECH_LOG_STUDIO_STATE_PATHS) { }); } +// 6784eb1 (08-20). The server serves every registered Public route pattern, +// so a slug nobody published gets the SPA and its in-shell not-found page, +// not the edge's plain-text "Not Found" (that stays for paths no route +// declares: NOT_FOUND above). for (const [route, path] of TECH_LOG_UNKNOWN_PUBLIC_PATHS) { for (const width of [360, 1440] as const) { - test(`unknown Public ${route} matches the source ${width}px response`, async ({ page }) => { + test(`unknown Public ${route} shows the in-shell not-found at ${width}px`, async ({ page }) => { await page.setViewportSize({ width, height: 1000 }); await gotoTechLog(page, path); - await expect(page.getByText("Not Found", { exact: true })).toBeVisible(); - await expect(page.locator(".site-frame")).toHaveCount(0); + await expect( + page.getByRole("heading", { level: 1, name: "페이지를 찾을 수 없습니다." }), + ).toBeVisible(); + await expect(page.locator(".site-frame")).toHaveCount(1); await expect(page).toHaveScreenshot(`tech-log-unknown-${route}-${width}.png`, { fullPage: true, });