Files
archie/ui/test/dashboard-headline.test.ts
T
sam 0bc27ea6da feat(webui): needs-you first Dashboard
The header states what is running and what needs a human instead of a
greeting. A stat strip replaces the throughput tiles. The main column
opens on a Needs you queue: each waiting task with its status, title,
repository, workflow and park reason, an Open link and the actions the
server offers for it. Live activity follows; quality gates and the token
outlook move to a right rail.

A failed task-list fetch no longer reads as an empty list, which would
have told the operator nothing needs them; the header says it cannot
reach archied instead.
2026-09-25 16:25:19 +10:00

17 lines
739 B
TypeScript

import assert from "node:assert/strict";
import test from "node:test";
import { headline } from "../src/dashboard/headline.ts";
test("the headline names what is running and what needs a human", () => {
const cases: [number, number, { running: string; attention: string }][] = [
[0, 0, { running: "Nothing is running", attention: "Nothing needs you" }],
[1, 0, { running: "1 task running", attention: "Nothing needs you" }],
[4, 1, { running: "4 tasks running", attention: "1 task needs you" }],
[0, 3, { running: "Nothing is running", attention: "3 tasks need you" }],
];
for (const [running, attention, want] of cases) {
assert.deepEqual(headline(running, attention), want, `${running}/${attention}`);
}
});