test(acceptance): reuse fixed customers and align native fulfillment flows
This commit is contained in:
@@ -25,14 +25,16 @@ test('fixed customer relabel wallet only reads existing available funds', async
|
||||
})
|
||||
|
||||
test('relabel uses three physical cartons across current inbounds, never UNBOUND or duplicate positions', () => {
|
||||
const a = { inventoryBalanceId: 'A', inboundOrderId: '1', positions: [
|
||||
const a = { inventoryBalanceId: 'A', inboundOrderId: '1', cartons: [
|
||||
{ cartonMark: 'A1', positionId: '10' }, { cartonMark: 'A2', positionId: '10' }, { cartonMark: 'A3', positionId: '11' }], positions: [
|
||||
{ positionId: '10', palletNo: 'REAL-A', availablePackages: 2 },
|
||||
{ positionId: '11', palletNo: 'UNBOUND', availablePackages: 1 }] }
|
||||
const b = { inventoryBalanceId: 'B', inboundOrderId: '2', positions: [
|
||||
const b = { inventoryBalanceId: 'B', inboundOrderId: '2', cartons: [{ cartonMark: 'B1', positionId: '20' }], positions: [
|
||||
{ positionId: '20', palletNo: 'REAL-B', availablePackages: 1 }] }
|
||||
const selected = selectPhysicalRelabelSources([b, a, a], 'A')
|
||||
assert.deepEqual(selected.map(line => line.position.palletNo), ['REAL-A', 'REAL-A', 'REAL-B'])
|
||||
assert.equal(selectPhysicalRelabelSources([a, a], 'A').length, 2)
|
||||
assert.equal(selectPhysicalRelabelSources([{ ...a, cartons: [] }], 'A').length, 0)
|
||||
})
|
||||
|
||||
test('exception uses the untouched third carton, independent of response ordering', () => {
|
||||
@@ -87,9 +89,9 @@ test('P2 to P5 cover all frozen endpoints, replays and conflict boundaries witho
|
||||
for (const marker of ['按原数计数', '同键重放', '同键异载荷A0409', '旧版本A0409',
|
||||
'SUBMITTED', '移回原库位', 'WAIT_REVIEW', 'REWORK', 'COMPLETED',
|
||||
'chargeAmount: RELABEL_CHARGE_AMOUNT', 'cartonMark:', 'fbaCartonMark:',
|
||||
'inventory-candidates', 'sourceInventoryBalanceId:', 'sourceInventoryPositionId:',
|
||||
'readCurrentBoxedInventory', 'sourceInventoryBalanceId:', 'sourceInventoryPositionId:',
|
||||
'sourceInboundOrderId:', 'operationWarehouseId:', 'relabelItemForUnit', 'sourceLines.map',
|
||||
'sourceLines.push({ source, position, packageCount: 1 })', 'oldLabel: item.cartonMark',
|
||||
'sourceLines.push({ source, position, carton, packageCount: 1 })', 'oldLabel: item.cartonMark',
|
||||
'id(candidate.itemId) !== id(item.itemId)', 'oldLabel: null',
|
||||
'newLabel: item.fbaCartonMark || item.newSkuCode',
|
||||
"operationType: changesCartonLabel ? 'CARTON_AND_SKU' : 'SKU_LABEL'", 'skuItems:',
|
||||
|
||||
Reference in New Issue
Block a user