test: isolate overseas PDA operations fixture

This commit is contained in:
2026-09-24 05:08:46 +08:00
parent eb8662070a
commit 8f1fafe572
6 changed files with 18 additions and 3 deletions
@@ -130,6 +130,7 @@ test('only PDA-operated variants traverse real outbound and carrier nodes before
assert.match(entry, /runPhase4ProducerVariant\('OVERSEAS-PRIMARY', 'OVERSEAS', 'ONE_CLICK_DROPSHIP', true\)/)
assert.match(entry, /runPhase4ProducerVariant\('FBA-STANDARD', 'FBA', 'STANDARD', true\)/)
assert.match(entry, /runPhase4ProducerVariant\('FBA-SECOND', 'FBA', 'STANDARD', true\)/)
assert.match(entry, /runPhase4ProducerVariant\('FBA-OPERATIONS', 'FBA', 'STANDARD', true\)/)
assert.match(entry, /secondStandardFbaReady\?\.shippingReady === true/)
assert.match(entry, /runPhase4ProducerVariant\('SECONDARY', 'FBA', 'STANDARD', false\)/)
assert.match(entry, /const hasSecondaryProducer =/)
@@ -152,7 +152,8 @@ test('PDA module covers the container-number receiving contract and excludes out
assert.match(source, /generatedPalletsByInbound/)
assert.match(source, /standardFbaProducers = \(Array\.isArray\(matrix\?\.containers\) \? matrix\.containers : \[\]\)/)
assert.match(source, /item\?\.fulfillmentType !== 'ONE_CLICK_DROPSHIP'/)
assert.match(source, /\.slice\(0, 2\)/)
assert.match(source, /FBA-OPERATIONS/)
assert.match(source, /\.slice\(0, 3\)/)
assert.match(source, /const producers = \[dropship, \.\.\.standardFbaProducers,/)
assert.doesNotMatch(source, /创建当前柜实收托盘|创建当前柜实收库位|async function createPallet/)
assert.match(source, /retained as acceptance evidence/)
@@ -757,6 +757,10 @@ export async function run(context) {
// ABE8 producer untouched when the matrix contains both destinations so the
// following dispatch module can still observe RECEIVED candidates for ABE4+ABE8.
const fixture = fixturesByAuxiliaryCapacity.find((item) => item?.destinationType === 'FBA'
&& /-P4-FBA-OPERATIONS(?:-R\d+)?:/.test(String(item?.resourceKey || ''))
&& (item?.auxiliaryPallets?.length || 0) > 0 && Array.isArray(item?.inventory)
&& item.inventory.reduce((sum, line) => sum + Number(line?.availablePackages || 0), 0) > 3)
|| fixturesByAuxiliaryCapacity.find((item) => item?.destinationType === 'FBA'
&& item?.fbaWarehouseCode === 'ABE4'
&& (item?.auxiliaryPallets?.length || 0) > 0 && Array.isArray(item?.inventory)
&& item.inventory.reduce((sum, line) => sum + Number(line?.availablePackages || 0), 0) > 3)
@@ -935,9 +935,9 @@ export async function run(context) {
const standardFbaProducers = (Array.isArray(matrix?.containers) ? matrix.containers : [])
.filter((item) => item?.destinationType === 'FBA')
.filter((item) => item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP')
.filter((item) => /-P4-(?:FBA-STANDARD|FBA-SECOND)(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
.filter((item) => /-P4-(?:FBA-STANDARD|FBA-SECOND|FBA-OPERATIONS)(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
.sort((left, right) => String(left?.resourceKey).localeCompare(String(right?.resourceKey)))
.slice(0, 2)
.slice(0, 3)
// The sealed dropship pallet proves the indivisible handover. A separate standard FBA
// fixture supplies multiple cartons for reversible operations. The second standard FBA
// fixture remains available for the multi-destination dispatch and delivery split proof.