优化
This commit is contained in:
@@ -129,6 +129,14 @@ describe('ContainersView', () => {
|
||||
expect(push).toHaveBeenNthCalledWith(3, { name: 'loading-lists', query: { planId: '9103', warehouseId: '8' } })
|
||||
})
|
||||
|
||||
it('uses active customer names and sends the stable customerId filter', () => {
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8')
|
||||
expect(source).toContain("listPlatformTenants({ page: 1, size: 200, status: 'ACTIVE' })")
|
||||
expect(source).toContain("customer.legalName?.trim() || customer.tenantName")
|
||||
expect(source).toContain('customerId: applied.value.customerId || undefined')
|
||||
expect(source).not.toContain('customer.tenantCode')
|
||||
})
|
||||
|
||||
it('uses the list permission for detail while keeping edit independent', async () => {
|
||||
accessCan.mockImplementation((permission: string) => permission === 'platform:firstleg:container:list')
|
||||
const router = createTestRouter()
|
||||
|
||||
Reference in New Issue
Block a user