Merge remote-tracking branch 'origin/test' into dev

# Conflicts:
#	scripts/acceptance-finance-full-contract.test.mjs
#	scripts/admin-test-env-acceptance.mjs
This commit is contained in:
2026-09-04 16:43:43 +08:00
11 changed files with 76 additions and 12 deletions
@@ -34,7 +34,7 @@ function fixture() {
scenarios: [],
calls,
createdResources: {
merchantQualificationFixture: { tenantId: '1001' },
merchantQualificationFixture: { tenantId: '1999' },
phase4OverseasBusiness: {
purchase: { orderNo: 'PO-1', customerId: '1101' },
truck: { orderNo: 'TK-1', customerId: '1201' },
@@ -145,9 +145,18 @@ test('five fee types traverse Lastleg lifecycle and reach Finance through real H
for (const field of ['businessId', 'orderId', 'inboundId', 'inboundCode', 'containerId', 'containerBookingId', 'containerNo']) {
assert.equal(warehouseCreate.body[field], null, field)
}
assert.equal(warehouseCreate.body.customerId, '1001')
assert.equal(warehouseCreate.body.customerId, '1999')
assert.equal(warehouseCreate.body.warehouseId, '9001')
for (const [path, customerId] of [
['/api/platform/v1/last-leg/overseas-procurements', '1101'],
['/api/platform/v1/last-leg/us-truck-orders', '1201'],
['/api/platform/v1/last-leg/local-looseboard-orders', '1301'],
]) {
const lookup = context.calls.find((call) => call.method === 'GET' && call.path.startsWith(`${path}?`))
assert.equal(new URLSearchParams(lookup.path.split('?')[1]).get('customerId'), customerId)
}
const creates = context.calls.filter((call) => call.method === 'POST'
&& call.path === '/api/platform/v1/last-leg/finance-fee-sources')
assert.equal(creates.length, 12)