This commit is contained in:
2026-10-08 15:34:47 +08:00
parent 23572c125f
commit c20d5c53e1
13 changed files with 515 additions and 39 deletions
+5
View File
@@ -11,6 +11,11 @@ test('packing preview keeps customer scope internal and exposes stable order ref
assert.equal(value.skus[0].availableQuantity, 8)
})
test('legacy single-customer preview is normalized to all customer orders', () => {
const value = normalizePackingPreview({ customerId: '100', orders: [{ returnNo: 'RT-1' }, { returnNo: 'RT-2' }], skus: [{ skuCode: 'SKU-1', availableQuantity: 8 }] })
assert.deepEqual(value.customers[0].orders.map((item) => item.returnNo), ['RT-1', 'RT-2'])
})
test('return packing API uses exact PDA inventory routes without submitting customer or warehouse scope', async () => {
const calls = []
session.apiBase = '/api'; session.token = 'packing-token'