优化
This commit is contained in:
@@ -102,7 +102,7 @@ describe('UnifiedOrdersView co-load group behavior', () => {
|
||||
expect(wrapper.text()).toContain('同柜组 · 2 票 · 未锁定')
|
||||
expect(wrapper.text()).not.toContain('CLG-9001')
|
||||
await wrapper.get('[aria-label="查看同柜组 · 2 票 · 未锁定成员"]').trigger('click')
|
||||
expect(wrapper.text()).toContain('3 个入仓码')
|
||||
expect(wrapper.text()).toContain('3 个成员')
|
||||
expect(wrapper.text()).toContain('13 箱')
|
||||
expect(wrapper.text()).toContain('IN-1')
|
||||
expect(wrapper.text()).toContain('IN-1-B')
|
||||
@@ -116,4 +116,23 @@ describe('UnifiedOrdersView co-load group behavior', () => {
|
||||
expect(cancelPlatformCoLoadGroup).toHaveBeenCalledWith('9001', 0, '计划调整')
|
||||
expect(ElMessageBox.prompt).toHaveBeenCalledWith(expect.stringContaining('不支持单独移除成员'), '取消同柜不可拆组', expect.any(Object))
|
||||
})
|
||||
|
||||
it.each([
|
||||
['undefined', undefined],
|
||||
['null', null],
|
||||
['blank', ' '],
|
||||
])('keeps the member dialog readable when a normalized inbound code is %s', async (_case, inboundCode) => {
|
||||
const incompleteGroup = {
|
||||
...group,
|
||||
members: [{ ...group.members[0], inboundCode: inboundCode as unknown as string }, group.members[1]],
|
||||
}
|
||||
vi.mocked(batchQueryPlatformCoLoadGroups).mockResolvedValue(rows.map((row) => ({ orderId: row.orderId, group: incompleteGroup })))
|
||||
const wrapper = mountView()
|
||||
await flushPromises()
|
||||
await wrapper.get('[aria-label="查看同柜组 · 2 票 · 未锁定成员"]').trigger('click')
|
||||
expect(wrapper.text()).toContain('同柜组成员入仓码尚未返回,请刷新后重试')
|
||||
expect(wrapper.text()).not.toContain('CLG-9001')
|
||||
expect(wrapper.text()).not.toContain('ORD-1')
|
||||
expect(wrapper.text()).not.toContain('5001')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user