test: avoid duplicate overseas PDA lock assertion

This commit is contained in:
2026-09-04 15:18:57 +08:00
parent 21796cb83d
commit 1c8d058d71
2 changed files with 18 additions and 5 deletions
@@ -563,11 +563,13 @@ async function runReceiving(context, token, secondaryToken, merchantToken, prefe
`/api/pda/v1/last-leg/receiving-containers/${encodeURIComponent(containerNo)}/prepare`,
{ idempotencyKey: key(context, 'secondary-prepare') }, conflict)
}
const other = candidates.data.find((item) => item.containerNo !== containerNo
&& item.operable === true && item.allPlansReady === true && Number(item.totalPackages) > 0)
if (other) await expected(context, token, 'GET', '当前账号跨柜切换锁返回409',
`/api/pda/v1/last-leg/receiving-containers/${encodeURIComponent(other.containerNo)}`, undefined, conflict)
else blockerGap(context, '跨柜锁409', '当前客户只有一个待收柜,无法在不伪造柜数据的前提下验证跨柜锁')
if (runAuthorizationProbes) {
const other = candidates.data.find((item) => item.containerNo !== containerNo
&& item.operable === true && item.allPlansReady === true && Number(item.totalPackages) > 0)
if (other) await expected(context, token, 'GET', '当前账号跨柜切换锁返回409',
`/api/pda/v1/last-leg/receiving-containers/${encodeURIComponent(other.containerNo)}`, undefined, conflict)
else blockerGap(context, '跨柜锁409', '本轮首柜作业前只有一个可收柜,无法在不伪造柜数据的前提下验证跨柜锁')
}
const photos = await uploadPhotos(context, token)
if (!photos) return
const signBody = { photos, idempotencyKey: key(context, 'sign') }