Merge PR #5: rename and reorder Architecture menu
Build and publish Corp v1 Board portal / build (push) Successful in 1m52s
Build and publish Corp v1 Board portal / build (push) Successful in 1m52s
Exact-head portal validation and Gitea Actions task 1350 passed.
This commit was merged in pull request #5.
This commit is contained in:
@@ -62,19 +62,19 @@ const config: Config = {
|
|||||||
navbar: {
|
navbar: {
|
||||||
title: 'CORP V1 / BOARD',
|
title: 'CORP V1 / BOARD',
|
||||||
items: [
|
items: [
|
||||||
{type: 'docSidebar', sidebarId: 'architectureHighLevelSidebar', docsPluginId: 'architecture-high-level', label: 'Architecture High Level', position: 'left'},
|
|
||||||
{type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', position: 'left'},
|
{type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
|
{type: 'docSidebar', sidebarId: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', position: 'left'},
|
{type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'boardSidebar', docsPluginId: 'board', label: 'Board', position: 'left'},
|
{type: 'docSidebar', sidebarId: 'boardSidebar', docsPluginId: 'board', label: 'Board', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'governanceSidebar', docsPluginId: 'governance', label: 'Governance', position: 'left'},
|
{type: 'docSidebar', sidebarId: 'governanceSidebar', docsPluginId: 'governance', label: 'Governance', position: 'left'},
|
||||||
|
{type: 'docSidebar', sidebarId: 'architectureHighLevelSidebar', docsPluginId: 'architecture-high-level', label: 'Architecture', position: 'left'},
|
||||||
{href: 'https://gitea.lego-cloud.eu/corp-v1/portal', label: 'Gitea ↗', position: 'right'},
|
{href: 'https://gitea.lego-cloud.eu/corp-v1/portal', label: 'Gitea ↗', position: 'right'},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
style: 'light',
|
style: 'light',
|
||||||
links: [{title: 'Registry', items: [
|
links: [{title: 'Registry', items: [
|
||||||
{label: 'Architecture High Level', to: '/architecture-high-level/context/'},
|
{label: 'Architecture', to: '/architecture-high-level/context/'},
|
||||||
{label: 'Projects', to: '/projects/'},
|
{label: 'Projects', to: '/projects/'},
|
||||||
{label: 'Teams', to: '/teams/'},
|
{label: 'Teams', to: '/teams/'},
|
||||||
{label: 'Members', to: '/members/'},
|
{label: 'Members', to: '/members/'},
|
||||||
|
|||||||
@@ -23,9 +23,15 @@ for (const section of ['projects', 'teams', 'members', 'board', 'governance']) {
|
|||||||
}
|
}
|
||||||
assert.match(config, /id:\s*'architecture-high-level'/, 'Architecture High Level docs plugin is missing');
|
assert.match(config, /id:\s*'architecture-high-level'/, 'Architecture High Level docs plugin is missing');
|
||||||
assert.match(config, /sidebarId:\s*'architectureHighLevelSidebar'/, 'Architecture High Level navbar item does not target its dedicated sidebar');
|
assert.match(config, /sidebarId:\s*'architectureHighLevelSidebar'/, 'Architecture High Level navbar item does not target its dedicated sidebar');
|
||||||
assert.match(config, /label:\s*'Architecture High Level'/, 'Architecture High Level navbar label is missing');
|
assert.match(config, /label:\s*'Architecture'/, 'Architecture navbar label is missing');
|
||||||
|
assert.doesNotMatch(config, /label:\s*'Architecture High Level'/, 'legacy Architecture High Level menu label must not remain');
|
||||||
assert.ok(existsSync(join(root, 'sidebars/architecture-high-level.ts')), 'Architecture High Level sidebar file is missing');
|
assert.ok(existsSync(join(root, 'sidebars/architecture-high-level.ts')), 'Architecture High Level sidebar file is missing');
|
||||||
|
|
||||||
|
const expectedLeftNavLabels = ['Projects', 'Teams', 'Members', 'Board', 'Governance', 'Architecture'];
|
||||||
|
const leftNavLabels = [...config.matchAll(/\{type:\s*'docSidebar',[^\n]+label:\s*'([^']+)',\s*position:\s*'left'\}/g)]
|
||||||
|
.map((match) => match[1]);
|
||||||
|
assert.deepEqual(leftNavLabels, expectedLeftNavLabels, 'Architecture must be the final left-side menu item');
|
||||||
|
|
||||||
assert.match(config, /baseUrl:\s*'\/corp-v1\/portal\/'/, 'Pages base URL must follow the renamed repository');
|
assert.match(config, /baseUrl:\s*'\/corp-v1\/portal\/'/, 'Pages base URL must follow the renamed repository');
|
||||||
assert.match(config, /projectName:\s*'portal'/, 'Docusaurus project name must be portal');
|
assert.match(config, /projectName:\s*'portal'/, 'Docusaurus project name must be portal');
|
||||||
assert.doesNotMatch(config, /sterring-commitee/, 'legacy repository name must not remain in Docusaurus config');
|
assert.doesNotMatch(config, /sterring-commitee/, 'legacy repository name must not remain in Docusaurus config');
|
||||||
|
|||||||
Reference in New Issue
Block a user