fix(admin): complete container loading workflows
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
completeLoading,
|
||||
confirmingPreload,
|
||||
deleteSmartLoadingItem,
|
||||
downloadEvidenceFile,
|
||||
getContainerBooking,
|
||||
getOutboundDispatch,
|
||||
getPicking,
|
||||
@@ -86,6 +87,13 @@ describe('unified order workflow API contract', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('downloads loading evidence through the tenant and inbound scoped file endpoint', async () => {
|
||||
const blob = new Blob(['photo'], { type: 'image/jpeg' })
|
||||
vi.mocked(http.get).mockResolvedValue(blob)
|
||||
await expect(downloadEvidenceFile('2', '8', '88')).resolves.toBe(blob)
|
||||
expect(http.get).toHaveBeenCalledWith('/platform/v1/files/loading-evidence/2/8/88', { responseType: 'blob' })
|
||||
})
|
||||
|
||||
it('normalizes smart-loading long identifiers as strings', async () => {
|
||||
vi.mocked(http.get)
|
||||
.mockResolvedValueOnce({ data: { id: '2086085512165634050', warehouseId: '2086085512165634051', capacityCbm: '68', maxWeightKg: '25000', version: 2 } })
|
||||
|
||||
Reference in New Issue
Block a user