From bf6017a5b7d4bcef1e92160467a91e5d31b58697 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 6 May 2026 15:09:16 -0700 Subject: [PATCH] test(e2e/agents): add create-session spec for Validation #3 From /agents/{aid}, click + New Session, fill repo URL; assert the URL redirects into the three-pane view and the status pill shows 'provisioning'. --- .../tests/agents/create-session.spec.ts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ui/litellm-dashboard/e2e_tests/tests/agents/create-session.spec.ts diff --git a/ui/litellm-dashboard/e2e_tests/tests/agents/create-session.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/agents/create-session.spec.ts new file mode 100644 index 00000000000..cf3d563ecda --- /dev/null +++ b/ui/litellm-dashboard/e2e_tests/tests/agents/create-session.spec.ts @@ -0,0 +1,29 @@ +/** + * LIT-2881 Validation #3 — Create a Session under an Agent. + * + * From /agents/{aid}, click + New Session, fill repo URL; submit redirects + * to /agents/{aid}/sessions/{new-sid}; status pill = provisioning. + */ +import { test, expect } from "@playwright/test"; +import { AGENTS_DEV_URL, authenticateAgentsPage } from "./_helpers"; + +test("create new session redirects to three-pane with provisioning pill", async ({ page }) => { + await authenticateAgentsPage(page); + await page.goto(`${AGENTS_DEV_URL}/agents/agt_01`); + await page.getByTestId("agent-detail-new-session-btn").click(); + + const dialog = page.getByTestId("new-session-dialog"); + await expect(dialog).toBeVisible(); + await page.getByTestId("new-session-repo-url").locator("input").fill("https://github.com/example/new-repo"); + await page.getByRole("button", { name: "Create session" }).click(); + + // Redirects into the new three-pane URL + await page.waitForURL(/\/agents\/agt_01\/sessions\/ses_/, { timeout: 5_000 }); + await expect(page.getByTestId("three-pane")).toBeVisible(); + + // Status pill = provisioning + const sessionId = new URL(page.url()).pathname.split("/").pop()!; + const row = page.getByTestId(`session-row-${sessionId}`); + await expect(row).toBeVisible(); + await expect(row.getByText("provisioning")).toBeVisible(); +});