test(admin): confirm fee adjustment tolerance
This commit is contained in:
@@ -23,3 +23,8 @@ test('inbound fee lifecycle covers frozen source, version, publication and WAIT_
|
||||
assert.match(source, /对客合计仅含已发布头程与已审核其他应收且其他应付单列/)
|
||||
assert.doesNotMatch(source, /settlementIncluded|是否结算|参与结算/)
|
||||
})
|
||||
|
||||
test('automatic fee adjustment confirms the ten percent tolerance boundary', async () => {
|
||||
const source = await readFile(moduleFile, 'utf8')
|
||||
assert.match(source, /reason: `\$\{context\.marker\}-自动费用版本调整`, toleranceConfirmed: true/)
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ export async function run(context) {
|
||||
`/api/platform/v1/inbounds/${encodeURIComponent(inboundId)}/fees/published?tenantId=${encodeURIComponent(tenantId)}`,
|
||||
{ expectedFeeVersion: Number(initial.feeVersion), chargeableQuantity: adjustedQuantity,
|
||||
unitPrice: adjustedUnitPrice, additionalAmount: adjustedAdditional,
|
||||
reason: `${context.marker}-自动费用版本调整` }, undefined,
|
||||
reason: `${context.marker}-自动费用版本调整`, toleranceConfirmed: true }, undefined,
|
||||
requestHeaders(`${context.marker}-inbound-fee-adjust`))
|
||||
const adjusted = context.apiSuccess(MODULE, '调整初算并生成新版本', adjustResponse, '', OPTIONS)
|
||||
context.assert(MODULE, '调整版本仍为 CALCULATED 且不阻塞 WAIT_SPLIT', adjustResponse,
|
||||
|
||||
Reference in New Issue
Block a user