test: stabilize full dev acceptance orchestration

This commit is contained in:
2026-09-09 20:36:53 +08:00
parent 71604c9c39
commit eac6875877
16 changed files with 104 additions and 85 deletions
@@ -64,6 +64,17 @@ test('PDA opens only after linking a released requirement and uses stable plan i
assert.doesNotMatch(source, /push-preload/)
})
test('plan confirmation prepares the remainder initial fee first', () => {
const feeIndex = source.indexOf('ensureInitialCalculated(context')
const confirmIndex = source.indexOf("`/api/platform/v1/first-leg/loading-plans/${encodeURIComponent(planId)}/confirm`")
assert.match(source, /import \{ ensureInitialCalculated \} from '\.\/inbound-fees\.mjs'/)
assert.ok(feeIndex >= 0 && confirmIndex > feeIndex)
assert.match(source, /inboundId: id\(candidate\.inboundId\)/)
assert.match(source, /finalStatus: 'APPROVED'/)
assert.match(source, /processStatus: 'WAIT_SPLIT'/)
assert.match(source, /if \(!initialFee\) return null/)
})
test('each remainder settles only through inventory snapshot, atomic batch and explicit complete', () => {
const claimIndex = source.indexOf("`${PDA}/tasks/${taskId}/claim`")
const snapshotIndex = source.indexOf('inventory-snapshot?warehouseId=')