feat(phase3): complete loading workbenches
This commit is contained in:
@@ -51,6 +51,18 @@ 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('protects counterparty records with a stable master-data permission', () => {
|
||||
const route = router.getRoutes().find((item) => item.name === 'counterparties')
|
||||
expect(route?.path).toBe('/master-data/counterparties')
|
||||
|
||||
Reference in New Issue
Block a user