This commit is contained in:
2026-10-20 11:33:39 +08:00
parent d2f2ecf57a
commit 41a498657c
33 changed files with 909 additions and 88 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ describe('overseas business routes', () => {
['overseas-business/purchases/:purchaseId/edit', permission.purchaseEdit],
['overseas-business/trucks', permission.truckList],
['overseas-business/trucks/new', permission.truckCreate],
['overseas-business/trucks/:orderId', permission.truckList],
['overseas-business/trucks/:orderId/edit', permission.truckEdit],
['overseas-business/looseboards', permission.looseboardList],
['overseas-business/looseboards/new', permission.looseboardCreate],
@@ -17,10 +18,10 @@ describe('overseas business routes', () => {
])
})
it('does not invent excluded create or detail routes', () => {
it('adds the requested truck detail without opening unrelated routes', () => {
const paths = overseasBusinessRoutes.map((route) => route.path)
expect(paths).not.toContain('overseas-business/purchases/new')
expect(paths).not.toContain('overseas-business/trucks/:orderId')
expect(paths).toContain('overseas-business/trucks/:orderId')
expect(paths).not.toContain('overseas-business/looseboards/:orderId')
expect(JSON.stringify(overseasBusinessRoutes)).not.toContain('permissionAnyOf')
})