test(finance): complete automatic fee fixture workflow

This commit is contained in:
2026-08-14 23:03:36 +08:00
parent 1db7c3b3cf
commit 32e9b69556
2 changed files with 35 additions and 1 deletions
@@ -30,6 +30,15 @@ test('fee writes use verified Firstleg paths and do not fabricate historical IDs
assert.match(source, /chargeUnit === 'CBM'/)
})
test('automatic fee fixture completes the reviewed pricing workflow without recalculating', () => {
assert.match(source, /latest\?\.feeId/)
assert.doesNotMatch(source, /latest\?\.id/)
assert.match(source, /`\$\{pricingBase\}\/latest\?\$\{tenantQuery\}`/)
assert.match(source, /request\(context, 'POST', `\$\{pricingBase\}\/confirm\?\$\{tenantQuery\}`\)/)
assert.match(source, /request\(context, 'POST', `\$\{pricingBase\}\/send\?\$\{tenantQuery\}`\)/)
assert.doesNotMatch(source, /request\(context, 'POST', `\$\{pricingBase\}\/calculate/)
})
test('shared fixture source names the finance full acceptance contract', () => {
for (const field of ['marker', 'customerId', 'orders', 'feeSources', 'container', 'allocations', 'supplier', 'voucherFileId', 'deploymentBlocker']) assert.match(source, new RegExp(`\\b${field}\\b`))
for (const field of ['feeSourceId', 'sourceType', 'direction', 'currency', 'amount', 'businessDate', 'billingBasis']) {