The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { expect } from "e2e"; |
| 2 | |
| 3 | import { test, WEB } from "./t3.ts"; |
| 4 | |
| 5 | test( |
| 6 | "A fork renamed before its first message keeps that name", |
| 7 | WEB, |
| 8 | async ({ t3, app, screen }) => { |
| 9 | const project = await t3.project("demo"); |
| 10 | const thread = await t3.thread({ project, title: "Earlier work", messages: ["first"] }); |
| 11 | await t3.open(thread); |
| 12 | |
| 13 | await expect(screen.getByText("first fixture turn complete", { exact: false })).toBeVisible(); |
| 14 | await screen.getByRole("button", "Fork from this response").first().tap(); |
| 15 | const forkActions = screen.getByRole("button", "Thread actions for Earlier work fork"); |
| 16 | await expect(forkActions).toBeVisible(); |
| 17 | |
| 18 | await forkActions.tap(); |
| 19 | await screen.getByRole("menuitem", "Rename thread").tap(); |
| 20 | const title = screen.getByRole("textbox", "Thread title"); |
| 21 | await title.fill("Storage notes"); |
| 22 | await title.press("Enter"); |
| 23 | const renamedActions = screen.getByRole("button", "Thread actions for Storage notes"); |
| 24 | await expect(renamedActions).toBeVisible(); |
| 25 | |
| 26 | const composer = screen.getByRole("textbox"); |
| 27 | await composer.pressSequentially("Try SQLite instead"); |
| 28 | await composer.press("Enter"); |
| 29 | // The fork shows its source's reply too, so the second one is the fork's own. |
| 30 | await expect( |
| 31 | screen.getByText("first fixture turn complete", { exact: false }).nth(1), |
| 32 | ).toBeVisible(); |
| 33 | await app.screenshot("after-first-message"); |
| 34 | await expect(renamedActions).toBeVisible(); |
| 35 | }, |
| 36 | ); |