优化
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
|
||||
const preloadSummary = {
|
||||
planId: 1900000000000000001n as unknown as string,
|
||||
containerBookingId: 1900000000000000004n as unknown as string,
|
||||
preloadNo: 'PL-001',
|
||||
containerNo: 'MSCU1234567',
|
||||
internalContainerNo: 'YG-001',
|
||||
@@ -50,6 +51,7 @@ describe('platform loading lists API', () => {
|
||||
expect(get).toHaveBeenCalledWith('/platform/v1/first-leg/loading-plans', { params: { page: 1, size: 20, keyword: 'PL' } })
|
||||
expect(result.total).toBe(1)
|
||||
expect(result.records[0]?.planId).toBe('1900000000000000001')
|
||||
expect(result.records[0]?.containerBookingId).toBe('1900000000000000004')
|
||||
expect(result.records[0]?.customers[0]?.accountId).toBe('1900000000000000002')
|
||||
})
|
||||
|
||||
@@ -58,6 +60,7 @@ describe('platform loading lists API', () => {
|
||||
const result = await getPreloadPlan('100', '300')
|
||||
|
||||
expect(result.items[0]).toMatchObject({ itemId: '11', accountId: '12', inboundId: '13', inboundDetailId: '14', productQuantity: '20' })
|
||||
expect(result.summary.containerBookingId).toBe('1900000000000000004')
|
||||
expect(result.histories[0]).toMatchObject({ historyId: '21', itemId: '11', operatorId: '22' })
|
||||
})
|
||||
|
||||
@@ -83,6 +86,7 @@ describe('platform loading lists API', () => {
|
||||
expect(get.mock.calls[0]?.[1]).toEqual({ params: { page: 1, size: 20 } })
|
||||
expect(get.mock.calls[1]?.[0]).toBe('/platform/v1/first-leg/loading-lists/100')
|
||||
expect(page.records[0]?.createdBy).toBe('9')
|
||||
expect(page.records[0]?.containerBookingId).toBe('1900000000000000004')
|
||||
expect(loaded.summary.status).toBe('COMPLETED')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user