Complete Admin interface patterns

This commit is contained in:
2026-08-03 11:30:01 +02:00
parent 6dbccd5e08
commit d428f3390a
15 changed files with 485 additions and 75 deletions
@@ -0,0 +1,39 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
const root = resolve(import.meta.dirname, "..");
const read = (path) => readFileSync(resolve(root, path), "utf8");
const overview = read("src/features/admin/AdminOverviewPanel.tsx");
const settings = read("src/features/admin/SystemSettingsPanel.tsx");
const changes = read("src/features/admin/ConfigurationChangesPanel.tsx");
const packages = read("src/features/admin/ConfigurationPackagesPanel.tsx");
const templates = read("src/features/admin/GovernanceTemplatesPanel.tsx");
const modules = read("src/features/admin/ModuleManagementPanel.tsx");
const moduleSource = read("src/module.ts");
const allSource = [overview, settings, changes, packages, templates, modules].join("\n");
for (const source of [overview, settings, changes, packages, templates, modules]) {
assert.match(source, /AdminPageLayout/);
assert.match(source, /DocumentationHelpLink/);
assert.match(source, /disabledReason|help=/);
}
for (const source of [changes, packages, templates, modules]) {
assert.match(source, /ConfirmDialog/);
}
assert.match(changes, /DataGrid/);
assert.match(packages, /ReferenceSelect/);
assert.match(packages, /manualReferences/);
assert.match(templates, /TableActionGroup/);
assert.match(modules, /StageRail/);
assert.match(modules, /ActionBlockerHint/);
assert.match(moduleSource, /version: "0\.1\.8"/);
assert.doesNotMatch(overview, /title="(?:ADMINISTRATION|GLOBAL|TENANT|GROUP|USER)"/);
assert.doesNotMatch(allSource, /window\.(alert|confirm|prompt)\s*\(/);
assert.doesNotMatch(allSource, /@govoplan\/(?!core-webui)[^"']+-webui\//);
console.log("Admin interface pattern-language checks passed.");