mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
E2E Test - Can View Admin Setting Page
This commit is contained in:
parent
4cdcdc98e8
commit
1fb887aaab
5 changed files with 22 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ test.describe("Add Model", () => {
|
|||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
test("Able to see all models for a specific provider in the model dropdown", async ({ page }) => {
|
||||
await page.goto("http://localhost:4000/ui");
|
||||
await page.goto("/ui");
|
||||
|
||||
await page.getByText("Models + Endpoints").click();
|
||||
await page.getByRole("tab", { name: "Add Model" }).click();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ for (const { role, storage } of roles) {
|
|||
test.use({ storageState: storage });
|
||||
|
||||
test("can see and navigate all sidebar buttons", async ({ page }) => {
|
||||
await page.goto("http://localhost:4000/ui");
|
||||
await page.goto("/ui");
|
||||
for (const button of sidebarButtons[role as keyof typeof sidebarButtons]) {
|
||||
const tab = page.getByRole("menuitem", { name: button });
|
||||
await expect(tab).toBeVisible();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import { test, expect } from "@playwright/test";
|
||||
import { ADMIN_STORAGE_PATH } from "../../constants";
|
||||
|
||||
test.describe("Add Model", () => {
|
||||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
test("admin settings test", async ({ page }) => {
|
||||
await page.goto("/ui");
|
||||
await page.getByRole("menuitem", { name: /Settings/ }).click();
|
||||
await page.getByRole("menuitem", { name: /Admin Settings/ }).click();
|
||||
await page.getByRole("tab", { name: "UI Settings" }).click();
|
||||
await expect(page.getByText("Configuration for UI-specific")).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
import { test, expect, Page } from "@playwright/test";
|
||||
import { ADMIN_STORAGE_PATH } from "../../constants";
|
||||
test.describe("Internal Users Search", () => {
|
||||
test.use({ storageState: "admin.storageState.json" });
|
||||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
async function goToInternalUsers(page: Page) {
|
||||
await page.goto("http://localhost:4000/ui");
|
||||
await page.goto("/ui");
|
||||
|
||||
const tab = page.getByRole("menuitem", { name: "Internal User" });
|
||||
await expect(tab).toBeVisible();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { test, expect, Page } from "@playwright/test";
|
||||
import { ADMIN_STORAGE_PATH } from "../../constants";
|
||||
|
||||
test.describe("Internal Users Page", () => {
|
||||
test.use({ storageState: "admin.storageState.json" });
|
||||
test.use({ storageState: ADMIN_STORAGE_PATH });
|
||||
|
||||
async function goToInternalUsers(page: Page) {
|
||||
await page.goto("http://localhost:4000/ui");
|
||||
await page.goto("/ui");
|
||||
|
||||
const internalUserTab = page.getByRole("menuitem", { name: "Internal User" });
|
||||
await expect(internalUserTab).toBeVisible();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue