Skip to content

Commit a912665

Browse files
authored
Merge pull request #18682 from BerriAI/litellm_ui_e2e_admin_settings
[Infra] UI - E2E Test: Can View Admin Setting Page
2 parents f143a16 + 1fb887a commit a912665

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

ui/litellm-dashboard/e2e_tests/tests/modelsPage/addModel.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test.describe("Add Model", () => {
55
test.use({ storageState: ADMIN_STORAGE_PATH });
66

77
test("Able to see all models for a specific provider in the model dropdown", async ({ page }) => {
8-
await page.goto("http://localhost:4000/ui");
8+
await page.goto("/ui");
99

1010
await page.getByText("Models + Endpoints").click();
1111
await page.getByRole("tab", { name: "Add Model" }).click();

ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ for (const { role, storage } of roles) {
2424
test.use({ storageState: storage });
2525

2626
test("can see and navigate all sidebar buttons", async ({ page }) => {
27-
await page.goto("http://localhost:4000/ui");
27+
await page.goto("/ui");
2828
for (const button of sidebarButtons[role as keyof typeof sidebarButtons]) {
2929
const tab = page.getByRole("menuitem", { name: button });
3030
await expect(tab).toBeVisible();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { test, expect } from "@playwright/test";
2+
import { ADMIN_STORAGE_PATH } from "../../constants";
3+
4+
test.describe("Add Model", () => {
5+
test.use({ storageState: ADMIN_STORAGE_PATH });
6+
7+
test("admin settings test", async ({ page }) => {
8+
await page.goto("/ui");
9+
await page.getByRole("menuitem", { name: /Settings/ }).click();
10+
await page.getByRole("menuitem", { name: /Admin Settings/ }).click();
11+
await page.getByRole("tab", { name: "UI Settings" }).click();
12+
await expect(page.getByText("Configuration for UI-specific")).toBeVisible();
13+
});
14+
});

ui/litellm-dashboard/e2e_tests/tests/users/searchUsers.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { test, expect, Page } from "@playwright/test";
2+
import { ADMIN_STORAGE_PATH } from "../../constants";
23
test.describe("Internal Users Search", () => {
3-
test.use({ storageState: "admin.storageState.json" });
4+
test.use({ storageState: ADMIN_STORAGE_PATH });
45

56
async function goToInternalUsers(page: Page) {
6-
await page.goto("http://localhost:4000/ui");
7+
await page.goto("/ui");
78

89
const tab = page.getByRole("menuitem", { name: "Internal User" });
910
await expect(tab).toBeVisible();

ui/litellm-dashboard/e2e_tests/tests/users/viewInternalUsers.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { test, expect, Page } from "@playwright/test";
2+
import { ADMIN_STORAGE_PATH } from "../../constants";
23

34
test.describe("Internal Users Page", () => {
4-
test.use({ storageState: "admin.storageState.json" });
5+
test.use({ storageState: ADMIN_STORAGE_PATH });
56

67
async function goToInternalUsers(page: Page) {
7-
await page.goto("http://localhost:4000/ui");
8+
await page.goto("/ui");
89

910
const internalUserTab = page.getByRole("menuitem", { name: "Internal User" });
1011
await expect(internalUserTab).toBeVisible();

0 commit comments

Comments
 (0)