This commit is contained in:
2026-08-13 20:00:38 +08:00
parent 5489bff92f
commit b9cfdcf42a
13 changed files with 183 additions and 479 deletions
@@ -169,7 +169,7 @@ describe('InboundOrdersView', () => {
}))
})
it('passes the selected backend tab and routes view to the independent detail page', async () => {
it('passes the selected backend tab and routes view to the unified order detail page', async () => {
const wrapper = mountPage()
const toolbar = await selectCustomer(wrapper)
toolbar.vm.$emit('search')
@@ -182,8 +182,8 @@ describe('InboundOrdersView', () => {
;[...document.querySelectorAll<HTMLButtonElement>('button')].filter((button) => button.textContent?.trim() === '查看').at(-1)?.click()
await flushPromises()
expect(routerPush).toHaveBeenCalledWith({
name: 'inbound-order-detail',
params: { inboundId: '19001' },
name: 'unified-order-detail',
params: { orderId: '18001' },
query: { tenantId: '10002' },
})
expect(wrapper.find('[aria-label="入库单详情抽屉"]').exists()).toBe(false)
@@ -334,7 +334,8 @@ describe('InboundOrdersView', () => {
expect(source).toContain('preference-key="inbound-orders-table"')
expect(columnSource.match(/defaultVisible: false/g)?.length).toBeGreaterThanOrEqual(25)
expect(toolbarSource).toMatch(/@media \(max-width: 720px\)[\s\S]*width: 100%/)
expect(source).toContain('<el-button size="small" type="primary" @click="openDetail')
expect(source).toContain('name: \'unified-order-detail\'')
expect(source).toContain(':disabled="!(row as InboundOrderSummary).orderId"')
expect(source).toContain('<ClipboardCheck :size="15" />处理')
expect(source).toContain('<el-button size="small" plain type="primary"')
expect(source).not.toContain('<el-button link type="primary" @click="openDetail(row as InboundOrderSummary)">')