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