Test #1

Merged
admin merged 1726 commits from test into main 2026-09-17 11:52:45 +08:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 584b73faf5 - Show all commits
@@ -152,7 +152,8 @@ test('fixture creates four real receivable manual sources before payable source'
})
test('container cost uses loading plan identity and verifies snapshot fields before Finance', () => {
assert.match(source, /containerId: Number\(container\.loadingPlanId\)/)
assert.match(source, /containerId: String\(container\.loadingPlanId\)/)
assert.doesNotMatch(source, /containerId: Number\(container\.loadingPlanId\)/)
assert.match(source, /smart-loading\/plans\/\$\{encodeURIComponent\(container\.loadingPlanId\)\}/)
assert.match(source, /id\(item\?\.accountId\) === id\(customerId\)/)
assert.match(source, /Number\(item\?\.orderId\) > 0/)
@@ -258,7 +258,7 @@ async function createContainerCost(context, customerId, container, voucherFileId
const body = { customerId: Number(customerId), costType: 'CONTAINER_SHARED', orderId: null,
// Finance names this field containerId, but its Firstleg cost snapshot contract
// resolves it as the loading plan ID, not the physical container booking ID.
containerId: Number(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300,
containerId: String(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300,
currency: 'CNY', voucherFileIds: [voucherFileId], remark: context.marker }
const response = await request(context, 'POST', '/api/platform/finance/v1/cost-entries', body)
if (response?.body?.code === 'FIN_400') {