Files
archie/ui/test/page-copy.test.ts
T
sam b5c98a0ccc fix(webui): the legacy config catalog stops advertising fields the control plane owns
skills_dir, plugin_dir, secret_engine_dir and containers.* were listed as
editable in /api/config's schema while the plugin-settings and
container-runtime-policies resources own those values at runtime; nothing
could save them there. Drop them from the catalog, and delete the settings
components that rendered the catalog, none of which any page used.
2026-09-25 15:29:31 +10:00

42 lines
1.3 KiB
TypeScript

import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test from "node:test";
test("page headings do not narrate their own labels", async () => {
const header = await readFile(
new URL("../src/base/PageHeader.vue", import.meta.url),
"utf8",
);
assert.doesNotMatch(header, /subtitle/);
});
test("labeled navigation does not repeat itself in tooltips", async () => {
for (const path of [
"../src/components/topbar/Nav.vue",
"../src/components/topbar/NavItem.vue",
]) {
const source = await readFile(new URL(path, import.meta.url), "utf8");
assert.doesNotMatch(source, /Tooltip(Content|Trigger)?/u, path);
}
});
test("Status shows runtime state instead of configuration summaries", async () => {
const page = await readFile(
new URL("../src/settings/SystemStatusPage.vue", import.meta.url),
"utf8",
);
assert.match(page, /HealthStatusCard/);
assert.doesNotMatch(
page,
/ReadOnlyNotice|ConfigSections|ProvenanceCard|UpdateStatusCard|UpdateActionsCard/,
);
});
test("Task settings shows settings instead of lifecycle reference data", async () => {
const page = await readFile(
new URL("../src/settings/SystemTasksPage.vue", import.meta.url),
"utf8",
);
assert.doesNotMatch(page, /LifecycleCard|ReadOnlyNotice/);
});