59 lines
2.0 KiB
TypeScript
59 lines
2.0 KiB
TypeScript
import { expect, test } from "../support/browser/strict-browser-test.ts";
|
|
import { SERVER_STATE_PROFILES } from "../../src/contracts/server-state.ts";
|
|
import { ROUTE_REGISTRY } from "../../src/features/installed-feature-contracts.ts";
|
|
|
|
/**
|
|
* The overview is a projection of the installed registries. These assertions
|
|
* read the same registries the shipped bundle was built from, so they keep
|
|
* meaning after a feature is added or removed.
|
|
*/
|
|
|
|
test("projects the installed route registry into the shipped bundle", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/examples/platform");
|
|
await expect(
|
|
page.getByRole("heading", { name: "플랫폼 구성", level: 1 }),
|
|
).toBeVisible();
|
|
|
|
const table = page.getByRole("table", { name: "설치된 라우트 목록" });
|
|
await expect(table.locator("tbody tr")).toHaveCount(
|
|
Object.keys(ROUTE_REGISTRY).length,
|
|
);
|
|
for (const routeId of Object.keys(ROUTE_REGISTRY)) {
|
|
await expect(table.getByText(routeId, { exact: true })).toBeVisible();
|
|
}
|
|
});
|
|
|
|
test("shows every fixed server-state profile", async ({ page }) => {
|
|
await page.goto("/examples/platform");
|
|
|
|
const table = page.getByRole("table", { name: "서버 상태 프로파일" });
|
|
await expect(table.locator("tbody tr")).toHaveCount(
|
|
Object.keys(SERVER_STATE_PROFILES).length,
|
|
);
|
|
});
|
|
|
|
test("states the release contract identity verified at boot", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/examples/platform");
|
|
|
|
const release = page.locator(
|
|
"section[aria-labelledby='platform-release-title']",
|
|
);
|
|
await expect(release.getByText(/^sha256:/)).toBeVisible();
|
|
});
|
|
|
|
test("reports an unselected capability without claiming it was disabled", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/examples/platform");
|
|
|
|
const capabilities = page.locator(
|
|
"section[aria-labelledby='platform-capabilities-title']",
|
|
);
|
|
await expect(capabilities.getByText("미선택")).toHaveCount(4);
|
|
await expect(capabilities.getByText("운영자가 비활성화함")).toHaveCount(0);
|
|
});
|