feat(phase3): complete loading workbenches

This commit is contained in:
2026-08-10 17:42:17 +08:00
parent 820432a381
commit 1595fbcae2
34 changed files with 1352 additions and 159 deletions
+12
View File
@@ -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')