test(acceptance): reuse fixed customers and align native fulfillment flows
This commit is contained in:
@@ -27,7 +27,7 @@ function fixture(fault = '') {
|
||||
data = { total: rows.length, records: rows }
|
||||
} else if (path.includes('/relabel-applications/')) data = { application: { relabelNo: 'RL-1', customerOrderNo: 'WT-1', status: 'READY_FOR_OUTBOUND', fulfillmentStatus: fault === 'wrong relabel' ? 'COMPLETED' : 'OUTBOUNDED' } }
|
||||
else data = { transferNo: 'WT-1', status: shipped ? 'OUTBOUNDED' : 'ALLOCATED', relabelNo: 'RL-1', relabelApplicationId: '501', operatingWarehouseId: '201',
|
||||
packageCount: 1, fbaWarehouseCode: 'FBA-1', outboundAt: shipped ? '2026-10-22T12:00:00' : null,
|
||||
packageCount: 1, fbaWarehouseCode: 'FBA-1', actualShipAt: shipped && fault !== 'missing shipment time' ? '2026-10-22T12:00:00' : null,
|
||||
allocations: [{ ...allocation, status: shipped ? 'SHIPPED' : 'RESERVED' }] }
|
||||
return { http: 200, body: { code: '200', data } }
|
||||
} }
|
||||
@@ -47,7 +47,7 @@ test('原转运出库验证同单新SKU扣库及重放唯一性', async () => {
|
||||
assert.equal(f.calls.length, count)
|
||||
})
|
||||
|
||||
for (const fault of ['network', 'existing shipment', 'foreign customer', 'wrong pallet', 'old sku', 'double shipment', 'replay ledger', 'wrong relabel', 'disk']) {
|
||||
for (const fault of ['network', 'existing shipment', 'foreign customer', 'wrong pallet', 'old sku', 'double shipment', 'replay ledger', 'wrong relabel', 'missing shipment time', 'disk']) {
|
||||
test(`原转运出库拒绝 ${fault}`, async () => {
|
||||
const f = fixture(fault)
|
||||
await assert.rejects(outboundWarehouseTransfer(f.context, f.options))
|
||||
|
||||
Reference in New Issue
Block a user