优化
This commit is contained in:
@@ -50,16 +50,11 @@ describe('admin router access metadata', () => {
|
||||
expect(route?.meta.permission).toBe('platform:express:list')
|
||||
})
|
||||
|
||||
it('registers the global smart-loading route before the single-container deep link', () => {
|
||||
const route = router.getRoutes().find((item) => item.name === 'global-smart-loading-workbench')
|
||||
const moduleChildren = router.options.routes.find((item) => item.path === '/')?.children || []
|
||||
const globalIndex = moduleChildren.findIndex((item) => item.name === 'global-smart-loading-workbench')
|
||||
const detailIndex = moduleChildren.findIndex((item) => item.name === 'smart-loading-workbench')
|
||||
|
||||
expect(route?.path).toBe('/container-loading/smart-loading')
|
||||
expect(route?.meta.permission).toBe('platform:firstleg:smart-loading:list')
|
||||
expect(globalIndex).toBeGreaterThanOrEqual(0)
|
||||
expect(detailIndex).toBeGreaterThan(globalIndex)
|
||||
it('keeps smart loading as an order dialog while retaining the single-container deep link', () => {
|
||||
expect(router.getRoutes().some((item) => item.name === 'global-smart-loading-workbench')).toBe(false)
|
||||
const detail = router.getRoutes().find((item) => item.name === 'smart-loading-workbench')
|
||||
expect(detail?.path).toBe('/container-loading/:containerId/smart-loading')
|
||||
expect(detail?.meta.permission).toBe('platform:firstleg:smart-loading:list')
|
||||
})
|
||||
|
||||
it('registers the retained phase-three service center routes with stable permissions', () => {
|
||||
|
||||
Reference in New Issue
Block a user