Files
corp-v1-3darch-documentation/tests/portal-contract.test.mjs
T
jarvis-at-skic c84a10cc47
Build and publish 3D Architecture Wizzard documentation / build (push) Failing after 4s
feat: launch 3d architecture documentation portal
2026-08-31 10:24:07 +00:00

28 lines
1.8 KiB
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import {readFileSync, existsSync} from 'node:fs';
const read = (path) => readFileSync(path, 'utf8');
test('portal identity and exact navigation contract', () => {
const config = read('docusaurus.config.ts');
assert.match(config, /title: '3D Architecture Wizzard'/);
assert.match(config, /baseUrl: '\/corp-v1-3darch\/corp-v1-3darch-documentation\/'/);
const labels = [...config.matchAll(/label: '(User Tutorial|Scope|Architecture|Kanban|Ways Of Working|Engineering|Glossary)'/g)].map(m=>m[1]);
assert.deepEqual(labels.slice(0,7), ['User Tutorial','Scope','Architecture','Kanban','Ways Of Working','Engineering','Glossary']);
assert.ok(config.includes("hashed: 'filename'"));
});
test('each area has a dedicated sidebar and required ordering', () => {
for (const file of ['sidebars.ts','sidebarsScope.ts','sidebarsArchitecture.ts','sidebarsKanban.ts','sidebarsWaysOfWorking.ts','sidebarsEngineering.ts','sidebarsGlossary.ts']) assert.ok(existsSync(file), file);
assert.ok(read('sidebarsKanban.ts').indexOf("'board'") < read('sidebarsKanban.ts').indexOf("'focus'"));
assert.ok(read('sidebarsGlossary.ts').indexOf("'terms'") < read('sidebarsGlossary.ts').indexOf("'project-language'"));
});
test('homepage publishes the required delivery record', () => {
const home = read('src/pages/index.tsx');
for (const marker of ['3DARCH-PORTAL-KICKOFF-2026-08-31','interactive 3D application','Navigable browser POC','Linas · 3darch team','Application repository','Board record','README','Project skill']) assert.ok(home.includes(marker), marker);
});
test('sharp light and dark UI contract is explicit', () => {
const css = read('src/css/custom.css');
assert.match(css, /\*,\*::before,\*::after\{border-radius:0!important\}/);
assert.match(css, /\[data-theme='dark'\]/);
});