test: prepare isolated gray domestic PDA H5 tasks without auto-picking
This commit is contained in:
@@ -136,3 +136,16 @@ test('booking fixture never invents supplier names without formal IDs', () => {
|
||||
assert.doesNotMatch(source, /SPLIT-SHIPPING|SPLIT-AGENT/)
|
||||
assert.doesNotMatch(source, /shippingCompanyName: `|bookingAgentName: `/)
|
||||
})
|
||||
|
||||
|
||||
test('H5 preparation stops after real labels but before claim and refuses already picked data', () => {
|
||||
const checkpoint = source.indexOf('if (context.context?.prepareDomesticPdaH5)')
|
||||
const claim = source.indexOf('const claim = await request', checkpoint)
|
||||
assert.ok(checkpoint > source.indexOf('const labelResponse ='))
|
||||
assert.ok(claim > checkpoint)
|
||||
const boundary = source.slice(checkpoint, claim)
|
||||
assert.match(boundary, /pickedPackageCount\) !== 0/)
|
||||
assert.match(boundary, /throw new Error/)
|
||||
assert.match(boundary, /return \{ preparedForH5: true/)
|
||||
assert.doesNotMatch(boundary, /request\(/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user