mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
77f7c991df
commit
04de249df4
1 file changed
+10
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user