fix: keep full-chain acceptance aligned with current APIs

This commit is contained in:
2026-09-11 12:36:12 +08:00
parent 1f20516d23
commit 137f8173ab
2 changed files with 5 additions and 3 deletions
@@ -53,7 +53,7 @@ export async function run(context) {
`${taskPath}?warehouseId=${encodeURIComponent(warehouseId)}`)
const taskDetail = context.apiSuccess(MODULE, '按稳定 taskId 读取 PDA 任务详情', taskDetailResponse, '', OPTIONS)
const pendingResponse = await request(context, 'GET',
`/api/platform/v1/first-leg/pda-loading/tasks/pending?keyword=${encodeURIComponent(containerNo)}`)
`/api/platform/v1/first-leg/pda-loading/tasks/pending?warehouseId=${encodeURIComponent(warehouseId)}&keyword=${encodeURIComponent(containerNo)}`)
const pendingTasks = context.apiSuccess(MODULE, '读取当前操作员 PDA pending 列表', pendingResponse, '', OPTIONS)
const pendingTask = Array.isArray(pendingTasks)
? pendingTasks.find((item) => id(item?.taskId) === taskId)
@@ -93,8 +93,10 @@ async function captureCompletedOrder(context, containerNo, expectedCustomerId) {
async function loginMerchantForNegativeProbe(context) {
const fixture = context.context?.merchantQualificationFixture
if (!fixture?.username || !fixture?.password) return null
const response = await context.request('POST', '/api/auth/login', { loginId: fixture.username, password: fixture.password }, '')
const username = fixture?.username || context.options?.merchantUsername
const password = fixture?.password || context.options?.merchantPassword
if (!username || !password) return null
const response = await context.request('POST', '/api/auth/login', { loginId: username, password }, '')
const data = success(response) ? response.body?.data : null
context.addStep(MODULE, '本轮客户登录取得海外令牌用于PDA越权反证', response,
success(response) && nonBlank(data?.overseasAccessToken),