fix(orders): display unknown pooled freight facts without defaults

This commit is contained in:
2026-10-07 19:44:42 +08:00
parent ba6d0ff13f
commit e4e78796a1
5 changed files with 35 additions and 3 deletions
@@ -107,4 +107,12 @@ describe('platform overseas business API adapter', () => {
expect(overseas.post).not.toHaveBeenCalled()
expect(overseas.put).not.toHaveBeenCalled()
})
it('preserves unknown pool pallet service and container type in list and detail responses', async () => {
const summary = { ...looseboardSummary, palletRequired: null, containerType: null }
overseas.get.mockResolvedValueOnce(envelope({ records: [summary], total: 1, page: 1, size: 20, pages: 1 })).mockResolvedValueOnce(envelope({ summary, histories: [] }))
expect((await listLocalLooseboardOrders({})).records[0]).toMatchObject({ palletRequired: null, containerType: null })
expect(await getLocalLooseboardOrder('LB-1', '10003')).toMatchObject({ palletRequired: null, containerType: null })
expect(overseas.get).toHaveBeenCalledTimes(2)
})
})