test(web): look for the bot reply in the transcript only

The main conversation's sidebar row now previews the latest reply, so the
unscoped text lookup matched the sidebar too and failed in strict mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
This commit is contained in:
Claude 2026-10-03 15:52:39 +00:00
parent 7a32100b53
commit ef15ec61b1
No known key found for this signature in database

View File

@ -89,7 +89,7 @@ test("message hover shows beside-bubble actions; reply links to parent", async (
`hover-bot-${stamp} ${"please look into this ".repeat(7)}`,
);
const botText = page.getByText(/i handled: hover-bot-/);
await expect(botText).toBeVisible({ timeout: 20_000 });
await expect(transcript.getByText(/i handled: hover-bot-/)).toBeVisible({ timeout: 20_000 });
const botRow = transcript.locator(`[data-message-id]`).filter({ has: botText }).first();
await expect(botRow).toBeVisible();
await expectRailAtRest(page, botRow);
@ -404,7 +404,9 @@ test.describe("touch message actions", () => {
const composer = page.getByRole("combobox", { name: /^Message/ });
await sendComposerMessage(page, composer, `touch-bot-${Date.now()}`);
const botText = page.getByText(/i handled: touch-bot-/);
await expect(botText).toBeVisible({ timeout: 20_000 });
await expect(page.getByTestId("transcript").getByText(/i handled: touch-bot-/)).toBeVisible({
timeout: 20_000,
});
const row = page
.getByTestId("transcript")
.locator("[data-message-id]")