优化
This commit is contained in:
@@ -42,11 +42,11 @@ it('keeps the inbound appointment retry across close, reopen and route attempts'
|
||||
const done=vi.fn();dialog.props('beforeClose')(done);expect(done).not.toHaveBeenCalled()
|
||||
expect(wrapper.find('[data-save]').exists()).toBe(true)
|
||||
await open();await flushPromises();expect(getFbaAppointment).toHaveBeenCalledTimes(1)
|
||||
for(const hook of [onBeforeRouteLeave,onBeforeRouteUpdate]) expect((vi.mocked(hook).mock.calls[0]![0] as () => boolean)()).toBe(false)
|
||||
for(const hook of [onBeforeRouteLeave,onBeforeRouteUpdate]) expect(await (vi.mocked(hook).mock.calls[0]![0] as () => Promise<boolean>)()).toBe(false)
|
||||
await wrapper.get('[data-save]').trigger('click');await flushPromises()
|
||||
expect(updateFbaAppointment).toHaveBeenNthCalledWith(2,'AP-1',original)
|
||||
expect(wrapper.find('[data-save]').exists()).toBe(false)
|
||||
expect((vi.mocked(onBeforeRouteLeave).mock.calls[0]![0] as () => boolean)()).toBe(true)
|
||||
expect(await (vi.mocked(onBeforeRouteLeave).mock.calls[0]![0] as () => Promise<boolean>)()).toBe(true)
|
||||
wrapper.unmount()
|
||||
})
|
||||
it('renders MULTIPLE as multiple appointments and opens the exact source/customer instead of choosing an arbitrary appointment', async () => {
|
||||
|
||||
Reference in New Issue
Block a user