From 04de249df48c34d4608176ae420f8eda7e164b5b Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 9 Nov 2026 02:53:51 -0600 Subject: [PATCH] test(evals): check duplicate-answer's answered card on either the classic or Coordinator receipt With the Coordinator workspace (on by default) an answered question renders as an "Answers recorded" link that jumps to the human answer in the thread, not the classic expandable receipt. The scripted human checks whichever one the page shows and confirms the answer there. Co-Authored-By: Claude Opus 5.5 --- .../identity-confirmation-workflows.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/runner-e2e/chat-catalog-domains/identity-confirmation-workflows.ts b/tests/runner-e2e/chat-catalog-domains/identity-confirmation-workflows.ts index 4ce2e4efee7..2f90d28fef7 100644 --- a/tests/runner-e2e/chat-catalog-domains/identity-confirmation-workflows.ts +++ b/tests/runner-e2e/chat-catalog-domains/identity-confirmation-workflows.ts @@ -200,8 +200,16 @@ export const confirmationWorkflowIdentityCases: readonly ChatCatalogCase[] = [ await waitForAnswerContinuation(ctx, state); for (const page of [ctx.input.page, other]) { await page.reload({ waitUntil: "domcontentloaded", timeout: remainingIdentityObservationBudget(ctx) }); - const receipt = page.locator(`#interaction-${entity(state, "original").id}`).getByTestId("task-chat-answered-questions-receipt"); - await expect(receipt).toBeVisible({ timeout: remainingIdentityObservationBudget(ctx) }); await receipt.locator("summary").click({ timeout: remainingIdentityObservationBudget(ctx) }); await expect(receipt).toContainText("Acorn", { timeout: remainingIdentityObservationBudget(ctx) }); + // The answered card is either the classic expandable receipt or the + // Coordinator workspace's "Answers recorded" link, which jumps to the + // human answer rendered in the thread. Check whichever this person sees. + const questionId = entity(state, "original").id, card = page.locator(`#interaction-${questionId}`); + const classic = card.getByTestId("task-chat-answered-questions-receipt"), coordinator = card.getByRole("link", { name: /^Answers recorded/ }); + await expect(classic.or(coordinator)).toBeVisible({ timeout: remainingIdentityObservationBudget(ctx) }); + if (await coordinator.isVisible()) { + await coordinator.click({ timeout: remainingIdentityObservationBudget(ctx) }); + await expect(page.locator(`[id="comment-interaction-response:${questionId}"]`)).toContainText("Acorn", { timeout: remainingIdentityObservationBudget(ctx) }); + } else { await classic.locator("summary").click({ timeout: remainingIdentityObservationBudget(ctx) }); await expect(classic).toContainText("Acorn", { timeout: remainingIdentityObservationBudget(ctx) }); } await expect(page.locator(`#interaction-${entity(state, "original").id}`).getByTestId("task-chat-unanswered-question")).toHaveCount(0, { timeout: remainingIdentityObservationBudget(ctx) }); } state.bothTabsResolved = true;