优化
This commit is contained in:
@@ -14,7 +14,6 @@ describe('adminNavigation', () => {
|
||||
'客户管理',
|
||||
'国内仓',
|
||||
'海外派送',
|
||||
'服务中心',
|
||||
'供应商中心',
|
||||
'货柜管理',
|
||||
'海外业务',
|
||||
@@ -36,19 +35,15 @@ describe('adminNavigation', () => {
|
||||
'库位管理',
|
||||
'托盘管理',
|
||||
])
|
||||
expect(adminNavigation.find((item) => item.key === 'service-center')?.children?.map((item) => item.title)).toEqual([
|
||||
'订舱列表',
|
||||
'船期信息',
|
||||
'拖车列表',
|
||||
'报关协同',
|
||||
'国内出仓',
|
||||
])
|
||||
expect(adminNavigation.find((item) => item.key === 'service-center')).toBeUndefined()
|
||||
expect(adminNavigation.find((item) => item.key === 'supplier-center')?.children?.map((item) => item.title)).toEqual([
|
||||
'供应商列表',
|
||||
'快递公司',
|
||||
'往来单位',
|
||||
])
|
||||
expect(adminNavigation.find((item) => item.key === 'container-management')?.children?.map((item) => item.title)).toEqual([
|
||||
'订舱列表',
|
||||
'拖车列表',
|
||||
'货柜列表',
|
||||
'智能装柜',
|
||||
'预装清单',
|
||||
@@ -103,9 +98,9 @@ describe('adminNavigation', () => {
|
||||
expect(paths).toContain('/container-loading/smart-loading')
|
||||
expect(paths).toContain('/loading-plans')
|
||||
expect(paths).toContain('/loading-lists')
|
||||
expect(paths).toContain('/port-schedules')
|
||||
expect(paths).toContain('/customs')
|
||||
expect(paths).toContain('/outbound-dispatches')
|
||||
expect(paths).not.toContain('/port-schedules')
|
||||
expect(paths).not.toContain('/customs')
|
||||
expect(paths).not.toContain('/outbound-dispatches')
|
||||
expect(paths).not.toContain('/prototype/container-management/container-list')
|
||||
expect(paths).not.toContain('/prototype/container-management/preload-list')
|
||||
expect(paths).not.toContain('/prototype/container-management/manifest')
|
||||
@@ -209,7 +204,7 @@ describe('adminNavigation', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('shows each phase-three service center entry only with its matching permission', () => {
|
||||
it('shows only the prototype-backed phase-three service center entries', () => {
|
||||
const filtered = filterAdminNavigation(adminNavigation, new Set([
|
||||
'platform:firstleg:ocean-booking:list',
|
||||
'platform:firstleg:port-schedule:list',
|
||||
@@ -221,10 +216,7 @@ describe('adminNavigation', () => {
|
||||
expect(getNavigationLeaves(filtered).map((item) => item.path)).toEqual([
|
||||
'/dashboard',
|
||||
'/ocean-bookings',
|
||||
'/port-schedules',
|
||||
'/trucking',
|
||||
'/customs',
|
||||
'/outbound-dispatches',
|
||||
])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user