mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* Add detach action for subagents * Translate detached subagent connection error * Address subagent detach review feedback * Fix subagent integration test import * Focus detached subagents as tabs
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { test } from "./fixtures";
|
|
import { expectWorkspaceTabVisible } from "./helpers/archive-tab";
|
|
import { expectAgentTabActive } from "./helpers/launcher";
|
|
import { openAgentRoute } from "./helpers/mock-agent";
|
|
import { seedWorkspace, type SeededWorkspace } from "./helpers/seed-client";
|
|
import {
|
|
detachSubagentFromTrack,
|
|
expectSubagentRowGone,
|
|
expectSubagentRowVisible,
|
|
openSubagentsTrack,
|
|
seedParentWithSubagent,
|
|
} from "./helpers/subagents";
|
|
|
|
test.describe("Subagent detach", () => {
|
|
let workspace: SeededWorkspace;
|
|
|
|
test.beforeAll(async () => {
|
|
workspace = await seedWorkspace({ repoPrefix: "subagent-detach-" });
|
|
});
|
|
|
|
test.afterAll(async () => {
|
|
await workspace?.cleanup();
|
|
});
|
|
|
|
test("detaching a subagent focuses it as a workspace tab", async ({ page }) => {
|
|
const agents = await seedParentWithSubagent(workspace, {
|
|
parentTitle: "Detach parent",
|
|
childTitle: "Detached child",
|
|
});
|
|
|
|
await openAgentRoute(page, {
|
|
workspaceId: agents.workspaceId,
|
|
agentId: agents.parent.id,
|
|
});
|
|
await openSubagentsTrack(page);
|
|
await expectSubagentRowVisible(page, agents.child.id);
|
|
|
|
await detachSubagentFromTrack(page, agents.child.id);
|
|
|
|
await expectSubagentRowGone(page, agents.child.id);
|
|
await expectWorkspaceTabVisible(page, agents.child.id);
|
|
await expectAgentTabActive(page, agents.child.id);
|
|
});
|
|
});
|