test: carry frozen sku receipts into pda acceptance

This commit is contained in:
2026-08-25 09:23:28 +08:00
parent 29b2f080d8
commit df4b7a1f6e
6 changed files with 44 additions and 6 deletions
@@ -18,6 +18,8 @@ test('order fixture defaults to FBA and accepts only the explicit OVERSEAS varia
assert.match(orders, /warehouseType=\$\{encodeURIComponent\(destinationType\)\}/)
assert.match(orders, /destinationType: master\.destinationType/)
assert.match(orders, /fulfillmentType: String\(context\.context\?\.orderFulfillmentType \|\| 'STANDARD'\)/)
assert.match(orders, /skuCodes: payload\.cargoes\.map\(\(cargo\) => cargo\.skuNo\)/)
assert.match(orders, /skuLines: payload\.cargoes\.map\(\(cargo\) => \(\{/)
assert.match(orders, /destinationType,\s*\n\s*\}\)/)
assert.doesNotMatch(orders, /const fbaResponse =/)
})
@@ -70,14 +72,21 @@ test('measurement and loading pass destination identity into the LOADED producer
assert.match(measurement, /destinationType: context\.createdResources\?\.orders\?\.destinationType/)
assert.match(loading, /destinationType: initial\?\.summary\?\.destinationType \|\| source\?\.destinationType/)
assert.match(loading, /fulfillmentType: source\?\.fulfillmentType \|\| 'STANDARD'/)
assert.match(loading, /Array\.isArray\(incrementalFixture\?\.skuCodes\)/)
assert.match(loading, /Array\.isArray\(incrementalFixture\?\.skuLines\)/)
assert.match(finalize, /destinationType: fixture\.destinationType \|\| null/)
assert.match(finalize, /fulfillmentType: fixture\.fulfillmentType \|\| 'STANDARD'/)
assert.match(finalize, /skuCodes: Array\.isArray\(fixture\.skuCodes\) \? fixture\.skuCodes : \[\]/)
assert.match(finalize, /skuLines: Array\.isArray\(fixture\.skuLines\) \? fixture\.skuLines : \[\]/)
assert.match(finalize, /resourceKey: `\$\{context\.marker\}:\$\{fixture\.destinationType \|\| 'UNKNOWN'\}:\$\{fixture\.containerNo \|\| containerBookingId\}`/)
assert.match(finalize, /phase4InboundProducerFixtures = collectPhase4InboundProducerFixture/)
const entry = read('../admin-test-env-acceptance.mjs')
assert.match(entry, /runPhase4ProducerVariant\('DROPSHIP-PRIMARY', 'FBA', 'ONE_CLICK_DROPSHIP'\)/)
assert.match(entry, /orderFulfillmentType/)
assert.match(entry, /fulfillmentType: fixtureOrder\.fulfillmentType \|\| 'STANDARD'/)
assert.match(entry, /skuCodes: Array\.isArray\(fixtureOrder\.skuCodes\) \? fixtureOrder\.skuCodes : \[\]/)
assert.match(entry, /skuLines: Array\.isArray\(fixtureOrder\.skuLines\) \? fixtureOrder\.skuLines : \[\]/)
const pda = read('phase4-overseas-pda.mjs')
assert.match(pda, /find\(\(item\) => item\?\.fulfillmentType === 'ONE_CLICK_DROPSHIP'\)/)
assert.match(pda, /skuFixtures\(context, producer\)/)
})