test: cover phase 5 overseas admin flows
This commit is contained in:
@@ -39,6 +39,11 @@ describe('customer visit API', () => {
|
||||
await uploadCustomerVisitAttachment('9', '100', file)
|
||||
const body = vi.mocked(overseasHttp.post).mock.calls[0]?.[1] as FormData
|
||||
expect(body.get('file')).toBe(file)
|
||||
expect(overseasHttp.post).toHaveBeenCalledWith(
|
||||
'/platform/v1/last-leg/customer-visits/9/attachments',
|
||||
body,
|
||||
{ params: { customerId: '100' }, headers: { 'Content-Type': 'multipart/form-data' } },
|
||||
)
|
||||
|
||||
vi.mocked(overseasHttp.put).mockResolvedValue({ code: '200', data: { visit: { id: '9' }, inboundOrders: [] } })
|
||||
await saveCustomerVisit('9', '100', { selectedInboundOrderId: '7', visitResult: 'NORMAL', attachments: [] })
|
||||
|
||||
Reference in New Issue
Block a user