diff --git a/tests/pda-loading-api.test.mjs b/tests/pda-loading-api.test.mjs index 4c5f6f7..3928c1c 100644 --- a/tests/pda-loading-api.test.mjs +++ b/tests/pda-loading-api.test.mjs @@ -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' })