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
| 1 | import { expect } from "e2e"; |
| 2 | |
| 3 | import { test, WEB } from "./t3.ts"; |
| 4 | |
| 5 | test("Find in thread matches İstanbul with istanbul", WEB, async ({ t3, app, screen, browser }) => { |
| 6 | const project = await t3.project("demo"); |
| 7 | const thread = await t3.thread({ |
| 8 | project, |
| 9 | title: "Travel notes", |
| 10 | messages: ["Travel notes for İstanbul"], |
| 11 | }); |
| 12 | await t3.open(thread); |
| 13 | await screen.getByRole("button", /^Agent Travel notes for İstanbul/).tap(); |
| 14 | await browser |
| 15 | .locator("[data-user-message-body]") |
| 16 | .getByText("Travel notes for İstanbul", { exact: true }) |
| 17 | .waitFor(); |
| 18 | |
| 19 | await browser.keyboard.press("Control+f"); |
| 20 | await screen.getByRole("searchbox", "Find in thread").fill("istanbul"); |
| 21 | try { |
| 22 | await expect |
| 23 | .poll( |
| 24 | () => |
| 25 | browser.evaluate<string>( |
| 26 | 'document.querySelector("[data-thread-find-bar] span[aria-hidden]")?.textContent ?? ""', |
| 27 | ), |
| 28 | { message: "Find in thread counts İstanbul as a match for istanbul" }, |
| 29 | ) |
| 30 | .toBe("1/1"); |
| 31 | } finally { |
| 32 | await app.screenshot("istanbul-find-result"); |
| 33 | } |
| 34 | }); |