This commit is contained in:
2026-08-28 09:19:18 +08:00
parent e72ac14425
commit a719a903cd
10 changed files with 174 additions and 50 deletions
+8 -5
View File
@@ -1206,7 +1206,7 @@ export class AcceptanceRun {
}
}
async preparePhase3LoadingFixture(suffix = '') {
async preparePhase3LoadingFixture(suffix = '', requireSharedOverflow = true) {
const originalMarker = this.marker
const fixtureMarker = `${originalMarker}-LOAD${suffix}`
const createdKeys = ['orders', 'ocrInbound', 'testInbound', 'inboundMeasurement']
@@ -1228,13 +1228,16 @@ export class AcceptanceRun {
this.assert('phase3-loading-fixture', 'A0 隔离使用本轮订单收货仓', null,
Boolean(warehouseId), `warehouseId=${warehouseId || 'missing'}`,
{ scenario: 'phase3-loading-a0-fixture', deploymentBlocker: true })
const disabledLocations = await this.disableAvailableLocationsForA0(warehouseId)
this.context.phase3LoadingRequireSharedOverflow = true
const disabledLocations = requireSharedOverflow
? await this.disableAvailableLocationsForA0(warehouseId) : []
this.context.phase3LoadingRequireSharedOverflow = requireSharedOverflow
try {
const measurement = await import(new URL('./admin-test-env-modules/inbound-measurement.mjs', import.meta.url))
await this.executeModule('inbound-measurement-phase3-loading-fixture', () => measurement.run(this))
} finally {
await this.restoreAvailableLocationsAfterA0(warehouseId, disabledLocations)
if (requireSharedOverflow) {
await this.restoreAvailableLocationsAfterA0(warehouseId, disabledLocations)
}
}
const fixture = this.createdResources.inboundMeasurement || this.createdResources.orders
const fixtureOrder = this.createdResources.orders || {}
@@ -1320,7 +1323,7 @@ export class AcceptanceRun {
this.context.orderFulfillmentType = fulfillmentType
this.context.phase4ProducerMatrixMarker = matrixMarker
try {
restoreFixture = await this.preparePhase3LoadingFixture()
restoreFixture = await this.preparePhase3LoadingFixture('', false)
const loading = await import(new URL('./admin-test-env-modules/phase3-loading.mjs', import.meta.url))
await this.executeModule(`phase3-loading-phase4-${label}`, () => loading.run(this))
const finalize = await import(new URL('./admin-test-env-modules/phase3-loading-finalize.mjs', import.meta.url))