test(overseas): cover list search interactions
This commit is contained in:
@@ -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('尾程订单加载失败')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user