test: align acceptance and dependency contracts

This commit is contained in:
2026-09-11 01:31:14 +08:00
parent 543ebee5cc
commit abbacc683e
6 changed files with 35 additions and 52 deletions
@@ -82,7 +82,8 @@ test('PDA operations reuse received plan pallets and the public location without
test('P5 follows warehouse review, customer confirmation and fulfillment completion in order', () => {
assert.match(source, /applicationStatus === 'CUSTOMER_CONFIRM_PENDING'/)
assert.match(source, /\/confirm-completion/)
assert.match(source, /const merchantRelabelBase = '\/api\/merchant\/v1\/last-leg\/relabel-applications'/)
assert.match(source, /`\$\{merchantRelabelBase\}\/\$\{encodeURIComponent\(relabelNo\)\}\/confirm-completion`/)
assert.match(source, /status === 'READY_FOR_OUTBOUND'/)
assert.match(source, /status: 'COMPLETED'/)
assert.match(source, /walletStatus === 'SETTLED'/)
@@ -378,6 +378,7 @@ async function verifyRelabel(context, token, merchantToken, fixture) {
return false
}
const relabelBase = '/api/platform/v1/last-leg/relabel-applications'
const merchantRelabelBase = '/api/merchant/v1/last-leg/relabel-applications'
const pdaBase = '/api/pda/v1/last-leg/relabel-tasks'
const markerSuffix = String(context.marker).slice(-8)
const createBody = {
@@ -518,7 +519,7 @@ async function verifyRelabel(context, token, merchantToken, fixture) {
&& approveReplay.data?.taskStatus === 'COMPLETED'
&& approveReplay.data?.applicationStatus === 'CUSTOMER_CONFIRM_PENDING', trace(approveReplay.response), OPTIONS)
const customerConfirm = await context.requestOverseas('POST',
`${relabelBase}/${encodeURIComponent(relabelNo)}/confirm-completion`, {
`${merchantRelabelBase}/${encodeURIComponent(relabelNo)}/confirm-completion`, {
idempotencyKey: key(context, 'RELABEL-CUSTOMER-CONFIRM'), remark: `${context.marker}-customer-confirm`,
}, {}, merchantToken)
context.addStep(MODULE, 'P5客户确认换标完成进入待出库', customerConfirm,