swarm-ui: repoint the HivesPage comments at HivesCard and pin the nav filter and lazy roster
This commit is contained in:
parent
70917b7dd0
commit
209a286d7c
1 changed files with 63 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// The shell's per-route layout: which paths are full-bleed. Run by `npm test`.
|
||||
import assert from "node:assert/strict";
|
||||
import { test } from "node:test";
|
||||
import { isFullBleedRoute } from "../src/shell/routes.ts";
|
||||
import { isFullBleedRoute, visibleNavItems } from "../src/shell/routes.ts";
|
||||
|
||||
test("the start page is full-bleed", () => {
|
||||
assert.equal(isFullBleedRoute("/"), true);
|
||||
|
|
@ -29,3 +29,16 @@ test("a terminal path with extra segments is not full-bleed", () => {
|
|||
assert.equal(isFullBleedRoute("/agents/iris/terminal/extra"), false);
|
||||
assert.equal(isFullBleedRoute("/agents//terminal"), false);
|
||||
});
|
||||
|
||||
const NAV = [{ href: "/agents" }, { href: "/components" }, { href: "/jobs" }];
|
||||
|
||||
test("hide developer details takes the components tab out of the nav", () => {
|
||||
assert.deepEqual(
|
||||
visibleNavItems(NAV, true).map((i) => i.href),
|
||||
["/agents", "/jobs"],
|
||||
);
|
||||
});
|
||||
|
||||
test("with it off the nav is whole again", () => {
|
||||
assert.deepEqual(visibleNavItems(NAV, false), NAV);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue