fix: align audit and dispatch workflows and release failed requests

This commit is contained in:
2026-10-22 23:10:09 +08:00
parent 9cdcb9c077
commit 4a3456756f
124 changed files with 1296 additions and 2120 deletions
@@ -113,14 +113,14 @@ it('does not continue uploading vehicle photos after the editor is unmounted', a
expect(wrapper.emitted('saved')).toBeUndefined()
})
it('keeps an uncertain create key scoped to its vehicle when the editor is reused', async () => {
it('unlocks failed creation and uses the current vehicle when the editor is reused', async () => {
vi.mocked(api.createVehicleCare).mockRejectedValueOnce(new Error('unknown network outcome')).mockResolvedValueOnce({ ...row, vehicleId: '72', recordNo: 'VR-TWO' })
const wrapper = mount(VehicleCareEditor, { modelValue: false, vehicleId: '71', plate: 'VEH-A', recordType: 'FUEL', record: null })
await wrapper.setProps({ modelValue: true })
wrapper.findAllComponents({ name: 'ElInputNumber' })[1]!.vm.$emit('update:modelValue', 28.6)
wrapper.findComponent({ name: 'AppDialog' }).vm.$emit('confirm'); await flushPromises()
const oldKey = vi.mocked(api.createVehicleCare).mock.calls[0]![1]
expect(wrapper.text()).toContain('正在核对原保存结果')
expect(wrapper.text()).not.toContain('正在核对原保存结果')
await wrapper.setProps({ modelValue: false })
await wrapper.setProps({ vehicleId: '72', plate: 'VEH-B', modelValue: true }); await flushPromises()
expect(wrapper.text()).not.toContain('正在核对原保存结果')