mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Merge pull request #18995 from BerriAI/litellm_e2e_create_key_test
[Infra] UI - E2E Test: Create Key With All Team Models
This commit is contained in:
commit
e877b08314
1 changed files with 22 additions and 0 deletions
22
ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts
Normal file
22
ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { test, expect } from "@playwright/test";
|
||||
import { ADMIN_STORAGE_PATH } from "../../constants";
|
||||
import { Page } from "../../fixtures/pages";
|
||||
import { navigateToPage } from "../../helpers/navigation";
|
||||
|
||||
test.describe("Create Key", () => {
|
||||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
test("Able to create a key with all team models", async ({ page }) => {
|
||||
await navigateToPage(page, Page.ApiKeys);
|
||||
await expect(page.getByRole("button", { name: "Next" })).toBeVisible();
|
||||
await page.getByRole("button", { name: "+ Create New Key" }).click();
|
||||
await page.getByTestId("base-input").click();
|
||||
await page.getByTestId("base-input").fill("e2eUITestingCreateKeyAllTeamModels");
|
||||
await page.locator(".ant-select-selection-overflow").click();
|
||||
await page.getByText("All Team Models").click();
|
||||
await page.getByRole("combobox", { name: "* Models info-circle :" }).press("Escape");
|
||||
await page.getByRole("button", { name: "Create Key" }).click();
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(page.getByText("e2eUITestingCreateKeyAllTeamModels")).toBeVisible();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue