费用优化
This commit is contained in:
@@ -5,6 +5,7 @@ import { overseasBusinessRoutes } from './routes'
|
||||
describe('overseas business routes', () => {
|
||||
it('keeps the frozen paths and permissions', () => {
|
||||
expect(overseasBusinessRoutes.map((route) => [route.path, route.meta?.permission])).toEqual([
|
||||
['overseas-business/fees', 'platform:overseas-fee:list'],
|
||||
['overseas-business/purchases', permission.purchaseList],
|
||||
['overseas-business/purchases/:purchaseId', permission.purchaseList],
|
||||
['overseas-business/purchases/:purchaseId/edit', permission.purchaseEdit],
|
||||
@@ -14,15 +15,16 @@ describe('overseas business routes', () => {
|
||||
['overseas-business/trucks/:orderId/edit', permission.truckEdit],
|
||||
['overseas-business/looseboards', permission.looseboardList],
|
||||
['overseas-business/looseboards/new', permission.looseboardCreate],
|
||||
['overseas-business/looseboards/:orderId', permission.looseboardList],
|
||||
['overseas-business/looseboards/:orderId/edit', permission.looseboardEdit],
|
||||
])
|
||||
})
|
||||
|
||||
it('adds the requested truck detail without opening unrelated routes', () => {
|
||||
it('opens both transport document details without granting edit access', () => {
|
||||
const paths = overseasBusinessRoutes.map((route) => route.path)
|
||||
expect(paths).not.toContain('overseas-business/purchases/new')
|
||||
expect(paths).toContain('overseas-business/trucks/:orderId')
|
||||
expect(paths).not.toContain('overseas-business/looseboards/:orderId')
|
||||
expect(paths).toContain('overseas-business/looseboards/:orderId')
|
||||
expect(JSON.stringify(overseasBusinessRoutes)).not.toContain('permissionAnyOf')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user