test: cover phase 5 overseas admin flows

This commit is contained in:
2026-09-01 19:57:36 +08:00
parent 440cae9c6d
commit a5d4b7d54a
8 changed files with 392 additions and 3 deletions
@@ -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: [] })