From 35a368d0d52140e95651f0c8c40988a692fa97d5 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 20 May 2026 05:09:51 +0000 Subject: [PATCH] test: wait for code queue feedback text --- scripts/src/e2e.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/src/e2e.ts b/scripts/src/e2e.ts index 50d76054..b8a27ad3 100644 --- a/scripts/src/e2e.ts +++ b/scripts/src/e2e.ts @@ -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