fix overseas PDA producer fixture selection
This commit is contained in:
@@ -1607,6 +1607,11 @@ export class AcceptanceRun {
|
||||
if (!hasStandardFbaProducer()) {
|
||||
await this.runPhase4ProducerVariant('FBA-STANDARD', 'FBA', 'STANDARD', true)
|
||||
}
|
||||
const hasSecondStandardFbaProducer = () => (this.createdResources.phase4InboundProducerFixtures?.containers || [])
|
||||
.some((item) => /-P4-FBA-SECOND(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
|
||||
if (!hasSecondStandardFbaProducer()) {
|
||||
await this.runPhase4ProducerVariant('FBA-SECOND', 'FBA', 'STANDARD', true)
|
||||
}
|
||||
if (Number(readiness().overseasContainerCount || 0) < 1) {
|
||||
await this.runPhase4ProducerVariant('OVERSEAS-PRIMARY', 'OVERSEAS', 'ONE_CLICK_DROPSHIP', true)
|
||||
}
|
||||
@@ -1622,11 +1627,14 @@ export class AcceptanceRun {
|
||||
&& item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP'
|
||||
&& /-P4-FBA-STANDARD(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
|
||||
const overseasReady = containers.find((item) => item?.destinationType === 'OVERSEAS')
|
||||
const secondStandardFbaReady = containers.find((item) =>
|
||||
/-P4-FBA-SECOND(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
|
||||
const awaitingVariants = containers.filter((item) => ['SECONDARY']
|
||||
.some((label) => new RegExp(`-P4-${label}(?:-R\\d+)?:`).test(String(item?.resourceKey || ''))))
|
||||
const shippingMatrixReady = dropshipReady?.shippingReady === true
|
||||
&& Boolean(dropshipReady?.carrierScheduleQueryId)
|
||||
&& standardFbaReady?.shippingReady === true && Boolean(standardFbaReady?.carrierScheduleQueryId)
|
||||
&& secondStandardFbaReady?.shippingReady === true && Boolean(secondStandardFbaReady?.carrierScheduleQueryId)
|
||||
&& overseasReady?.shippingReady === true && Boolean(overseasReady?.carrierScheduleQueryId)
|
||||
&& awaitingVariants.length >= 1
|
||||
&& awaitingVariants.every((item) => item.shippingReady === false
|
||||
|
||||
Reference in New Issue
Block a user