优化
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -78,6 +78,18 @@ test('local thumbnail, preview, and authenticated session restore are wired to t
|
||||
assert.ok(photoUiBlockers().every((item) => item.deploymentBlocker === true && item.reason))
|
||||
})
|
||||
|
||||
test('domestic cabinet photos are read-only, previewable and non-blocking in sign and receive phases', () => {
|
||||
assert.match(page, /国内装柜照片(只读)/)
|
||||
assert.match(page, /domesticPhotosExpanded/)
|
||||
assert.match(page, /downloadCurrentDomesticLoadingPhoto\(photo\.downloadPath\)/)
|
||||
assert.match(page, /async loadDomesticPhoto\(photo\)[\s\S]*catch \(_\) \{ photo\.status = 'error' \}/)
|
||||
assert.match(page, /previewDomesticPhoto\(photo\)[\s\S]*uni\.previewImage/)
|
||||
assert.match(inbound, /downloadCurrentDomesticLoadingPhoto/)
|
||||
assert.match(controller, /current\/domestic-loading-photos\/\{evidenceType\}\/content/)
|
||||
assert.match(openapi, /DomesticLoadingPhoto:/)
|
||||
assert.doesNotMatch(page, /domesticLoadingPhotos[\s\S]{0,120}customer/)
|
||||
})
|
||||
|
||||
test('fixed receiving action leaves enough scroll-safe space above the PDA bottom bar', () => {
|
||||
assert.match(page, /v-if="canFinishOnsite" class="sticky-action one"/)
|
||||
assert.match(page, /allInboundsReconciled \? '完成整柜入库' : '现场收货结束(标记差异)'/)
|
||||
|
||||
Reference in New Issue
Block a user