mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Adds a `withWorkspace` Playwright fixture plus composable helpers (permissions, sidebar, composer, agent-stream, settings) so specs read as user-level intent. Migrates workspace-lifecycle and settings-host-page to the new DSL as proof.
48 lines
1.8 KiB
TypeScript
48 lines
1.8 KiB
TypeScript
import { test } from "./fixtures";
|
|
import {
|
|
createAgentChatFromLauncher,
|
|
createStandaloneTerminalFromLauncher,
|
|
expectTerminalCwd,
|
|
} from "./helpers/workspace-lifecycle";
|
|
|
|
test.describe("Workspace lifecycle", () => {
|
|
// The first test after a spec-file switch can intermittently fail because
|
|
// the shared daemon still holds stale sessions from the previous spec.
|
|
// One retry is enough for the daemon to stabilize.
|
|
test.describe.configure({ retries: 1 });
|
|
|
|
test.describe("Main checkout", () => {
|
|
test("creates an agent chat via New Chat", async ({ page, withWorkspace }) => {
|
|
test.setTimeout(60_000);
|
|
const workspace = await withWorkspace({ prefix: "lifecycle-main-chat-" });
|
|
await workspace.navigateTo();
|
|
await createAgentChatFromLauncher(page);
|
|
});
|
|
|
|
test("creates a terminal with correct CWD", async ({ page, withWorkspace }) => {
|
|
test.setTimeout(60_000);
|
|
const workspace = await withWorkspace({ prefix: "lifecycle-main-shell-" });
|
|
await workspace.navigateTo();
|
|
await createStandaloneTerminalFromLauncher(page);
|
|
await expectTerminalCwd(page, workspace.repoPath);
|
|
});
|
|
});
|
|
|
|
test.describe("Worktree workspace", () => {
|
|
test("creates an agent chat via New Chat", async ({ page, withWorkspace }) => {
|
|
test.setTimeout(90_000);
|
|
const workspace = await withWorkspace({ worktree: true, prefix: "lifecycle-wt-chat-" });
|
|
await workspace.navigateTo();
|
|
await createAgentChatFromLauncher(page);
|
|
});
|
|
|
|
test("creates a terminal with correct CWD", async ({ page, withWorkspace }) => {
|
|
test.setTimeout(90_000);
|
|
const workspace = await withWorkspace({ worktree: true, prefix: "lifecycle-wt-shell-" });
|
|
await workspace.navigateTo();
|
|
await createStandaloneTerminalFromLauncher(page);
|
|
await expectTerminalCwd(page, workspace.repoPath);
|
|
});
|
|
});
|
|
});
|