litellm/tests/e2e/ui
mubashir1osmani 12b3d163b6 test(e2e/ui): derive the target from the environment and self-seed its users
tests/e2e/ui could only ever run against a locally provisioned stack, so it has
never run in the e2e pod. Three things pinned it there.

playwright.config.ts hardcoded baseURL http://localhost:4000 and globalSetup.ts
hardcoded the same host for /update/ui_settings and /ui/login. Both now derive
from LITELLM_PROXY_URL, falling back to localhost:4000 so local runs are
unchanged.

Storage state paths were repo-relative, so globalSetup wrote
admin.storageState.json into cwd. That is read-only in the runner image under
readOnlyRootFilesystem. They now sit under PLAYWRIGHT_STATE_DIR, defaulting to
"." for local runs. The per-role constants the specs import directly were
switched over too, so writer and readers stay in agreement.

globalSetup logged in as five roles whose users only exist if fixtures/seed.sql
was applied, and it throws when a login fails, so against an unseeded target the
whole suite died before a single spec ran. It now creates those users through the
proxy API first. ProxyAdmin is untouched since it logs in as "admin" with the
master key and needs no user row.

Verified against a live proxy that the seeding path works: /user/new returns 200,
/user/update sets the password, and /v2/login then authenticates as that user.
Worth knowing that /user/new accepts a password field but does not persist it
("User has no password set" on login), which is why the password is applied in a
second call.

All 25 spec files and 86 tests still collect, and the resolved values are correct
(trailing slash stripped, storage state redirected).

Teams, keys and the org from seed.sql are not self-seeded yet, so specs that
reference those ids still need them present on the target.
2026-07-25 11:39:20 -07:00
..
fixtures test(e2e/ui): derive the target from the environment and self-seed its users 2026-07-25 11:39:20 -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(proxy): restore atomic user upsert when adding team members (#34457) 2026-07-24 02:22:34 +00:00
constants.ts test(e2e/ui): derive the target from the environment and self-seed its users 2026-07-25 11:39:20 -07:00
globalSetup.ts test(e2e/ui): derive the target from the environment and self-seed its users 2026-07-25 11:39:20 -07:00
migration.serverRootPath.config.ts test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00: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/ui): derive the target from the environment and self-seed its users 2026-07-25 11:39:20 -07:00
run_e2e.sh test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
serverRootPath.config.ts test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00
tsconfig.json test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196) 2026-07-22 19:43:10 +00:00