优化
This commit is contained in:
@@ -21,6 +21,9 @@ test('PDA loading adapter keeps C04 read and write paths', () => {
|
||||
assert.match(source, /\/files\/loading-evidence\//)
|
||||
assert.match(source, /loading\/evidence\/pda\?tenantId=/)
|
||||
assert.match(source, /loading\/evidence\/\$\{encodeURIComponent\(evidenceId\)\}\/void\/pda\?tenantId=/)
|
||||
assert.match(source, /export function completeContainerPickingTask\(taskId, payload = \{\}\)/)
|
||||
assert.match(source, /first-leg\/pda-loading\/tasks\/\$\{encodeURIComponent\(taskId\)\}\/complete/)
|
||||
assert.match(source, /expectedTaskVersion/)
|
||||
})
|
||||
|
||||
test('PDA adapter does not treat non-200 response bodies or network failures as success', () => {
|
||||
|
||||
@@ -24,6 +24,9 @@ test('operators receive actionable refresh guidance without internal version wor
|
||||
assert.doesNotMatch(page, /缺少拣货版本号|提供装柜版本号/)
|
||||
const complete = page.match(/async completeLoadingTask\(\) \{[\s\S]*?\n\t\t\t\},/)?.[0] || ''
|
||||
assert.match(complete, /if \(!this\.requireEvidenceStage\(\)\) return/)
|
||||
assert.match(complete, /completeContainerPickingTask\(this\.remoteTaskId/)
|
||||
assert.match(complete, /expectedTaskVersion/)
|
||||
assert.doesNotMatch(complete, /completeLoading\(inboundId/)
|
||||
})
|
||||
|
||||
test('AWAITING_REVIEW alone cannot request or mutate server evidence without a server loading version', () => {
|
||||
@@ -129,7 +132,7 @@ test('evidence save, void and loading completion ignore stale cabinet responses'
|
||||
for (const [method, awaitedCall] of [
|
||||
['saveEvidence', 'upsertEvidence'],
|
||||
['voidEvidencePhoto', 'voidEvidence'],
|
||||
['completeLoadingTask', 'completeLoading']
|
||||
['completeLoadingTask', 'completeContainerPickingTask']
|
||||
]) {
|
||||
const body = page.match(new RegExp(`async ${method}\\([^)]*\\) \\{[\\s\\S]*?\\n\\t\\t\\t\\},`))?.[0] || ''
|
||||
assert.match(body, /const contextId = this\.evidenceContextId/, `${method} should capture the evidence context`)
|
||||
|
||||
Reference in New Issue
Block a user