This commit is contained in:
2026-08-21 17:20:51 +08:00
parent 8f80b90fc4
commit 641ea7f628
47 changed files with 130068 additions and 32 deletions
+14 -6
View File
@@ -53,6 +53,10 @@ test('keeps only implemented navigation groups visible', () => {
title: '头程物流',
children: ['订单列表', '快速下单'],
},
{
title: '海外仓',
children: ['贴标申请', '仓储转运', '货物废弃', '退货换标'],
},
{
title: '财务结算',
children: ['客户账单'],
@@ -87,6 +91,10 @@ test('flattens visible leaves with unique paths', () => {
'/',
'/orders/first-leg',
'/first-leg/quick-order',
'/overseas-warehouse/labeling',
'/overseas-warehouse/storage-transfer',
'/overseas-warehouse/cargo-disposal',
'/overseas-warehouse/return-relabel',
'/finance/bills',
'/company/profile',
'/organization/members',
@@ -304,7 +312,7 @@ test('keeps the dashboard route permission synchronized with navigation', () =>
assert.match(dashboardRoute, /permission: 'dashboard:view'/)
})
test('keeps prototype views cataloged while allowing the implemented quick-order page', () => {
test('keeps prototype views cataloged while allowing implemented order and overseas warehouse pages', () => {
const routerSource = [
'first-leg',
'cross-border',
@@ -317,17 +325,17 @@ test('keeps prototype views cataloged while allowing the implemented quick-order
['cross-border/procurement', 'ProcurementView.vue'],
['cross-border/domestic-trucking', 'DomesticTruckingView.vue'],
['cross-border/pallet-shipping', 'PalletShippingView.vue'],
['overseas-warehouse/labeling', 'LabelingView.vue'],
['overseas-warehouse/return-inbound', 'ReturnInboundView.vue'],
['overseas-warehouse/return-relabel', 'ReturnRelabelView.vue'],
['overseas-warehouse/return-outbound', 'ReturnOutboundView.vue'],
['overseas-warehouse/labeling', 'WarehouseServiceView.vue'],
['overseas-warehouse/storage-transfer', 'WarehouseServiceView.vue'],
['overseas-warehouse/cargo-disposal', 'WarehouseServiceView.vue'],
['overseas-warehouse/return-relabel', 'WarehouseServiceView.vue'],
['orders/my', 'MyOrdersView.vue'],
['orders/inbound', 'InboundOrdersView.vue'],
['orders/delivery', 'DeliveryOrdersView.vue'],
]
for (const [path, view] of routes) {
if (path === 'first-leg/quick-order') {
if (path === 'first-leg/quick-order' || path.startsWith('overseas-warehouse/')) {
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