mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 09:47:53 +00:00
fix(qa): align ask-user protocol shape (#111429)
This commit is contained in:
@@ -81,9 +81,7 @@ Example answered result:
|
||||
"status": "answered",
|
||||
"answers": {
|
||||
"answers": {
|
||||
"deploy_target": {
|
||||
"answers": ["Staging (Recommended)"]
|
||||
}
|
||||
"deploy_target": ["Staging (Recommended)"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ flow:
|
||||
- expr: liveTurnTimeoutMs(env, 45000)
|
||||
- expr: "env.providerMode === 'mock-openai' ? 100 : 250"
|
||||
- assert:
|
||||
expr: "pendingQuestion.questions.length === 3 && pendingQuestion.questions[0].id === 'deploy_target' && pendingQuestion.questions[1].multiSelect === true && pendingQuestion.questions.every((question) => question.isOther === true)"
|
||||
expr: "pendingQuestion.questions.length === 3 && pendingQuestion.questions[0].questionId === 'deploy_target' && pendingQuestion.questions[1].multiSelect === true && pendingQuestion.questions.every((question) => question.isOther === true)"
|
||||
message:
|
||||
expr: "`ask_user question shape drifted: ${JSON.stringify(pendingQuestion.questions)}`"
|
||||
- set: resolution
|
||||
@@ -96,9 +96,9 @@ flow:
|
||||
id: pendingQuestion.id,
|
||||
answers: {
|
||||
answers: {
|
||||
deploy_target: { answers: ['Production'] },
|
||||
checks: { answers: ['Unit (Recommended)', 'E2E'] },
|
||||
release_note: { answers: ['night-shift'] },
|
||||
deploy_target: ['Production'],
|
||||
checks: ['Unit (Recommended)', 'E2E'],
|
||||
release_note: ['night-shift'],
|
||||
},
|
||||
},
|
||||
resolvedBy: 'qa-lab',
|
||||
|
||||
@@ -252,7 +252,7 @@ describe("ask_user prompt delivery", () => {
|
||||
settleAskUserPromptDelivery(reservation.questionId);
|
||||
finishWait?.({
|
||||
status: "answered",
|
||||
answers: { answers: { deploy_target: { answers: ["Production"] } } },
|
||||
answers: { answers: { deploy_target: ["Production"] } },
|
||||
});
|
||||
await expect(pending).resolves.toMatchObject({ details: { status: "answered" } });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user