Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Add create key test

yuneng-jianga135bfc376fd
diff --git a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts
new file mode 100644
index 00000000000..ac15d606256
--- /dev/null
+++ b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts
@@ -0,0 +1,23 @@
+import { test, expect } from "@playwright/test";
+import { ADMIN_STORAGE_PATH } from "../../constants";
+import { Page } from "../../fixtures/pages";
+import { navigateToPage } from "../../helpers/navigation";
+
+test.describe.only("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 expect(page.getByText("Virtual Key Created")).toBeVisible();
+ await page.keyboard.press("Escape");
+ await expect(page.getByText("e2eUITestingCreateKeyAllTeamModels")).toBeVisible();
+ });
+});