Merge remote-tracking branch 'origin/main' into feat/less-prompting-more-shipping
Build and publish Eldorado documentation / build (pull_request) Successful in 47s

This commit is contained in:
jarvis-at-skic committed 2026-10-08 17:41:24 +00:00
commit f059f4c324
13 files changed
+254 -89

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
const {chromium}=require('playwright');
const assert=require('node:assert/strict');
const fs=require('node:fs');
(async()=>{
const base=process.argv[2]||'http://127.0.0.1:4187';
const prefix='/eldorado-v1/documentation/organization/';
const departments=JSON.parse(fs.readFileSync('research/organization/department-migration.json')).departments;
const ids=['structure',...departments.map(d=>'structure/'+d.slug)];
const titles=['Structure',...departments.map(d=>d.label)];
const browser=await chromium.launch({headless:true,args:['--no-sandbox'],executablePath:process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE});
const results=[]; fs.mkdirSync('.cache/departments',{recursive:true});
try{
for(const width of [1440,390]){
const page=await browser.newPage({viewport:{width,height:900}}); const errors=[]; page.on('pageerror',e=>errors.push(e.message));
for(const [i,id] of ids.entries()){
assert.equal((await page.goto(base+prefix+id+'/',{waitUntil:'networkidle'})).status(),200);
assert.equal(await page.locator('h1').innerText(),titles[i]);
if(i){
assert.equal(await page.locator('.breadcrumbs a').filter({hasText:'Structure'}).getAttribute('href'),prefix+'structure/');
assert.equal(await page.locator('.pagination-nav__link--prev').getAttribute('href'),prefix+ids[i-1]+'/');
await page.getByRole('link',{name:'Return to Structure overview',exact:true}).click();
await page.waitForURL(base+prefix+'structure/');
await page.locator('article').getByRole('link',{name:titles[i],exact:true}).click();
await page.waitForURL(base+prefix+id+'/');
}
assert.equal(await page.locator('.pagination-nav__link--next').getAttribute('href'),prefix+(ids[i+1]||'collaboration')+'/');
assert(!await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth));
await page.screenshot({path:`.cache/departments/${width}-${id.replaceAll('/','-')}.png`,fullPage:true});
if(width<997)await page.getByRole('button',{name:'Toggle navigation bar'}).click();
const menu=page.locator('.theme-doc-sidebar-menu').filter({visible:true});
await menu.getByRole('link',{name:'Structure',exact:true}).waitFor({state:'visible'});
const category=menu.locator('.theme-doc-sidebar-item-category');
await category.getByRole('link',{name:'Product',exact:true}).waitFor({state:'visible'});
assert.deepEqual(await category.locator(':scope > ul > li > a').allTextContents(),titles.slice(1));
assert.deepEqual(await menu.locator(':scope > li > a').allTextContents(),['Collaboration','SDLC']);
const caret=category.locator(':scope > .menu__list-item-collapsible > button');
await caret.click(); await category.getByRole('link',{name:'Product',exact:true}).waitFor({state:'hidden'});
await caret.click(); await category.getByRole('link',{name:'Product',exact:true}).waitFor({state:'visible'});
const next=(i+1)%ids.length;
await menu.getByRole('link',{name:titles[next],exact:true}).click(); await page.waitForURL(base+prefix+ids[next]+'/');
await page.locator('h1').filter({hasText:titles[next]}).waitFor();
results.push({width,id,navigation:true});
}
assert.deepEqual(errors,[]);await page.close();
}
fs.writeFileSync('.cache/departments/results.json',JSON.stringify(results,null,2));
console.log('PASS: '+results.length+' desktop/mobile department contexts, real sidebar/return/list navigation, breadcrumbs, pagination and overflow');
}finally{await browser.close();}
})().catch(e=>{console.error(e);process.exit(1)});
+26
View File
@@ -0,0 +1,26 @@
import {test} from 'node:test';
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
import {createHash} from 'node:crypto';
const read=p=>readFileSync(p,'utf8');
const slugs=['product','technology','operations','marketing','finance-accounting','hr-administration'];
test('all six department bodies are preserved exactly and absent from overview',()=>{
const manifest=JSON.parse(read('research/organization/department-migration.json'));
assert.deepEqual(manifest.departments.map(d=>d.slug),slugs);
const overview=read('docs/organization/structure.mdx');
for(const d of manifest.departments){
const page=read(`docs/organization/structure/${d.slug}.mdx`);
const body=page.replace(/^---\n[\s\S]*?\n---\n/, '').split('[Return to Structure overview]')[0].trim();
assert.equal(createHash('sha256').update(body).digest('hex'),d.bodySha256,d.slug);
assert(!overview.includes(body));
assert(overview.includes(`./structure/${d.slug}.mdx`));
assert(page.includes('(../structure.mdx)'));
}
assert.deepEqual(manifest.departments.map(d=>d.rows),[2,5,4,6,3,3]);
});
test('Structure is a linked category with six direct children and preserved peers',()=>{
const sidebar=read('sidebars/organization.ts');
assert(sidebar.includes("link: {type: 'doc', id: 'structure'}"));
assert.deepEqual([...sidebar.matchAll(/'structure\/([^']+)'/g)].map(m=>m[1]),slugs);
assert(sidebar.includes("'collaboration', 'sdlc'"));
});
+3 -3
View File
@@ -43,7 +43,7 @@ test('three independent section menus and Structure first', () => {
for (const section of ['Organization', 'Strategy', 'Contribution']) assert(config.includes(`label: '${section}'`));
assert(!config.includes("label: 'Documentation'"));
assert(!config.includes("label: 'Maintainer guide'"));
assert(read('sidebars/organization.ts').includes("organizationSidebar: ['structure', 'collaboration', 'sdlc']"));
assert(read('sidebars/organization.ts').includes("link: {type: 'doc', id: 'structure'}"));
for (const section of ['organization','strategy','contribution']) assert(config.includes(`id: '${section}'`));
});
test('Archify is pinned, licensed and rebuilt, not a remote embed', () => {
@@ -83,7 +83,7 @@ test('Product owns two teams and Technology owns five separate teams', () => {
for (const [dept, count, heading, next] of [['product',2,'Product','Technology'],['technology',5,'Technology','Operations']]) {
const teams = spec.components.filter(n => n.id.startsWith(`${dept}-team-`));
assert.equal(teams.length, count);
const section = page.split(`### ${heading}\n`)[1].split(`### ${next}\n`)[0];
const section = read(`docs/organization/structure/${dept}.mdx`);
const rows = section.split('\n').filter(l => l.startsWith('| ')).slice(2);
assert.equal(rows.length, count);
for (const team of teams) {
@@ -112,7 +112,7 @@ test('departments share one row and each has delivery teams below it', () => {
assert.equal(edge.fromSide, 'bottom');
assert.equal(spec.connections.find(e => e.from === 'management' && e.to === id).toSide, 'top');
assert.deepEqual(spec.connections.filter(e => e.to === team.id).map(e => e.from), [id]);
assert(page.includes(team.label));
assert(read(`docs/organization/structure/${({finance:'finance-accounting',people:'hr-administration'})[id] || id}.mdx`).includes(team.label));
}
}
for (const [i, a] of spec.components.entries()) for (const b of spec.components.slice(i + 1)) {
+1 -1
View File
@@ -15,7 +15,7 @@ test('seven existing strategy pages and two stage overviews preserve canonical r
assert(read('sidebars/strategy.ts').includes(`'${id === 'measurement' ? 'measurement/index' : id}'`));
}
for (const teams of Object.values(model.organization)) for (const name of teams) {
assert(read('docs/organization/structure.mdx').includes(name));
assert(readdirSync('docs/organization/structure').some(file => read(`docs/organization/structure/${file}`).includes(name)));
assert(read('docs/strategy/target-operating-model.mdx').includes(name));
}
});