test: retain a second FBA fixture for delivery split
This commit is contained in:
@@ -137,9 +137,10 @@ test('PDA module covers the container-number receiving contract and excludes out
|
||||
assert.match(source, /rememberGeneratedPlans\(context, plans\)/)
|
||||
assert.match(source, /resolveGeneratedPallet\(context, inbound\)/)
|
||||
assert.match(source, /generatedPalletsByInbound/)
|
||||
assert.match(source, /standardFba = matrix\?\.byDestinationType\?\.FBA\?\.find/)
|
||||
assert.match(source, /standardFbaProducers = \(matrix\?\.byDestinationType\?\.FBA \|\| \[\]\)/)
|
||||
assert.match(source, /item\?\.fulfillmentType !== 'ONE_CLICK_DROPSHIP'/)
|
||||
assert.match(source, /const producers = \[dropship[\s\S]*?standardFba,/)
|
||||
assert.match(source, /\.slice\(0, 2\)/)
|
||||
assert.match(source, /const producers = \[dropship, \.\.\.standardFbaProducers,/)
|
||||
assert.doesNotMatch(source, /创建当前柜实收托盘|创建当前柜实收库位|async function createPallet/)
|
||||
assert.match(source, /retained as acceptance evidence/)
|
||||
assert.match(source, /preferredProducer\?\.cartonMarks\?\.length/)
|
||||
|
||||
@@ -898,10 +898,13 @@ export async function run(context) {
|
||||
}
|
||||
const matrix = context.createdResources?.phase4InboundProducerFixtures
|
||||
const dropship = matrix?.containers?.find((item) => item?.fulfillmentType === 'ONE_CLICK_DROPSHIP')
|
||||
const standardFba = matrix?.byDestinationType?.FBA?.find((item) => item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP')
|
||||
const standardFbaProducers = (matrix?.byDestinationType?.FBA || [])
|
||||
.filter((item) => item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP')
|
||||
.slice(0, 2)
|
||||
// The sealed dropship pallet proves the indivisible handover. A separate standard FBA
|
||||
// fixture supplies multiple cartons for reversible split/merge/unbind and relabel checks.
|
||||
const producers = [dropship, standardFba,
|
||||
// fixture supplies multiple cartons for reversible operations. The second standard FBA
|
||||
// fixture remains available for the multi-destination dispatch and delivery split proof.
|
||||
const producers = [dropship, ...standardFbaProducers,
|
||||
matrix?.byDestinationType?.OVERSEAS?.[0]]
|
||||
.filter(uniqueContainerProducer)
|
||||
const allProducers = Array.isArray(matrix?.containers) ? matrix.containers : producers
|
||||
|
||||
Reference in New Issue
Block a user