1
This commit is contained in:
@@ -24,6 +24,11 @@ describe('OceanBookingDetailView draft and release contract', () => {
|
||||
expect(source).not.toContain('cancelOceanBooking')
|
||||
})
|
||||
|
||||
it('invalidates the cached booking list after deleting a draft', () => {
|
||||
expect(source).toContain("workspace.bumpCacheEpoch('ocean-bookings')")
|
||||
expect(source).toContain("await router.replace('/ocean-bookings')")
|
||||
})
|
||||
|
||||
it('saves incomplete DRAFT data and sends null for blank nullable fields', () => {
|
||||
expect(source).toContain('保存草稿')
|
||||
expect(source).toContain('channelCode: form.data.channelCode?.trim() || null')
|
||||
|
||||
@@ -316,6 +316,7 @@ async function removeDraft() {
|
||||
actionSaving.value = true
|
||||
await deleteOceanBookingDraft(id.value, detail.value.version)
|
||||
ElMessage.success('订舱草稿已删除')
|
||||
workspace.bumpCacheEpoch('ocean-bookings')
|
||||
await router.replace('/ocean-bookings')
|
||||
} catch (cause) {
|
||||
if (cause !== 'cancel' && !(cause instanceof Error && cause.message === 'cancel')) actionError.value = getApiErrorDetails(cause)
|
||||
|
||||
Reference in New Issue
Block a user