This commit is contained in:
2026-08-28 14:33:57 +08:00
parent 7b50e92baf
commit ae48f46c9f
21 changed files with 282 additions and 24 deletions
@@ -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',
}))
})
})