diff --git a/tests/pda-loading-api.test.mjs b/tests/pda-loading-api.test.mjs index 3e50e46..ac046a9 100644 --- a/tests/pda-loading-api.test.mjs +++ b/tests/pda-loading-api.test.mjs @@ -41,7 +41,7 @@ test('C02 identifiers and separate picking/inbound versions are normalized expli assert.match(page, /item\.itemStatus === 'PICKED'/) assert.match(page, /item\.itemStatus === 'PARTIAL'/) assert.match(page, /pickingCompleted \|\| !summary\.canSubmit/) - assert.match(page, /this\.loadingVersion = this\.currentBox\.inboundVersion/) + assert.match(page, /this\.loadingVersion = task\.inboundVersion \?\? task\.loadingVersion/) assert.match(page, /状态尚未同步,请刷新重试/) }) diff --git a/tests/picking-evidence-stage.test.mjs b/tests/picking-evidence-stage.test.mjs index 453ca83..bed17d4 100644 --- a/tests/picking-evidence-stage.test.mjs +++ b/tests/picking-evidence-stage.test.mjs @@ -38,7 +38,7 @@ test('evidence identity is bound to task, inbound, loading plan and container bo assert.match(page, /isSameEvidenceIdentity\(left, right\)[\s\S]*?taskId[\s\S]*?inboundId[\s\S]*?loadingPlanId[\s\S]*?containerBookingId/) assert.match(page, /this\.currentBox\.inboundId = firstItem\.inboundId/) assert.doesNotMatch(page, /firstItem\.inboundId \|\| this\.currentBox\.inboundId/) - assert.match(page, /evidenceIdentity: this\.captureEvidenceIdentity\(\)/) + assert.match(page, /this\.evidenceIdentity = this\.captureEvidenceIdentity\(\)/) }) test('evidence mutations defensively reject calls before picking completion', () => { @@ -56,9 +56,9 @@ test('switching cabinets invalidates old sync and evidence upload state', () => assert.match(selector, /this\.loadingVersion = null/) assert.match(selector, /this\.submitting = false/) assert.match(selector, /this\.resetEvidenceState\(\)/) - assert.match(page, /contextId !== this\.evidenceContextId \|\| queue !== this\.evidenceQueue/) + assert.match(page, /!this\.isEvidenceContextActive\(contextId, identity\) \|\| queue !== this\.evidenceQueue/) const loader = page.match(/async loadLoadingEvidence\(\) \{[\s\S]*?\n\t\t\t\},/)?.[0] || '' - assert.equal((loader.match(/contextId !== this\.evidenceContextId/g) || []).length, 2) + assert.equal((loader.match(/isEvidenceContextActive\(contextId, identity\)/g) || []).length, 2) }) test('camera callbacks cannot append evidence after switching cabinets', () => {