This commit is contained in:
2026-10-20 10:35:52 +08:00
parent ce189f062f
commit c13175bf77
202 changed files with 38397 additions and 7138 deletions
@@ -39,16 +39,24 @@ test('transfer review integration covers both source types and known blank-reaso
test('draft and removal checks use actual IDs plus readback rather than snapshot-only success', async () => {
const source = await read('phase4-overseas-dispatch.mjs')
for (const value of ['drafts/containers', 'draftContainerId: containerId', 'container.palletIds',
'draft-locks/unlock', 'deletedDrafts', 'removableItem.id', 'removedDetail.data?.packageCount', 'freed.data.some'])
for (const value of ['drafts/containers', 'draftContainerId: temporary', 'draft.containers',
'draft-locks/unlock', 'drafts/pre-arrange', 'item.dispatchItemId', 'current.data.counts.palletCount',
'available.some(c => c.sourceKey === duplicate.sourceKey', 'dispatchBusinessSnapshot(await readDispatch'])
assert.ok(source.includes(value), value)
})
test('fulfillment checks PDF signature, platform replay and immutable pallets after transfer', async () => {
const source = await read('phase5-overseas-fulfillment.mjs')
for (const value of ['requestBinary', '/prints/bol', "=== '%PDF-'", '/transfer-delivery',
'adminReplay.data?.replayed', 'conflict(deniedRemove)', 'stable.data?.items?.map'])
'replay.data?.replayed', 'JSON.stringify(replay.data.result) === JSON.stringify(result)',
'sameSnapshot(proof.stockAfter, proof.stockAfterDepart)', 'sameSnapshot(proof.ledgerAfter, proof.ledgerAfterDepart)'])
assert.ok(source.includes(value), value)
const helper = await read('fleet-trip-fulfillment.mjs')
for (const value of ['state.itemsBefore', 'JSON.stringify(state.itemsBefore) === JSON.stringify(state.itemsAfter)',
'proof.loadingCommand.replay = replay', 'proof.loadingCommand.platformRejection = await command',
"{ code: 'A0403', message: '该请求标识不属于当前操作员' }", 'JSON.stringify(replay.result) === JSON.stringify(confirmed.result)',
'JSON.stringify(proof.loadingCommand.beforeReplay) === JSON.stringify(proof.loadingCommand.afterReplay)'])
assert.ok(helper.includes(value), value)
})
test('return merge sources are actual consumed batches, not a synthetic MERGED identifier', async () => {