From a135bfc376fd51094bb0637bbd5d9a5b6a8e8ff3 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 12 Jan 2026 17:57:22 -0800 Subject: [PATCH 1/3] Add create key test --- .../e2e_tests/tests/keys/createKey.spec.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts 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(); + }); +}); From 81b1becd9588777f00127196eaa35f378fd0e91c Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 12 Jan 2026 18:06:41 -0800 Subject: [PATCH 2/3] remove only --- ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts index ac15d606256..633673b3297 100644 --- a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts +++ b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts @@ -3,7 +3,7 @@ import { ADMIN_STORAGE_PATH } from "../../constants"; import { Page } from "../../fixtures/pages"; import { navigateToPage } from "../../helpers/navigation"; -test.describe.only("Create Key", () => { +test.describe("Create Key", () => { test.use({ storageState: ADMIN_STORAGE_PATH }); test("Able to create a key with all team models", async ({ page }) => { From 9875ef97201f0c3b906b232a5f2b68d502e5d91d Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 12 Jan 2026 18:34:06 -0800 Subject: [PATCH 3/3] Remove Notification Check --- ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts index 633673b3297..4343063b305 100644 --- a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts +++ b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts @@ -16,7 +16,6 @@ test.describe("Create Key", () => { 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(); });