feat(ui): start tasks from the dashboard and slim it to activity and setup
This commit is contained in:
23 files changed
+297
-487
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { filterActivity, matchesActivityFilter } from "../src/dashboard/activity-filter.ts";
|
||||
import { passBar, type PassBar } from "../src/dashboard/pass-bar.ts";
|
||||
|
||||
const feed = [
|
||||
{ kind: "task_started", task_id: 41 },
|
||||
@@ -25,15 +24,3 @@ test("activity filters partition task and system events without reordering", ()
|
||||
assert.equal(matchesActivityFilter({ task_id: "7" }, "tasks"), true);
|
||||
});
|
||||
|
||||
test("gate bars show the delivered share and keep zero-pass failures visible", () => {
|
||||
const cases: Array<[number, number, PassBar]> = [
|
||||
[3, 3, { pct: 100, kind: "ok", track: "idle" }],
|
||||
[1, 4, { pct: 25, kind: "danger", track: "danger" }],
|
||||
[0, 3, { pct: 0, kind: "danger", track: "danger" }],
|
||||
[0, 0, { pct: 0, kind: "idle", track: "idle" }],
|
||||
[4, 3, { pct: 100, kind: "ok", track: "idle" }],
|
||||
];
|
||||
for (const [delivered, runs, expected] of cases) {
|
||||
assert.deepEqual(passBar(delivered, runs), expected, `${delivered}/${runs}`);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user