test(overseas): cover list search interactions

This commit is contained in:
2026-09-07 11:15:37 +08:00
parent 33e72927f9
commit 116f5dc494
11 changed files with 124 additions and 27 deletions
@@ -154,6 +154,13 @@ describe('LastMileOrdersView pending order and container conversion', () => {
await wrapper.findAll('.el-radio-button').find((item) => item.text() === '全部')!.trigger('click')
await flushPromises()
expect(listLastMileOrders).toHaveBeenLastCalledWith(expect.objectContaining({ currentStatus: 'DELIVERED', lxCode: 'LX-SEARCH' }))
const callsBeforeReset = vi.mocked(listLastMileOrders).mock.calls.length
;(toolbar.vm as unknown as { reset(): void }).reset()
await flushPromises()
expect(vi.mocked(listLastMileOrders).mock.calls).toHaveLength(callsBeforeReset + 1)
expect(listLastMileOrders).toHaveBeenLastCalledWith(expect.objectContaining({ page: 1 }))
expect(vi.mocked(listLastMileOrders).mock.calls.at(-1)?.[0].lxCode).toBeUndefined()
expect(wrapper.text()).not.toContain('尾程订单加载失败')
})