2026-07-15 02:41:54 +01:00
|
|
|
import assert from "node:assert/strict";
|
|
|
|
|
import { readFileSync } from "node:fs";
|
|
|
|
|
import test from "node:test";
|
|
|
|
|
|
|
|
|
|
const source = readFileSync(new URL("./render-voidbot-swarm-dashboard.mjs", import.meta.url), "utf8");
|
|
|
|
|
|
2026-08-25 14:47:11 +02:00
|
|
|
assert.match(source, /\.\.\.process\.env/, "the resident renderer must honor daemon process configuration");
|
|
|
|
|
|
2026-07-15 02:41:54 +01:00
|
|
|
test("the operator surface is composed from metrics and typed lists", () => {
|
|
|
|
|
for (const componentId of [
|
|
|
|
|
"voidbot-status-metrics",
|
|
|
|
|
"live-queue-items",
|
|
|
|
|
"metric-route-provider",
|
|
|
|
|
"route-alerts",
|
|
|
|
|
"metric-swarm-brake",
|
2026-07-16 00:17:49 +01:00
|
|
|
"operations-items",
|
|
|
|
|
"pressure-items",
|
|
|
|
|
"pending-mention-items",
|
|
|
|
|
"recent-event-items",
|
|
|
|
|
"selected-channel-items",
|
2026-07-15 02:41:54 +01:00
|
|
|
]) assert.match(source, new RegExp(`\\b${componentId}\\b`));
|
|
|
|
|
|
|
|
|
|
assert.match(source, /sourceId: "voidbot\.swarm_operator_view:voidbot-swarm"/);
|
|
|
|
|
assert.match(source, /schemaId: "voidbot\.swarm_operator_view\.v1"/);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("the migrated prose authorities cannot reappear in the surface", () => {
|
|
|
|
|
for (const removedId of [
|
|
|
|
|
"voidbot-status-line",
|
|
|
|
|
"route-summary",
|
|
|
|
|
"swarm-pause-status",
|
|
|
|
|
"live-queue-empty",
|
2026-07-16 00:17:49 +01:00
|
|
|
"watchdog-organ-",
|
|
|
|
|
"pressure-face-",
|
|
|
|
|
"pending-mention-0",
|
|
|
|
|
"recent-event-0",
|
2026-07-15 02:41:54 +01:00
|
|
|
]) assert.doesNotMatch(source, new RegExp(`\\b${removedId}\\b`));
|
|
|
|
|
});
|