mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
test(e2e/agents): add create-agent spec for Validation #2
Open New Agent dialog, fill name + model, submit; assert the new row shows up in the table within 5s. Definition only — no VM.
This commit is contained in:
parent
9b3b656671
commit
f4e29c1c74
1 changed files with 26 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* LIT-2881 Validation #2 — Create an Agent definition flow.
|
||||
*
|
||||
* Click + New Agent, fill name/model/system_prompt, submit; the new row
|
||||
* appears in the /agents list within 5s. Definition only — no VM.
|
||||
*/
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { gotoAgentsList } from "./_helpers";
|
||||
|
||||
test("create new agent definition appears in list", async ({ page }) => {
|
||||
await gotoAgentsList(page);
|
||||
await page.getByTestId("new-agent-btn").click();
|
||||
const dialog = page.getByTestId("new-agent-dialog");
|
||||
await expect(dialog).toBeVisible();
|
||||
|
||||
const nameInput = page.getByTestId("new-agent-name").locator("input");
|
||||
const modelInput = page.getByTestId("new-agent-model").locator("input");
|
||||
await nameInput.fill("e2e-test-agent");
|
||||
await modelInput.fill("claude-3-5-sonnet-20241022");
|
||||
|
||||
await page.getByRole("button", { name: "Create" }).click();
|
||||
await expect(dialog).not.toBeVisible({ timeout: 5_000 });
|
||||
|
||||
// appears in the list (within 5s)
|
||||
await expect(page.getByText("e2e-test-agent")).toBeVisible({ timeout: 5_000 });
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue