Initial curated Unraid-AppOps-Gateway source from 3bd6f6fee310125bfbb4d4650389a817f498724d

This commit is contained in:
Public Source Publisher committed 2026-10-01 01:35:57 +02:00
commit 1dfbca08a1
528 files changed
+131054

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { describe, it } from "node:test";
const shell = readFileSync(new URL("../components/AppShell.tsx", import.meta.url), "utf8");
const banner = readFileSync(new URL("../components/OperatorReadOnlyBanner.tsx", import.meta.url), "utf8");
const styles = readFileSync(new URL("../globals.css", import.meta.url), "utf8");
const notifications = readFileSync(new URL("../pages/Notifications.tsx", import.meta.url), "utf8");
describe("accessible operator shell", () => {
it("offers a keyboard-visible skip link to the focusable main landmark", () => {
assert.match(shell, /href="#main-content"/);
assert.match(shell, /<main id="main-content" tabIndex=\{-1\}/);
assert.match(styles, /\.app-skip-link:focus/);
});
it("announces read-only state without claiming the status data is locked", () => {
assert.match(banner, /role="status" aria-live="polite"/);
assert.match(banner, /Read-only modus/);
assert.match(banner, /Operatorsessie ontgrendelen/);
});
it("keeps notification mutations and write-only channel fields locked without an operator session", () => {
assert.match(notifications, /const unlocked = useOperatorSession\(\)/);
assert.match(notifications, /disabled=\{!unlocked \|\| working !== null\}/);
assert.match(notifications, /disabled=\{!unlocked\} className="border-slate-800 bg-slate-950 text-slate-100"/);
});
});