Add registry kind indexes and entity pages.
CONTENT-WP-0002-T02 reads kinds from each snapshot and serves both example dataspaces without oncology imports. Assistant: grok Assistant-Session: 01a1346c-fdff-7741-b1af-b7283661554b
This commit is contained in:
parent
a6e360aaa5
commit
e16aa03393
21 changed files with 608 additions and 59 deletions
26
ui/components/EntityDetail.test.tsx
Normal file
26
ui/components/EntityDetail.test.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { findEntity, findKind } from "@/lib/catalog";
|
||||
import { EntityDetail } from "./EntityDetail";
|
||||
import { KindIndex } from "./KindIndex";
|
||||
|
||||
describe("kind and detail views", () => {
|
||||
it("renders the registry plural and a linked record", () => {
|
||||
const kind = findKind("software-architecture", "concept");
|
||||
expect(kind).not.toBeNull();
|
||||
const html = renderToStaticMarkup(<KindIndex kind={kind!} />);
|
||||
expect(html).toContain(">Concepts<");
|
||||
expect(html).toContain("Coupling");
|
||||
expect(html).toContain('href="/software-architecture/concept/coupling/"');
|
||||
});
|
||||
|
||||
it("renders the entity title, an unknown claim, and a neighbour", () => {
|
||||
const entity = findEntity("systems-thinking", "concept", "system-boundary");
|
||||
expect(entity).not.toBeNull();
|
||||
const html = renderToStaticMarkup(<EntityDetail entity={entity!} />);
|
||||
expect(html).toContain(">System boundary<");
|
||||
expect(html).toContain("formal-measure");
|
||||
expect(html).toContain("unknown");
|
||||
expect(html).toContain("Stock and flow model");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue