优化
This commit is contained in:
@@ -279,6 +279,28 @@ test('task page permits explicit platform scope zero and positive customer scope
|
||||
}
|
||||
})
|
||||
|
||||
test('船节点分页接受已规范化的非 ISO 柜号,仍拒绝空值和未规范化输入', async () => {
|
||||
for (const trackingNo of ['JZXH10231043', 'TEST-GRAY-CAB-NOISO', 'ZCSU7881971']) {
|
||||
assert.equal(await taskPageStructure({ trackingNo }), true, trackingNo)
|
||||
}
|
||||
for (const trackingNo of ['', ' ', '\t', 'jzxh10231043', ' JZXH10231043', 'JZXH 10231043', null, undefined, 123]) {
|
||||
assert.equal(await taskPageStructure({ trackingNo }), false, String(trackingNo))
|
||||
}
|
||||
})
|
||||
|
||||
test('非 ISO 柜号沿本轮归属核验完成船节点详情及人工节点链', async () => {
|
||||
const fixture = markerOwnedContext()
|
||||
fixture.task.trackingNo = 'TEST-GRAY-CAB-NOISO'
|
||||
fixture.context.createdResources.phase3CarrierScheduleQuery.trackingNo = fixture.task.trackingNo
|
||||
|
||||
await runUntilPickupReady(fixture.context)
|
||||
|
||||
assert.equal(fixture.task.latestActualNode, 'PICKUP_READY')
|
||||
assert.ok(fixture.assertions.every((check) => check.passed))
|
||||
assert.ok(fixture.context.calls.filter((call) => call.method === 'POST')
|
||||
.every((call) => call.path === `${BASE}/${QUERY_ID}/manual-nodes`))
|
||||
})
|
||||
|
||||
test('task page still rejects negative, missing, numeric and noncanonical customer scopes', async () => {
|
||||
for (const customerId of ['-1', '-9007199254740993002', '', '00', '01', '+0', '0.0', 'customer', null, undefined, 0, 7]) {
|
||||
assert.equal(await taskPageStructure({ customerId }), false, `customerId=${String(customerId)}`)
|
||||
|
||||
Reference in New Issue
Block a user