统一履约状态和节点日志展示并整理装柜与尾程界面
This commit is contained in:
@@ -448,6 +448,22 @@ it('clears an earlier input rejection after the corrected workflow succeeds', as
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it.each([
|
||||
['DELIVERING', 3, true],
|
||||
['DELIVERED', 4, false],
|
||||
] as const)('only opens list document management before delivery completes in %s', async (stage, tabIndex, available) => {
|
||||
vi.mocked(listDispatches).mockResolvedValue(page([listRow({ taskType: 'DELIVERY', stage, actions: {} })]))
|
||||
const wrapper = mount(DispatchesView, { global: { ...options.global, stubs: { ...options.global.stubs, DispatchDocumentsDialog: true } } }); await flushPromises()
|
||||
await wrapper.get('[aria-label="排车执行阶段"]').findAll('button')[tabIndex]!.trigger('click'); await flushPromises()
|
||||
expect(listDispatches).toHaveBeenLastCalledWith(expect.objectContaining({ stage }))
|
||||
const row = wrapper.findAllComponents(RowActions).find(entry => entry.props('moreLabel') === '更多操作 · PC/1')!
|
||||
expect((row.props('actions') as Array<{ key: string }>).some(item => item.key === 'documents')).toBe(available)
|
||||
expect(row.findAll('button').some(button => button.text() === '管理资料')).toBe(available)
|
||||
row.vm.$emit('action', 'documents'); await flushPromises()
|
||||
expect(wrapper.getComponent({ name: 'DispatchDocumentsDialog' }).props()).toMatchObject({ modelValue: available, dispatchNo: available ? 'PC/1' : '' })
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('opens the exception form from the dispatching row and hides it without permission', async () => {
|
||||
const gate = { allowed: true, blockCode: null, blockReason: null }
|
||||
const current = reviews()
|
||||
|
||||
Reference in New Issue
Block a user