test: prove dispatch split across FBA destinations

This commit is contained in:
2026-09-15 12:54:09 +08:00
parent a7a6d78568
commit 9914d40593
2 changed files with 45 additions and 20 deletions
@@ -28,6 +28,14 @@ test('module uses marker-owned completed PDA pallets and never borrows historica
assert.doesNotMatch(source, /candidates\[0\]/)
})
test('ordinary dispatch selects one current-run pallet per destination for multi-FBA delivery proof', () => {
assert.match(source, /const candidatesByDestination = new Map\(\)/)
assert.match(source, /destinationWarehouseCode \|\| value\?\.fbaWarehouseCode/)
assert.match(source, /selectedCandidates\.length >= 2/)
assert.match(source, /planPalletIds, route: `\$\{context\.marker\}-ROUTE`/)
assert.match(source, /Number\(arranged\.data\?\.palletCount\) === planPalletIds\.length/)
})
test('module proves draft idempotency, lock isolation, editable pre-arrange replay and readback', () => {
assert.match(source, /相同草稿快照重复保存/)
assert.match(source, /同草稿重复锁定托盘幂等成功/)