t3-code-android-nightly/scripts/scenarios/html-report-in-dot-folder.e2e.ts
Wout Stiens 6d05c5f496
fix(server): HTML reports in dot-prefixed folders no longer open as Not Found (#38210)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
2026-11-19 17:03:59 -03:00

27 lines
1 KiB
TypeScript

import { expect } from "e2e";
import { test, WEB } from "./t3.ts";
test(
"An explicitly opened HTML report in a dot-prefixed folder renders its contents",
WEB,
async ({ t3, app, screen, browser }) => {
const project = await t3.project("demo", {
".reports/report.html": "<!doctype html><html><body><h1>Quarterly report</h1></body></html>",
});
const thread = await t3.thread({ project, title: "Review report", messages: ["Start"] });
await t3.open(thread);
await expect(screen.getByText("fixture turn complete", { exact: false })).toBeVisible();
await browser.keyboard.press("Control+p");
await screen.getByPlaceholder("Search files…").fill("report.html");
await screen.getByRole("option", "report.html", { exact: false }).tap();
const document = browser.frameLocator('iframe[title=".reports/report.html"]');
try {
await expect(document.locator("body")).toContainText("Quarterly report");
} finally {
await app.screenshot("report-preview");
}
},
);