fix: align appointment procurement and carpool workflows with agreed views
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { expect, it, vi } from 'vitest'
|
||||
import { http } from '@/shared/api/http'
|
||||
import { listPlanningCargo } from './planningApi'
|
||||
import { listPlanningCargo, listPlanningContainers } from './planningApi'
|
||||
vi.mock('@/shared/api/http', () => ({ http: { get: vi.fn() }, unwrapApiResponse: <T>(value: { data: T }) => value.data }))
|
||||
|
||||
it('uses the gateway planning route and preserves stable source IDs and null predictions', async () => {
|
||||
@@ -12,3 +12,11 @@ it('uses the gateway planning route and preserves stable source IDs and null pre
|
||||
expect(result.records[0]!.estimatedArrivalAt).toBeNull()
|
||||
expect(result.total).toBe(21)
|
||||
})
|
||||
|
||||
it('keeps basic container listing on its own endpoint rather than requiring impact persistence', async () => {
|
||||
vi.mocked(http.get).mockClear()
|
||||
vi.mocked(http.get).mockResolvedValue({ data: { records: [], total: '0' } })
|
||||
const result = await listPlanningContainers({ page: 1, size: 20 })
|
||||
expect(http.get).toHaveBeenCalledExactlyOnceWith('/platform/v1/last-leg/appointment-planning/containers', { params: { page: 1, size: 20 }, signal: undefined })
|
||||
expect(result.total).toBe(0)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user