33 lines
1010 B
TypeScript
33 lines
1010 B
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();
|
|
|
|
await expect(
|
|
page.getByRole("heading", { name: protectedRoute.title }),
|
|
).toBeVisible();
|
|
await expect(page.getByText("인증됨")).toBeVisible();
|
|
});
|