test: prove TechLog UI migration parity
This commit is contained in:
@@ -360,20 +360,25 @@ describe("TechLog Public not-found runtime", () => {
|
||||
["TECH_LOG_PROJECT_RECORDS" as const, "/projects/missing-project/records"],
|
||||
["TECH_LOG_RELEASE" as const, "/releases/9.9.9"],
|
||||
["TECH_LOG_CASE" as const, "/cases/not-registered"],
|
||||
["NOT_FOUND" as const, "/definitely-not-a-product-route"],
|
||||
])("renders exact in-shell Public fallback copy for %s", (routeId, path) => {
|
||||
])("renders the source-compatible plain fallback for %s", async (routeId, path) => {
|
||||
const { container, router } = renderPublicRoute(routeId, path);
|
||||
|
||||
expect(router.state.location.pathname).toBe(path);
|
||||
expect(screen.getByRole("heading", { level: 1, name: "404" })).toHaveClass(
|
||||
"next-error-h1",
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("heading", { level: 2, name: "This page could not be found." }),
|
||||
).toBeVisible();
|
||||
expect(await screen.findByText("Not Found", { exact: true })).toBeVisible();
|
||||
expect(
|
||||
screen.queryByRole("heading", { name: "화면을 표시하지 못했습니다." }),
|
||||
).not.toBeInTheDocument();
|
||||
expect(container.querySelector(".site-frame")).not.toBeNull();
|
||||
expect(container.querySelector(".site-frame")).toBeNull();
|
||||
});
|
||||
|
||||
it("renders the source-compatible plain fallback for the Public catch-all", () => {
|
||||
const { container, router } = renderPublicRoute(
|
||||
"NOT_FOUND",
|
||||
"/definitely-not-a-product-route",
|
||||
);
|
||||
|
||||
expect(router.state.location.pathname).toBe("/definitely-not-a-product-route");
|
||||
expect(screen.getByText("Not Found", { exact: true })).toBeVisible();
|
||||
expect(container.querySelector(".site-frame")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user