@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 33 lines 1.05 KB
Raw
1 import { expect } from "e2e";
2
3 import { test, WEB } from "./t3.ts";
4
5 const FILE = "quarterly-figures.md";
6
7 test(
8 "The file citation tooltip shows the size even after workspace search finds the file",
9 WEB,
10 async ({ t3, app, browser, screen }) => {
11 const project = await t3.project("demo", { [FILE]: "x".repeat(2048) });
12 const thread = await t3.thread({
13 project,
14 title: "Review figures",
15 messages: [`See :codex-file-citation{path="${FILE}" line_range_start="1"}`],
16 });
17 await t3.open(thread);
18
19 await screen.getByRole("textbox").pressSequentially(`@${FILE}`);
20 await screen.getByRole("option", FILE, { exact: false }).hover();
21 await browser.keyboard.press("Escape");
22 await screen.getByRole("button", /^Agent See/).tap();
23 await screen.getByRole("link", /^quarterly-figures\.md/).hover();
24
25 try {
26 await expect(
27 browser.locator('[data-slot="tooltip-viewport"]:has-text("quarterly-figures.md")'),
28 ).toContainText("2 KB");
29 } finally {
30 await app.screenshot("cited-file-tooltip");
31 }
32 },
33 );