fix: align audit and dispatch workflows and release failed requests
This commit is contained in:
@@ -63,7 +63,7 @@ it('reopens saved negotiated price in a fresh numeric control while retaining it
|
||||
expect(wrapper.text()).toContain('来源单价:16.00 USD')
|
||||
expect(wrapper.text()).toContain('约定运费:18.00 USD')
|
||||
})
|
||||
it('keeps inquiry estimates and contacts optional and retries the same uncertain create command', async () => {
|
||||
it('keeps inquiry estimates and contacts optional and submits a fresh create command after failure', async () => {
|
||||
vi.mocked(api.createTripBooking).mockRejectedValueOnce(new Error('network')).mockResolvedValueOnce({ tripRecordVersion: 5, booking: row, replayed: true })
|
||||
const wrapper = mount(); await flushPromises(); await button(wrapper, '登记外接询价').trigger('click'); await flushPromises()
|
||||
const selects = wrapper.findAllComponents({ name: 'ElSelect' }); selects[0]!.vm.$emit('update:modelValue', '9'); selects[1]!.vm.$emit('update:modelValue', 'FBA:ONT8'); await flushPromises()
|
||||
@@ -71,7 +71,7 @@ it('keeps inquiry estimates and contacts optional and retries the same uncertain
|
||||
const first = vi.mocked(api.createTripBooking).mock.calls[0]![1]
|
||||
expect(first.cargo).toMatchObject({ palletSpaces: null, weightKg: null, volumeCbm: null, unitPrice: null, contactPhone: null })
|
||||
wrapper.findComponent({ name: 'AppDialog' }).vm.$emit('confirm'); await flushPromises()
|
||||
expect(api.createTripBooking).toHaveBeenNthCalledWith(2, 'TR-1', first)
|
||||
expect(api.createTripBooking).toHaveBeenNthCalledWith(2, 'TR-1', { ...first, idempotencyKey: expect.any(String) }); expect(vi.mocked(api.createTripBooking).mock.calls[1]![1].idempotencyKey).not.toBe(first.idempotencyKey)
|
||||
})
|
||||
it('does not expose booking writes to a read-only operator', async () => {
|
||||
access.writable = false; const wrapper = mount(); await flushPromises()
|
||||
|
||||
Reference in New Issue
Block a user