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

main
ts 27 lines 1 KB
Raw
1 import { expect } from "e2e";
2
3 import { test, WEB } from "./t3.ts";
4
5 test(
6 "An explicitly opened HTML report in a dot-prefixed folder renders its contents",
7 WEB,
8 async ({ t3, app, screen, browser }) => {
9 const project = await t3.project("demo", {
10 ".reports/report.html": "<!doctype html><html><body><h1>Quarterly report</h1></body></html>",
11 });
12 const thread = await t3.thread({ project, title: "Review report", messages: ["Start"] });
13 await t3.open(thread);
14 await expect(screen.getByText("fixture turn complete", { exact: false })).toBeVisible();
15
16 await browser.keyboard.press("Control+p");
17 await screen.getByPlaceholder("Search files…").fill("report.html");
18 await screen.getByRole("option", "report.html", { exact: false }).tap();
19
20 const document = browser.frameLocator('iframe[title=".reports/report.html"]');
21 try {
22 await expect(document.locator("body")).toContainText("Quarterly report");
23 } finally {
24 await app.screenshot("report-preview");
25 }
26 },
27 );