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

main
ts 26 lines 1.16 KB
Raw
1 import { expect } from "e2e";
2
3 import { test, WEB } from "./t3.ts";
4
5 // Scenarios title with a Codex command that always fails, so reaching it is the fixed behavior;
6 // the bug refused first with "This thread has no messages to title yet."
7 test(
8 "Regenerate title on a fresh fork reaches the title model with the inherited history",
9 WEB,
10 async ({ t3, app, screen }) => {
11 const project = await t3.project("demo");
12 const thread = await t3.thread({ project, title: "Earlier work", messages: ["first"] });
13 await t3.open(thread);
14
15 await expect(screen.getByText("first fixture turn complete", { exact: false })).toBeVisible();
16 await screen.getByRole("button", "Fork from this response").first().tap();
17 const forkActions = screen.getByRole("button", "Thread actions for Earlier work fork");
18 await expect(forkActions).toBeVisible();
19
20 await forkActions.tap();
21 await screen.getByRole("menuitem", "Regenerate title").tap();
22 await expect(screen.getByText("Failed to regenerate thread title")).toBeVisible();
23 await app.screenshot("regenerate-result");
24 await expect(screen.getByText("Codex CLI command", { exact: false })).toBeVisible();
25 },
26 );