mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-14 09:05:34 +00:00
8a0ddd46d5
Add a self-contained Playwright E2E test suite that runs against a local PostgreSQL database instead of Neon. Tests cover role-based access for all 5 user roles (proxy admin, admin viewer, internal user, internal viewer, team admin) and authentication flows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
696 B
TypeScript
32 lines
696 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const isCI = !!process.env.CI;
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
testMatch: "**/*.spec.ts",
|
|
globalSetup: "./globalSetup.ts",
|
|
fullyParallel: false,
|
|
forbidOnly: isCI,
|
|
retries: isCI ? 2 : 0,
|
|
workers: 1,
|
|
reporter: isCI ? [["html", { open: "never" }]] : [["html"]],
|
|
timeout: 4 * 60 * 1000,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
use: {
|
|
baseURL: "http://localhost:4000",
|
|
trace: "on-first-retry",
|
|
screenshot: "only-on-failure",
|
|
actionTimeout: 15_000,
|
|
navigationTimeout: 30_000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
});
|