This commit is contained in:
2026-08-20 16:13:51 +08:00
parent 164d862588
commit 09f6e28c1f
10 changed files with 164 additions and 15 deletions
@@ -23,6 +23,12 @@ test('measurable inbound without fulfillment task remains pending', () => {
}, { http: 200, body: { code: 'A0404' } }, tenantId, orderId), false)
})
test('approval polling remains pending before the first fulfillment task response', () => {
assert.equal(approvedInboundReady({
summary: { inboundId: null, mainStatus: 'PENDING_REVIEW' },
}, null, tenantId, orderId), false)
})
test('approval convergence requires matching inbound state, order and customer task identity', () => {
const detail = { summary: { inboundId: '40001', mainStatus: 'WAIT_MEASURE' } }
assert.equal(approvedInboundReady(detail, taskResponse, tenantId, orderId), true)