test: isolate phase4 carrier fixtures

This commit is contained in:
2026-08-25 18:32:12 +08:00
parent b6226f1ca6
commit 65c01f8b3d
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -1029,6 +1029,10 @@ export class AcceptanceRun {
present: Object.hasOwn(this.createdResources, key), value: this.createdResources[key],
}]))
let restoreFixture = null
// Each producer variant must create and advance its own loading, outbound and carrier facts.
// Keeping the outer run's objects here can make a later container write PICKUP_READY nodes
// to an earlier carrier task while still reporting the variant as ready.
for (const key of createdKeys) delete this.createdResources[key]
this.marker = variantMarker
this.context.orderDestinationType = destinationType
this.context.orderFulfillmentType = fulfillmentType
@@ -112,6 +112,7 @@ test('only PDA-operated variants traverse real outbound and carrier nodes before
}
for (const key of ['phase3Customs', 'serviceCenterFlow', 'portSchedule', 'phase3OutboundDispatch',
'phase3CarrierScheduleQuery', 'phase4CarrierPickupReady']) assert.match(entry, new RegExp(`'${key}'`))
assert.match(entry, /for \(const key of createdKeys\) delete this\.createdResources\[key\]/)
assert.match(pickupChain, /shippingReady/)
assert.match(entry, /carrierScheduleQueryId/)
assert.match(pickupChain, /pickup\?\.marker === variantMarker/)