fix: align audit and dispatch workflows and release failed requests
This commit is contained in:
@@ -19,7 +19,7 @@ function render() {
|
||||
ElButton: { template: '<button><slot/></button>' }, CapacityOfferSettingsDialog: true,
|
||||
} } })
|
||||
}
|
||||
it('loads same-warehouse trips on demand and retries one immutable atomic preparation', async () => {
|
||||
it('loads same-warehouse trips on demand and submits a new atomic preparation after failure', async () => {
|
||||
const wrapper=render(); await flushPromises()
|
||||
expect(listTrips).not.toHaveBeenCalled()
|
||||
const select=wrapper.findComponent({ name: 'ElSelect' })
|
||||
@@ -33,7 +33,7 @@ it('loads same-warehouse trips on demand and retries one immutable atomic prepar
|
||||
expect(original).toMatchObject({ tripNo: 'TR-READY', recordVersion: 4, dispatchNos: ['DS-ONE','DS-TWO'], plan: null, vehicleId: null, driverId: null })
|
||||
expect(wrapper.emitted('saved')).toBeUndefined()
|
||||
dialog.vm.$emit('confirm'); await flushPromises()
|
||||
expect(prepareTrip).toHaveBeenNthCalledWith(2, original)
|
||||
expect(prepareTrip).toHaveBeenNthCalledWith(2, { ...original, idempotencyKey: expect.any(String) }); expect(vi.mocked(prepareTrip).mock.calls[1]![0].idempotencyKey).not.toBe(original.idempotencyKey)
|
||||
expect(wrapper.emitted('saved')).toHaveLength(1)
|
||||
expect(wrapper.text()).toContain('核对容量并发布余位')
|
||||
expect(dialog.props('showConfirm')).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user