fix: keep full-chain acceptance aligned with current APIs
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user