This commit is contained in:
2026-08-26 15:48:34 +08:00
parent d03f7b3f5d
commit fac3153472
20 changed files with 917 additions and 23 deletions
+13 -2
View File
@@ -18,6 +18,7 @@ describe('adminNavigation', () => {
'货柜管理',
'海外业务',
'海外仓',
'客户服务',
'财务管理',
'销售管理',
'通用',
@@ -34,7 +35,7 @@ describe('adminNavigation', () => {
'库位管理',
'整柜业务',
])
expect(adminNavigation.find((item) => item.key === 'service-center')).toBeUndefined()
expect(adminNavigation.find((item) => item.key === 'customer-service')?.children?.map((item) => item.title)).toEqual(['异常订单', '客户回访'])
expect(adminNavigation.find((item) => item.key === 'supplier-center')?.children?.map((item) => item.title)).toEqual([
'供应商列表',
'快递公司',
@@ -51,6 +52,8 @@ describe('adminNavigation', () => {
'尾程订单',
'入库单',
'排车列表',
'出库单',
'派送单列表',
'换标单',
'托盘管理',
'库存管理',
@@ -141,6 +144,10 @@ describe('adminNavigation', () => {
'platform:overseas-warehouse:last-mile-order:list',
'platform:overseas-warehouse:inbound-order:list',
'platform:overseas-warehouse:dispatch:list',
'platform:overseas-warehouse:outbound:list',
'platform:overseas-warehouse:delivery:list',
'platform:overseas-warehouse:exception-order:list',
'platform:overseas-warehouse:customer-visit:list',
'platform:overseas-warehouse:relabel-order:list',
'platform:overseas-warehouse:pallet:list',
'platform:overseas-warehouse:inventory:list',
@@ -157,6 +164,10 @@ describe('adminNavigation', () => {
'/overseas-warehouse/last-mile-orders',
'/overseas-warehouse/inbound-orders',
'/overseas-warehouse/dispatches',
'/overseas-warehouse/outbounds',
'/overseas-warehouse/delivery-orders',
'/overseas-warehouse/exception-orders',
'/overseas-warehouse/customer-visits',
'/overseas-warehouse/relabel-orders',
'/overseas-warehouse/pallets',
'/overseas-warehouse/inventory',
@@ -169,7 +180,7 @@ describe('adminNavigation', () => {
]))
expect(paths).not.toContain('/overseas-warehouse/cartons')
expect(paths).not.toContain('/overseas-warehouse/products')
expect(paths.some((path) => path.includes('outbound') || path.includes('delivery'))).toBe(false)
expect(paths).toEqual(expect.arrayContaining(['/overseas-warehouse/outbounds', '/overseas-warehouse/delivery-orders']))
})
it('filters protected pages without mutating the source tree', () => {