Files
clean-architecture-frontend…/tests/e2e/reference-route.spec.ts
DongHyeonka 87aebf47df test(e2e): 참조 라우트 e2e가 한국어 목록 제목을 기다린다 (0929/08-02)
문제: 855d22a가 ko-KR 샘플 문구를 한국어로 바꿔 목록 h1이 "참조 기능"이
됐다. reference-route.spec.ts는 h1이 route 제목("Reference feature")과
같다고 기대해 세 엔진 모두 실패했다. 화면은 정상이었다(같은 실행의
스크린샷에 h1, 인증됨, 모의 행이 모두 보인다). 그 수정 때 e2e를 돌리지
않아 놓쳤다.

방법: reference-form.spec.ts처럼 h1 문구를 직접 적는다. route 제목은
아직 catalog 밖 영어라(08-06 몫) h1과 같지 않다.
버린 대안: catalog에서 문구를 import — 다른 e2e와 방식이 갈린다.

검증: playwright test tests/e2e/reference-route.spec.ts — chromium·
firefox·webkit 3 passed. 전체 test:e2e는 이 한 건 외 184 passed.
2026-11-03 07:17:42 +09:00

37 lines
1.3 KiB
TypeScript

import { expect, test } from "../support/browser/strict-browser-test.ts";
import { ROUTE_REGISTRY } from "../../src/features/installed-feature-contracts.ts";
test("opens the protected integration route through the local demo seam", async ({
page,
}) => {
const protectedRoute = ROUTE_REGISTRY.REFERENCE_RESOURCE_LIST;
await page.route(
"http://localhost:8080/api/reference-resources?*",
(route) =>
route.fulfill({
json: [
{
id: "browser-reference",
name: "Browser reference",
createdAt: "2026-07-26T00:00:00.000Z",
},
],
}),
);
await page.goto(protectedRoute.path);
await expect(
page.getByRole("heading", { name: "세션이 필요합니다." }),
).toBeVisible();
await page.getByRole("button", { name: "로그인 시작" }).click();
// The h1 comes from the ko-KR message catalog, not the route title (0929/08-02).
await expect(
page.getByRole("heading", { level: 1, name: "참조 기능" }),
).toBeVisible();
// The closed menu drawer holds a second copy of the status (08-01).
await expect(page.getByRole("banner").getByText("인증됨")).toBeVisible();
// The mocked row went through the production codec, mapper and query cache.
await expect(page.getByText("Browser reference")).toBeVisible();
});