test: wait for code queue feedback text

This commit is contained in:
Codex
2026-05-20 05:09:51 +00:00
parent 93e4630497
commit 35a368d0d5
+6 -1
View File
@@ -1233,6 +1233,10 @@ async function runCodeQueueRetryTraceFixture(page: Page, frontendUrl: string): P
}, taskId);
await page.locator('[data-testid="codex-judge-feedback-prompt-attempt-1"] summary').click();
await page.waitForFunction(() => (document.querySelector('[data-testid="codex-judge-feedback-prompt-attempt-1"]') as HTMLDetailsElement | null)?.open === true, undefined, { timeout: 5000 });
await page.waitForFunction(() => {
const text = document.querySelector('[data-testid="codex-judge-feedback-prompt-attempt-1-text"]')?.textContent || "";
return text.includes("Continue with attempt 2");
}, undefined, { timeout: 5000 });
const feedbackText = await page.getByTestId("codex-judge-feedback-prompt-attempt-1-text").innerText({ timeout: 5000 });
const currentStepRows = await page.locator('[data-testid="codex-execution-summary-current"] .codex-trace-step').count();
return {
@@ -1251,7 +1255,8 @@ async function runCodeQueueRetryTraceFixture(page: Page, frontendUrl: string): P
ok: beforeExpand.cardAttemptVisible === true
&& beforeExpand.currentAttempt === "2"
&& beforeExpand.currentRunning === "true"
&& beforeExpand.currentText.includes("Attempt 2 running")
&& beforeExpand.currentText.includes("执行过程摘要 #2")
&& beforeExpand.currentText.includes("STEP 2 raw")
&& beforeExpand.currentBeforeJudge === true
&& beforeExpand.judgeBeforeFeedback === true
&& beforeExpand.currentJudgeMissing === true