diff --git a/scripts/client-test-env-acceptance-contract.test.mjs b/scripts/client-test-env-acceptance-contract.test.mjs index effe72aae..2b8daf794 100644 --- a/scripts/client-test-env-acceptance-contract.test.mjs +++ b/scripts/client-test-env-acceptance-contract.test.mjs @@ -133,6 +133,7 @@ test('channel gate publishes private A then B, proves client removal and rejects assert.equal(report.orderSubmissionGates.channel.publicVersionsUnchanged,true) assert.deepEqual(report.orderSubmissionGates.remaining,['Other pending scope']) assert.equal(books.get('201').version.status,'SUPERSEDED');assert.equal(books.get('202').version.status,'ACTIVE') + assert.equal(JSON.stringify(report.orderSubmissionGates.channel.versions.map(version=>[version.statusAtPublication,version.status])),JSON.stringify([['ACTIVE','SUPERSEDED'],['ACTIVE','ACTIVE']])) assert.equal(calls.filter(call=>call.path.endsWith('/publish')).length,2) assert.equal(calls.filter(call=>call.path.includes('/submit')).length,2) assert.ok(calls.filter(call=>call.method==='POST').every(call=>!call.path.includes('customerId=0')&&!call.path.includes('/100/'))) diff --git a/scripts/client-test-env-acceptance.mjs b/scripts/client-test-env-acceptance.mjs index 09ac593a4..9a30f9b82 100644 --- a/scripts/client-test-env-acceptance.mjs +++ b/scripts/client-test-env-acceptance.mjs @@ -2613,6 +2613,10 @@ async function orderSubmissionChannelGateModule() { const own=await list(customerId,'verify A superseded only within this customer and B active') assertTrue(own.length===2 && own.some(version=>String(version.id)===a&&version.status==='SUPERSEDED') && own.some(version=>String(version.id)===b&&version.status==='ACTIVE'),'exact customer A to B replacement') + for (const entry of proof.versions) { + entry.statusAtPublication = entry.status + entry.status = own.find(version => String(version.id) === entry.id).status + } for(const role of ['merchant','platform']) { await apiStep(module,`${role} original draft rejects now-unavailable channel`,{ method:'POST',path:`/api/${role}/v1/orders/first-leg/${orderId}/submit${role==='platform'?`?tenantId=${customerId}`:''}`,