- Delete clickNewTabButton (duplicate of clickNewChat) and clickNewTerminalButton (duplicate of clickNewTerminal); update all call sites - Rename clickTerminal → clickNewTerminal to match clickNewChat naming pattern - Delete waitForLauncherPanel (deprecated no-op) - Delete waitForAgentFinishUI and getToolCallCount (dead exports never imported) - Remove ensureE2EStorageSeeded, assertE2EUsesSeededTestDaemon, and related helpers from app.ts — the paseoE2ESetup auto-fixture seeds via addInitScript on every navigation, making these redundant - Simplify gotoAppShell to a one-liner; simplify gotoHome to use .or() instead of three-way if-else chain - Strip try/catch self-heal from ensureHostSelected — the fixture guarantees preferences alignment, so the workaround is never needed
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
import { expect, test } from "./fixtures";
|
|
import { clickNewTerminal } from "./helpers/launcher";
|
|
import { setupDeterministicPrompt, waitForTerminalContent } from "./helpers/terminal-perf";
|
|
|
|
test.describe("Workspace cwd correctness", () => {
|
|
test("main checkout workspace opens terminals in the project root", async ({
|
|
page,
|
|
withWorkspace,
|
|
}) => {
|
|
test.setTimeout(60_000);
|
|
|
|
const workspace = await withWorkspace({ prefix: "workspace-cwd-main-" });
|
|
await workspace.navigateTo();
|
|
await clickNewTerminal(page);
|
|
|
|
const terminal = page.locator('[data-testid="terminal-surface"]');
|
|
await expect(terminal.first()).toBeVisible({ timeout: 20_000 });
|
|
await terminal.first().click();
|
|
|
|
await setupDeterministicPrompt(page, `PWD_READY_${Date.now()}`);
|
|
await terminal.first().pressSequentially("pwd\n", { delay: 0 });
|
|
|
|
await waitForTerminalContent(page, (text) => text.includes(workspace.repoPath), 10_000);
|
|
});
|
|
|
|
test("worktree workspace opens terminals in the worktree directory", async ({
|
|
page,
|
|
withWorkspace,
|
|
}) => {
|
|
test.setTimeout(90_000);
|
|
|
|
const workspace = await withWorkspace({ worktree: true, prefix: "workspace-cwd-worktree-" });
|
|
await workspace.navigateTo();
|
|
await clickNewTerminal(page);
|
|
|
|
const terminal = page.locator('[data-testid="terminal-surface"]');
|
|
await expect(terminal.first()).toBeVisible({ timeout: 20_000 });
|
|
await terminal.first().click();
|
|
|
|
await setupDeterministicPrompt(page, `PWD_READY_${Date.now()}`);
|
|
await terminal.first().pressSequentially("pwd\n", { delay: 0 });
|
|
await waitForTerminalContent(page, (text) => text.includes(workspace.repoPath), 10_000);
|
|
});
|
|
});
|