test(pda): assert authoritative sealed pallet task fixtures

This commit is contained in:
2026-09-09 12:35:21 +08:00
parent b03d5e1561
commit 26a3c0c174
+1 -1
View File
@@ -25,7 +25,7 @@ test('a DP scan changes all same-pallet rows locally without any remote command'
const undo = page.match(/undoPallet\(item\) \{[\s\S]*?\n\t\t\t\},/)?.[0]
const behavior = new Function('isPalletItem', 'ITEM_STATUS', `return ({${method}${undo}})`)(isPalletItem, ITEM_STATUS)
let saved = 0
const rows = [{ id: '1', unitType: 'PALLET', palletNo: 'DP-260909-0143', qty: 2, itemStatus: 'PENDING' }, { id: '2', unitType: 'PALLET', palletNo: 'DP-260909-0143', qty: 3, itemStatus: 'PENDING' }, { id: '3', unitType: 'PACKAGE', qty: 1, itemStatus: 'PENDING' }]
const rows = [{ id: '1', unitType: 'SEALED_PALLET', palletNo: 'DP-260909-0143', qty: 2, itemStatus: 'PENDING' }, { id: '2', unitType: 'SEALED_PALLET', palletNo: 'DP-260909-0143', qty: 3, itemStatus: 'PENDING' }, { id: '3', unitType: 'PACKAGE', qty: 1, itemStatus: 'PENDING' }]
const context = { submitting: false, requirePickingOperation: () => true, currentBox: { items: rows }, itemStates: {}, partialQuantities: {}, scannedBoxCodes: {}, recordScanResult() {}, showToast() {}, persistSession() { saved++ } }
behavior.pickScannedPallet.call(context, rows[0])
assert.deepEqual(context.itemStates, { 1: 'picked', 2: 'picked' })