优化
This commit is contained in:
@@ -94,7 +94,8 @@ it.each([undefined, null, 'bad', 9007199254740992])('requires rereading a restor
|
||||
expect(api.convertDispatchDraft).not.toHaveBeenCalled(); expect(wrapper.getComponent({ name: 'ElDialogContent' }).text()).toContain('预约批次版本缺失或无效,请重新读取候选')
|
||||
} finally { wrapper.unmount() }
|
||||
})
|
||||
it('requires an explicit warehouse and allows saving a true empty dispatch with no fake cargo', async () => {
|
||||
it('requires a warehouse when the directory is empty and allows saving a true empty dispatch with no fake cargo', async () => {
|
||||
vi.mocked(listAllPlatformWarehouses).mockResolvedValue([])
|
||||
const wrapper = mount(SmartDispatchDialog, options); await flushPromises()
|
||||
const state = wrapper.vm as unknown as { mode: string; warehouseId: string; submit: () => Promise<void> }
|
||||
state.mode = 'empty'; await wrapper.getComponent(AppDialog).vm.$emit('confirm'); await flushPromises(); expect(api.createDispatch).not.toHaveBeenCalled()
|
||||
|
||||
Reference in New Issue
Block a user