优化
This commit is contained in:
@@ -133,4 +133,17 @@ describe('RelabelOrdersView', () => {
|
||||
expect(labels).toEqual(expect.arrayContaining(['处理中', '已驳回', '已取消']))
|
||||
expect(labels).not.toContain('已完成')
|
||||
})
|
||||
|
||||
it('passes the relabel order number search to the backend', async () => {
|
||||
const wrapper = mount(RelabelOrdersView, { attachTo: document.body, global: { plugins: [ElementPlus] } })
|
||||
await flushPromises()
|
||||
const input = wrapper.find('input[placeholder="请输入换标单号"]')
|
||||
expect(input.exists()).toBe(true)
|
||||
await input.setValue('FBR202608272092853218068373506')
|
||||
await wrapper.findAll('button').find((button) => button.text().includes('查询'))!.trigger('click')
|
||||
await flushPromises()
|
||||
expect(listRelabelOrders).toHaveBeenLastCalledWith(expect.objectContaining({
|
||||
relabelNo: 'FBR202608272092853218068373506',
|
||||
}))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user