0.11.1: the arc42 examples cover all twelve sections

Numbered cards for the text sections (1.1-1.3, 2, 4, 11, 12) on the
overview, domain interfaces on the technical context, black-box
descriptions for every building block, blocks mapped to nodes in the
deployment view, crosscutting concepts on level 1, and a 1000-quality
folder with the quality tree. The example test checks each section's card.
This commit is contained in:
root-at-skic committed 2026-11-08 23:10:24 +02:00
1 parent 2ab4287f02
commit f4663c089d
23 files changed
+511 -91

No files matched your search

+12 -1
View File
@@ -29,7 +29,7 @@ function walk(dir: string, rel = ''): string[] {
// The folders each framework's examples must have, besides main.archify, registry/ and decisions/.
const FRAMEWORK_FOLDERS: Record<string, string[]> = {
c4: ['0100-context', '0200-containers', '0300-components'],
arc42: ['0300-context', '0500-building-blocks', '0600-runtime', '0700-deployment'],
arc42: ['0300-context', '0500-building-blocks', '0600-runtime', '0700-deployment', '1000-quality'],
archimate: ['0100-business', '0200-application', '0300-technology'],
};
@@ -95,6 +95,17 @@ for (const example of MODEL_EXAMPLES) {
}
// Every registry element is used by some diagram.
for (const id of registry.elements.keys()) assert.ok(used.has(id), `element ${id} is never used`);
// arc42: every text section has a card somewhere, titled with its number.
if (example.folder.startsWith('arc42-')) {
const titles = diagrams.flatMap((file) => {
const cards = parse(read(file))?.cards;
return Array.isArray(cards) ? cards.map((card: { title?: string }) => String(card?.title ?? '')) : [];
});
for (const section of ['1.1', '1.2', '1.3', '2', '3', '4', '7', '8', '10', '11', '12']) {
assert.ok(titles.some((title) => title.startsWith(`${section} `)), `${example.folder}: no card for arc42 section ${section}`);
}
}
});
}