优化
This commit is contained in:
@@ -107,9 +107,10 @@ test('relabel list opens a row directly in execution and completion returns to t
|
||||
assert.doesNotMatch(page, /name="relabelTask"/)
|
||||
assert.match(page, /@tap="openExecution\(item\)"/)
|
||||
assert.match(page, /async openExecution\(item\)/)
|
||||
assert.match(page, /uni\.redirectTo\(\{ url: '\/pages\/relabel\/relabel\?op=relabelExecute' \}\)/)
|
||||
assert.match(page, /relabelExecute&task=\$\{encodeURIComponent\(item\.relabelNo\)\}/)
|
||||
assert.match(page, /当前账号正在执行 \$\{active\.relabelNo\}/)
|
||||
assert.match(page, /v-if="stage === 'execute'" class="work-card"><button class="secondary"[^>]*@tap="goToClaimList">返回换标列表<\/button>/)
|
||||
assert.match(page, /v-if="stage === 'execute' && showCurrent" class="detail-toolbar"[\s\S]*@tap="closeCurrent">\u2039 返回列表<\/button>/)
|
||||
assert.match(page, /closeCurrent\(\) \{ this\.current = null;[\s\S]*this\.taskCode = '' \}/)
|
||||
assert.match(page, /updateWarehouseWork\('relabel', \{ currentNo: '', photoFileIds: \[\], photoNames: \[\], remark: '' \}\)/)
|
||||
assert.match(page, /if \(completed\) this\.goToClaimList\(\)/)
|
||||
assert.match(page, /goToClaimList\(\) \{ this\.taskCode = ''; uni\.redirectTo\(\{ url: '\/pages\/relabel\/relabel\?op=relabelReceive' \}\) \}/)
|
||||
@@ -119,7 +120,7 @@ test('relabel review is a read-only list and completed execution details stay hi
|
||||
const page = await read('../src/pages/relabel/relabel.vue')
|
||||
const body = page.match(/showCurrent\(\) \{([^\n]+)\},/)[1]
|
||||
const visible = new Function(body)
|
||||
const context = { stage: 'execute', current: { relabelNo: 'RL-1', taskStatus: 'PROCESSING' }, candidates: [{ relabelNo: 'RL-1', taskStatus: 'PROCESSING', claimedByCurrentOperator: true }] }
|
||||
const context = { stage: 'execute', entryTaskNo: '', current: { relabelNo: 'RL-1', taskStatus: 'PROCESSING' }, candidates: [{ relabelNo: 'RL-1', taskStatus: 'PROCESSING', claimedByCurrentOperator: true }] }
|
||||
assert.equal(visible.call(context), true, 'detail without ownership field must use server candidate ownership')
|
||||
assert.equal(visible.call({ ...context, candidates: [] }), false)
|
||||
assert.equal(visible.call({ ...context, stage: 'review' }), false)
|
||||
@@ -132,8 +133,10 @@ test('relabel review is a read-only list and completed execution details stay hi
|
||||
const bootstrapBody = page.match(/async bootstrap\(\) \{([^\n]+)\},/)[1]
|
||||
const bootstrap = new (Object.getPrototypeOf(async function () {}).constructor)(bootstrapBody)
|
||||
const opened = []
|
||||
await bootstrap.call({ ...context, taskCode: 'STALE', loadCandidates: async () => {}, openTask: async (no) => opened.push(no) })
|
||||
await bootstrap.call({ ...context, entryTaskNo: 'RL-1', loadCandidates: async () => {}, openTask: async (no) => opened.push(no) })
|
||||
assert.deepEqual(opened, ['RL-1'])
|
||||
await bootstrap.call({ ...context, entryTaskNo: '', loadCandidates: async () => {}, openTask: async (no) => opened.push(no) })
|
||||
assert.deepEqual(opened, ['RL-1'], 'workbench execution entry must stay on the processing-task list')
|
||||
})
|
||||
|
||||
test('warehouse drafts are isolated by operator and warehouse and retain retry keys until success', () => {
|
||||
|
||||
Reference in New Issue
Block a user