fix(admin): open measurement detail after review
This commit is contained in:
@@ -108,6 +108,26 @@ describe('InboundTaskList measurement scope', () => {
|
||||
expect(source).not.toContain("name: 'inbound-order-detail', params: { inboundId: row.id }")
|
||||
})
|
||||
|
||||
it('closes only after navigating an approved review to the measurement tab', () => {
|
||||
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
|
||||
const handler = source.slice(source.indexOf('async function handleTaskChanged'), source.indexOf('function handleReviewSelectionChange'))
|
||||
|
||||
expect(handler).toContain("name: 'unified-order-detail-by-inbound-code'")
|
||||
expect(handler).toContain('params: { inboundCode }')
|
||||
expect(handler).toContain("query: { tab: 'measurement', from: 'measurement-review' }")
|
||||
expect(handler).toContain('await router.push')
|
||||
expect(handler.indexOf('await router.push')).toBeLessThan(handler.lastIndexOf('reviewDialogOpen.value = false'))
|
||||
expect(handler).toContain("getApiErrorDetails(error, '订单详情打开失败,请重试')")
|
||||
expect(handler).toContain("name: 'unified-order-detail'")
|
||||
expect(handler).toContain("query: { tenantId: target.tenantId, tab: 'measurement', from: 'measurement-review' }")
|
||||
expect(source).toContain(':post-approve-loading="reviewNavigationLoading"')
|
||||
expect(source).toContain(':approval-completed="reviewApproved"')
|
||||
expect(source).toContain(':close-on-click-modal="!reviewNavigationLoading"')
|
||||
expect(source).toContain('reviewNavigationError')
|
||||
expect(source).toContain('重新打开订单详情')
|
||||
expect(source).not.toContain('params: { inboundId: target.id }')
|
||||
})
|
||||
|
||||
it('shows authoritative measurement totals with operation first and no internal IDs as primary columns', () => {
|
||||
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
|
||||
const columnsSource = source.slice(source.indexOf('const columns'), source.indexOf('function text'))
|
||||
|
||||
Reference in New Issue
Block a user