This commit is contained in:
2026-08-13 09:48:51 +08:00
parent 3366c58a5e
commit d765bd4340
10 changed files with 799 additions and 27 deletions
+8 -2
View File
@@ -51,7 +51,7 @@ test('keeps only implemented navigation groups visible', () => {
{ title: '业务总览', children: undefined },
{
title: '头程物流',
children: ['订单列表'],
children: ['订单列表', '快速下单'],
},
{
title: '财务结算',
@@ -82,6 +82,7 @@ test('flattens visible leaves with unique paths', () => {
assert.deepEqual(paths, [
'/',
'/orders/first-leg',
'/first-leg/quick-order',
'/finance/bills',
'/company/profile',
'/organization/members',
@@ -298,7 +299,7 @@ test('keeps the dashboard route permission synchronized with navigation', () =>
assert.match(dashboardRoute, /permission: 'dashboard:view'/)
})
test('keeps every prototype view cataloged with permission metadata but unreleased', () => {
test('keeps prototype views cataloged while allowing the implemented quick-order page', () => {
const routerSource = [
'first-leg',
'cross-border',
@@ -321,6 +322,11 @@ test('keeps every prototype view cataloged with permission metadata but unreleas
]
for (const [path, view] of routes) {
if (path === 'first-leg/quick-order') {
assert.match(routerSource, new RegExp(`path: '${path}'[\\s\\S]*?\\./views/${view.replace('.', '\\.')}[\\s\\S]*?release: 'active'[\\s\\S]*?permission:`))
assert.equal(getNavigationLeaves(clientNavigation).some((item) => item.path === `/${path}`), true)
continue
}
assert.match(routerSource, new RegExp(`path: '${path}'[\\s\\S]*?\\./views/${view.replace('.', '\\.')}[\\s\\S]*?release: 'prototype'[\\s\\S]*?permission:`))
assert.equal(getNavigationLeaves(clientNavigation).some((item) => item.path === `/${path}`), false)
}