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
13 changed files with 63 additions and 18 deletions
16
frontend/packages/swarm-ui/test/lazy-open.test.mjs
Normal file
16
frontend/packages/swarm-ui/test/lazy-open.test.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// A folded card fetches nothing until first opened. Run by `npm test`.
|
||||
import assert from "node:assert/strict";
|
||||
import { test } from "node:test";
|
||||
import { builtAfterToggle } from "../src/pages/agents/lazy-open.ts";
|
||||
|
||||
test("a card nobody opened is not built", () => {
|
||||
assert.equal(builtAfterToggle(false, false), false);
|
||||
});
|
||||
|
||||
test("the first open builds it", () => {
|
||||
assert.equal(builtAfterToggle(false, true), true);
|
||||
});
|
||||
|
||||
test("closing it afterwards keeps it built", () => {
|
||||
assert.equal(builtAfterToggle(true, false), true);
|
||||
});
|
||||
Loading…
Reference in a new issue