mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
* feat(user_info_view.tsx): be able to click in and see all teams user is part of makes it easy to see which teams a user belongs to * test(ui/): add unit testing for user info view * fix(user_info_view.tsx): fix linting errors * fix(login.ts): fix login * fix: fix linting error
23 lines
752 B
TypeScript
23 lines
752 B
TypeScript
import { Page, expect } from "@playwright/test";
|
|
|
|
export async function loginToUI(page: Page) {
|
|
// Login first
|
|
await page.goto("http://localhost:4000/ui");
|
|
console.log("Navigated to login page");
|
|
|
|
// Wait for login form to be visible
|
|
await page.waitForSelector('input[name="username"]', { timeout: 10000 });
|
|
console.log("Login form is visible");
|
|
|
|
await page.fill('input[name="username"]', "admin");
|
|
await page.fill('input[name="password"]', "gm");
|
|
console.log("Filled login credentials");
|
|
|
|
const loginButton = page.locator('input[type="submit"]');
|
|
await expect(loginButton).toBeEnabled();
|
|
await loginButton.click();
|
|
console.log("Clicked login button");
|
|
|
|
// Wait for navigation to complete
|
|
await page.waitForURL("**/*");
|
|
}
|