This commit is contained in:
2026-08-04 13:32:08 +08:00
parent 6354f5ca66
commit 2192aed125
17 changed files with 711 additions and 354 deletions
@@ -50,6 +50,21 @@ describe('platform first-leg order API', () => {
})
})
it('normalizes string pagination fields returned by the gateway', async () => {
vi.mocked(http.get).mockResolvedValue({
code: '200',
message: 'success',
data: { records: [], page: '1', size: '20', total: '6', pages: '1' },
})
await expect(listPlatformFirstLegOrders({ status: 'SUBMITTED', page: 1, size: 20 })).resolves.toMatchObject({
page: 1,
size: 20,
total: 6,
pages: 1,
})
})
it('uses the platform lifecycle routes and target tenant query parameter', async () => {
vi.mocked(http.get).mockResolvedValue({ code: '200', message: 'success', data: { order: {} } })
vi.mocked(http.post).mockResolvedValue({ code: '200', message: 'success', data: null })