@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 03:37 UTC

main
ts 38 lines 1.17 KB
Raw
1 import { expect } from "e2e";
2
3 import { test, WEB } from "./t3.ts";
4
5 test(
6 "Find in thread matches the displayed line range of a file link",
7 WEB,
8 async ({ t3, app, screen, browser }) => {
9 const project = await t3.project("demo", { "src/notes.ts": "// Notes\n".repeat(64) });
10 const thread = await t3.thread({
11 project,
12 title: "File review",
13 messages: ["See [src/notes.ts](src/notes.ts#L42-L64)"],
14 });
15 await t3.open(thread);
16 await screen.getByRole("button", /^Agent See/).tap();
17 await browser
18 .locator("[data-user-message-body]")
19 .getByText("notes.ts · L42–64", { exact: true })
20 .waitFor();
21
22 await browser.keyboard.press("Control+f");
23 await screen.getByRole("searchbox", "Find in thread").fill("L42–64");
24 try {
25 await expect
26 .poll(
27 () =>
28 browser.evaluate<string>(
29 'document.querySelector("[data-thread-find-bar] span[aria-hidden]")?.textContent ?? ""',
30 ),
31 { message: "Find in thread counts the displayed line range as a match" },
32 )
33 .toBe("1/1");
34 } finally {
35 await app.screenshot("file-range-find-result");
36 }
37 },
38 );