Replace swarm prose with live operator components
This commit is contained in:
parent
6357cfcded
commit
b53abf52f5
2 changed files with 59 additions and 27 deletions
27
scripts/voidbot-swarm-structured-surface.test.mjs
Normal file
27
scripts/voidbot-swarm-structured-surface.test.mjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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");
|
||||
|
||||
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",
|
||||
]) 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",
|
||||
]) assert.doesNotMatch(source, new RegExp(`\\b${removedId}\\b`));
|
||||
});
|
||||
Loading…
Reference in a new issue