mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 20:32:46 +00:00
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { test, expect } from "./fixtures";
|
|
import { createAgent, ensureHostSelected, gotoHome, setWorkingDirectory } from "./helpers/app";
|
|
import { createTempGitRepo } from "./helpers/workspace";
|
|
|
|
test("agent details sheet shows IDs and copy toast", async ({ page }) => {
|
|
test.setTimeout(120_000);
|
|
const repo = await createTempGitRepo();
|
|
const prompt = "Respond with exactly: Hello";
|
|
|
|
try {
|
|
await gotoHome(page);
|
|
await setWorkingDirectory(page, repo.path);
|
|
await ensureHostSelected(page);
|
|
await createAgent(page, prompt);
|
|
|
|
await page.getByTestId("agent-overflow-menu").click();
|
|
await expect(page.getByTestId("agent-details-sheet")).toBeVisible();
|
|
|
|
await expect(page.getByTestId("agent-details-agent-id")).toBeVisible();
|
|
await expect(page.getByTestId("agent-details-agent-id-value")).not.toHaveText(
|
|
"Not available"
|
|
);
|
|
|
|
await expect(page.getByTestId("agent-details-persistence-session-id")).toBeVisible();
|
|
await expect(
|
|
page.getByTestId("agent-details-persistence-session-id-value")
|
|
).not.toHaveText("Not available", { timeout: 90_000 });
|
|
|
|
await page.getByTestId("agent-details-agent-id").click();
|
|
await expect(page.getByTestId("app-toast")).toBeVisible();
|
|
await expect(page.getByTestId("app-toast-message")).toHaveText(/copied/i);
|
|
} finally {
|
|
await repo.cleanup();
|
|
}
|
|
});
|