fix(customs): keep declaration pending while exceptions remain

This commit is contained in:
2026-09-30 11:48:14 +08:00
parent 6731be1a6b
commit c7f880300c
4 changed files with 49 additions and 4 deletions
@@ -53,7 +53,7 @@ test('钱包闭环覆盖充值、授信、采购冻结结算和换标结算释
test('托盘汇总和拆柜成本验证总数、分摊及跨区金额守恒', () => {
for (const token of [
'/api/platform/v1/pallets/summary',
'/api/platform/v1/warehouse-admin/pallets/summary',
'/api/platform/v1/overseas-warehouse-resources/pallets/summary',
'/pallets/summary?page=1&size=20',
'OVERSEAS_CONTAINER',
'DESTUFF_PALLET',
@@ -61,6 +61,7 @@ test('托盘汇总和拆柜成本验证总数、分摊及跨区金额守恒', ()
'sourceFeeId',
'pollRequests=',
]) assert.ok(source.includes(token), token)
assert.doesNotMatch(source, /\/warehouse-admin\/pallets\/summary/)
assert.match(source, /Number\(d\.totalCount\) === Number\(d\.idleCount\) \+ Number\(d\.occupiedCount\)/)
assert.match(source, /allocated === money\(fact\.expectedPalletCost\)/)
assert.match(source, /delivered\.reduce[\s\S]*fact\.expectedPalletCost/)
@@ -304,7 +304,7 @@ async function verifyPalletSummaries(context, warehouseId) {
success(domestic) && summaryValid(d, ['totalCount', 'idleCount', 'occupiedCount'])
&& Number(d.totalCount) === Number(d.idleCount) + Number(d.occupiedCount),
`total=${d?.totalCount}, idle=${d?.idleCount}, occupied=${d?.occupiedCount}`)
const overseas = await context.request('GET', '/api/platform/v1/warehouse-admin/pallets/summary?page=1&size=20')
const overseas = await context.request('GET', '/api/platform/v1/overseas-warehouse-resources/pallets/summary?page=1&size=20')
const o = overseas?.body?.data
assert(context, '海外托盘汇总含闲置、占用和报废数量', overseas,
success(overseas) && summaryValid(o, ['totalCount', 'idleCount', 'occupiedCount', 'scrappedCount'])