litellm/tests/e2e/ui
mateo-berri b2b69d4f4d fix(e2e/ui): seed the playwright fixtures over the management API
The ui suite has never gotten past globalSetup on stage. It logs in as five
roles, and four of them are password users that only ever existed because
run_e2e.sh and CircleCI piped fixtures/seed.sql into a database they had direct
access to. The packaged e2e image has no such access, so on stage only the
master-key admin could log in; the second role sat on /ui/login until
waitForURL hit its 30s timeout and the whole run died before a single test.

Confirmed against the stage gateway: POST /login as admin returns 303, as
adminviewer@test.local returns 401, and /user/info 404s for every seeded id.

Create the same budget, organization, users, teams and keys through the
management endpoints in globalSetup instead, so the suite seeds whatever
deployment it can reach rather than whatever database it can open. seed.sql is
gone and the psql steps go with it; the API path is also the more faithful
fixture, since seed.sql hand-wrote team rows no product code path produces
(populated admins/members arrays, unhashed key tokens).

Two behaviors the seeder has to work around, both verified live: /team/new
auto-adds the caller as an admin, which would have made the proxy admin a
member of the team the suite needs it to be a stranger to, so that membership
is removed after each team; and /team/delete and /user/delete are
all-or-nothing, so one unknown id in a batch deletes nothing, which means each
id gets its own request for the cleanup to survive a partial state.

Verified end to end against the stage gateway: seeding runs in ~6s, all five
role logins return 303, the four teams come back with exactly their seeded
members and no stray admin, all five keys resolve to the right owner and team,
and re-running after deleting a seeded team and key restores both.
2026-07-31 21:09:44 -07:00
..
fixtures fix(e2e/ui): seed the playwright fixtures over the management API 2026-07-31 21:09:44 -07:00
helpers test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
tests fix(e2e/ui): seed the playwright fixtures over the management API 2026-07-31 21:09:44 -07:00
constants.ts fix(e2e/ui): seed the playwright fixtures over the management API 2026-07-31 21:09:44 -07:00
globalSetup.ts fix(e2e/ui): seed the playwright fixtures over the management API 2026-07-31 21:09:44 -07:00
migration.serverRootPath.config.ts fix(e2e/ui): resolve dashboard base URL from env instead of hardcoding localhost (#34739) 2026-07-27 10:19:32 -07:00
migration.serverRootPath.globalSetup.ts test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
package-lock.json test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
package.json test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
playwright.config.ts test(e2e): unblock the ui suite, fix the mcp registration race, park two known product bugs (#34853) 2026-07-27 19:20:57 -07:00
run_e2e.sh fix(e2e/ui): seed the playwright fixtures over the management API 2026-07-31 21:09:44 -07:00
tsconfig.json test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00