This commit is contained in:
2026-09-15 13:37:44 +08:00
parent 6f07d17c1d
commit 053f5201d0
6 changed files with 62 additions and 5 deletions
+14
View File
@@ -71,6 +71,20 @@ test('receiving adapter preserves the three signed photo roles in workflow order
assert.equal(session.inbounds[0].plannedPalletCount, 2)
})
test('domestic loading photos remain cabinet-level read-only references without file IDs', () => {
const session = normalizeReceivingSession({ domesticLoadingPhotos: [
{ evidenceType: 'PHOTO_STEP_1', label: '空仓', downloadPath: '/current/domestic-loading-photos/PHOTO_STEP_1/content' },
{ evidenceType: 'SEAL', label: '带锁码', downloadPath: '/current/domestic-loading-photos/SEAL/content' },
{ evidenceType: '', label: 'invalid', downloadPath: '/invalid' }
] })
assert.equal(session.domesticLoadingPhotos.length, 2)
assert.deepEqual(session.domesticLoadingPhotos.map(({ evidenceType, status, localPath }) => ({ evidenceType, status, localPath })), [
{ evidenceType: 'PHOTO_STEP_1', status: 'idle', localPath: '' },
{ evidenceType: 'SEAL', status: 'idle', localPath: '' }
])
assert.equal('fileId' in session.domesticLoadingPhotos[0], false)
})
test('receiving adapter exposes calculable candidate facts and workflow errors', () => {
const candidate = normalizeReceivingCandidate({ containerNo: ' C10000000 ', status: 'WAIT_SIGN', planCount: 15, inboundCodeCount: 15, destinationCodes: ['ONT8', 'LAX'], plannedPalletCount: 4, currentAccount: true })
assert.equal(candidate.containerNo, 'C10000000')