feat(pda): persist and batch cabinet picking
This commit is contained in:
@@ -16,6 +16,9 @@ test('PDA loading adapter keeps C04 read and write paths', () => {
|
||||
]) assert.match(source, new RegExp(path.replace(/[?]/g, '\\?')))
|
||||
assert.match(source, /'Idempotency-Key'/)
|
||||
assert.match(source, /PHOTO_STEP_1[\s\S]*PHOTO_STEP_4[\s\S]*SEAL/)
|
||||
for (const label of ['空仓照片', '半仓照片', '满仓照片', '锁仓照片', '带锁码照']) assert.match(source, new RegExp(label))
|
||||
assert.match(source, /uni\.uploadFile/)
|
||||
assert.match(source, /\/files\/loading-evidence\//)
|
||||
})
|
||||
|
||||
test('PDA adapter does not treat non-200 response bodies or network failures as success', () => {
|
||||
@@ -34,10 +37,26 @@ test('C02 identifiers and separate picking/inbound versions are normalized expli
|
||||
assert.match(page, /缺少拣货版本号 pickingVersion/)
|
||||
})
|
||||
|
||||
test('picking page exposes evidence, retry and remote completion states', () => {
|
||||
test('picking page exposes five evidence slots, retry and remote completion states', () => {
|
||||
for (const text of ['PHOTO_STEP_1', 'PHOTO_STEP_4', 'SEAL', '网络失败', '确认装柜完成', 'loadingVersion']) {
|
||||
assert.match(page, new RegExp(text))
|
||||
assert.match(`${source}\n${page}`, new RegExp(text))
|
||||
}
|
||||
assert.match(page, /createEvidenceUploadQueue/)
|
||||
assert.match(page, /retryEvidence/)
|
||||
assert.match(page, /uploadEvidenceFile/)
|
||||
assert.match(page, /submitting \|\| completedBoxes\[currentBoxIndex\]/)
|
||||
assert.match(page, /completePicking\(/)
|
||||
})
|
||||
|
||||
test('PDA cabinet picking adapter exposes online claim and item action contracts', () => {
|
||||
assert.match(source, /\/first-leg\/pda-loading\/tasks\?/)
|
||||
assert.match(source, /tasks\/\$\{encodeURIComponent\(taskId\)\}\/claim/)
|
||||
assert.match(source, /items\/\$\{encodeURIComponent\(itemId\)\}\/pick/)
|
||||
assert.match(source, /items\/\$\{encodeURIComponent\(itemId\)\}\/partial/)
|
||||
assert.match(source, /items\/\$\{encodeURIComponent\(itemId\)\}\/skip/)
|
||||
assert.match(source, /submitContainerPickingBatch/)
|
||||
assert.match(source, /stableIdempotencyKey/)
|
||||
assert.match(page, /claimContainerPickingTask\(/)
|
||||
assert.match(page, /submitContainerPickingBatch\(/)
|
||||
assert.match(page, /任务版本已变化,请刷新后重试/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user