This commit is contained in:
2026-08-14 13:03:11 +08:00
parent f1721b2780
commit 724848feb6
7 changed files with 39 additions and 0 deletions
@@ -76,6 +76,14 @@ describe('GlobalSmartLoadingView', () => {
expect(wrapper.text()).toContain('ORD-1')
})
it('filters candidates by an active name-only customer selector and accountId', () => {
const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/GlobalSmartLoadingView.vue'), 'utf8')
expect(source).toContain("listPlatformTenants({ page: 1, size: 200, status: 'ACTIVE' })")
expect(source).toContain("customer.legalName?.trim() || customer.tenantName")
expect(source).toContain('item.accountId !== customerId')
expect(source).not.toContain('customer.tenantCode')
})
it('rounds capacity percentages and hides column settings in embedded tables', async () => {
vi.mocked(listContainers).mockResolvedValue({ records: [{ ...container, capacityCbm: 100, maxWeightKg: 100000 }], page: 1, size: 100, total: 1, pages: 1 })
vi.mocked(getSmartLoadingPlanByBooking).mockResolvedValue({