优化
This commit is contained in:
@@ -70,7 +70,17 @@ test('parcel signing allows an empty code but still rejects quantities above the
|
||||
await page.confirmReceipt()
|
||||
assert.equal(calls.length, 1)
|
||||
assert.equal(calls[0].trackingNo, undefined)
|
||||
assert.equal(calls[0].unitCode, '')
|
||||
assert.equal(calls[0].unitCode, undefined)
|
||||
assert.equal(calls[0].palletCode, undefined)
|
||||
})
|
||||
|
||||
test('parcel waybill is submitted as trackingNo and leaves unitCode for the server', async () => {
|
||||
const calls = []
|
||||
const page = setup(async payload => { calls.push(payload); return { unitType: 'PARCEL' } })
|
||||
page.unitType = 'PARCEL'; page.unitCode = ' sf561626 '; page.trackingNo = 'stale-from-pallet'
|
||||
await page.confirmReceipt()
|
||||
assert.equal(calls[0].trackingNo, 'sf561626')
|
||||
assert.equal(calls[0].unitCode, undefined)
|
||||
assert.equal(calls[0].palletCode, undefined)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user