Skip to content

test(e2e): move Admin UI Playwright suite to tests/e2e/ui - #34196

Merged
mubashir1osmani merged 5 commits into
litellm_internal_stagingfrom
litellm_move_ui_e2e_to_tests_e2e
Jul 22, 2026
Merged

mubashir1osmani merged 5 commits into
litellm_internal_stagingfrom
litellm_move_ui_e2e_to_tests_e2e

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

All three Playwright configs collect their full suites from the new location (at 9355b9c):

$ cd tests/e2e/ui && npm ci
$ npx playwright test --list --config playwright.config.ts | tail -1
Total: 86 tests in 25 files
$ npx playwright test --list --config serverRootPath.config.ts | tail -1
Total: 1 test in 1 file
$ SERVER_ROOT_PATH=/litellm npx playwright test --list --config migration.serverRootPath.config.ts | tail -1
Total: 35 tests in 1 file

The Python harness is untouched by the new sibling folder:

$ uv run pytest tests/e2e --collect-only -q | tail -1
370 tests collected in 0.72s
$ make lint-e2e-basedpyright
0 errors, 0 warnings, 0 notes
$ cd ui/litellm-dashboard && npm run knip:ci && npm run format:check
(both pass)

The full browser run at the new paths is exercised by the e2e_ui_testing and e2e_ui_testing_server_root_path CircleCI jobs on this PR, plus the test_server_root_path GitHub workflow

Type

🚄 Infrastructure
✅ Test

Changes

Moves the Admin UI Playwright suite from ui/litellm-dashboard/e2e_tests to tests/e2e/ui so every end to end suite lives under tests/e2e. The suite stays in TypeScript; Playwright only collects *.spec.ts files and pytest only collects *.py files, so the two harnesses coexist without seeing each other

The suite becomes a self-contained npm package with its own package.json, lockfile and tsconfig instead of borrowing the dashboard's toolchain. The dashboard drops its @playwright/test dependency, the four e2e* npm scripts (they now live in tests/e2e/ui/package.json), and the knip, vitest and tsconfig carve-outs that existed only to keep the e2e folder out of dashboard tooling. The one import that reached into the dashboard, a type-only import of the generated OpenAPI schema in routerSettings.spec.ts, now points at ui/litellm-dashboard/src/lib/http/schema explicitly

CI follows the move. Both CircleCI jobs install the new package, run Playwright from tests/e2e/ui, and read the seed SQL, mock LLM server and proxy config from the new fixture paths; the node cache key is bumped to v3 and keyed on both lockfiles. classify_changes.sh classifies tests/e2e/ui/* as client so spec-only edits keep skipping backend jobs (previously anything outside ui/ counted as backend). run_e2e.sh derives the dashboard directory from the repo root since it is no longer a parent of the script

tests/e2e/ui/fixtures/mock_llm_server/server.py is excluded from the e2e basedpyright zero-error gate in pyrightconfig.json (same treatment as tests/e2e/claude_code); it is a fixture of the TS suite, not part of the typed Python harness, and predates that gate. tests/e2e/CLAUDE.md documents the new ui/ suite folder and that the Python harness rules do not apply inside it

One follow-up commit catches two specs up with UI refactors that had already landed on staging: the key info header moved Delete Key into the "More key actions" menu and the credentials table moved row actions into a dropdown, so the Delete key and credential-edit specs were timing out on buttons that no longer exist. Both failures reproduce against a proxy serving a fresh dashboard build and pass after pointing the specs at the menus

QA runbook

No test behavior changed beyond catching the Delete key and credential-edit specs up with the dropdown UI they now drive. To reproduce the whole suite at its new home:

  • Run ./tests/e2e/ui/run_e2e.sh from the repo root with docker running and ports 4000, 5432 and 8090 free; it starts postgres, seeds it, builds the dashboard into the proxy, boots the mock LLM server and the proxy, then runs all 86 specs
  • Expect the same pass/fail set as ui/litellm-dashboard$ npm run e2e produced before this PR

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

@ryan-crabbe-berri
ryan-crabbe-berri requested a review from a team July 21, 2026 23:45
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves the Admin UI Playwright suite into a standalone package under tests/e2e/ui. The main changes are:

  • Relocated Playwright tests, configs, fixtures, and setup files
  • Updated CircleCI and GitHub Actions paths, installs, caches, and artifacts
  • Added a dedicated npm package, lockfile, and TypeScript config
  • Removed dashboard-only Playwright scripts, dependencies, and tooling exclusions
  • Updated the local runner and change classifier for the new location

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • CI paths, config-relative imports, dependency installs, and artifact locations are consistent with the new package location.
  • The supplied test collection and tooling results cover the main relocation risks.

Important Files Changed

Filename Overview
.circleci/config.yml Updates both UI e2e jobs to install and run the relocated package and collect its artifacts.
.github/workflows/test_server_root_path.yml Runs the server-root-path suite from its new package and uploads results from the new directory.
.circleci/scripts/classify_changes.sh Preserves the suite's existing client-change classification after moving it outside the dashboard directory.
tests/e2e/ui/run_e2e.sh Derives the repository and dashboard paths from the relocated script and runs Playwright from its package.
tests/e2e/ui/package.json Defines the standalone Playwright package and carries over the four e2e commands.
tests/e2e/ui/tsconfig.json Adds a strict no-emit TypeScript configuration for the relocated suite.
tests/e2e/ui/tests/settings/routerSettings.spec.ts Updates the type-only schema import to resolve from the dashboard source at its new relative path.
ui/litellm-dashboard/package.json Removes Playwright dependencies and commands that now belong to the standalone e2e package.
pyrightconfig.json Excludes the relocated TypeScript suite and its existing Python fixture from the Python type-checking scope.

Reviews (1): Last reviewed commit: "test(e2e): move Admin UI Playwright suit..." | Re-trigger Greptile

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ryan-crabbe-berri
ryan-crabbe-berri enabled auto-merge (squash) July 22, 2026 00:03
@ryan-crabbe-berri
ryan-crabbe-berri enabled auto-merge (squash) July 22, 2026 00:06

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

// esbuild. It types the round-trips below so mistakes surface in the editor; the live
// test against the real proxy is what actually enforces the contract.
import type { components } from "../../../src/lib/http/schema";
import type { components } from "../../../../../ui/litellm-dashboard/src/lib/http/schema";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can this be absolute?

@codspeed

codspeed Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_move_ui_e2e_to_tests_e2e (4d9526c) with litellm_internal_staging (17a83aa)

Open in CodSpeed

Relocates ui/litellm-dashboard/e2e_tests to tests/e2e/ui so all end to end
suites live under tests/e2e. The suite stays in TypeScript and becomes a
self-contained npm package with its own package.json, lockfile and tsconfig
instead of leaning on the dashboard's toolchain; the dashboard drops its
@playwright/test dependency, e2e scripts and knip/vitest/tsconfig carve-outs.

CI paths follow the move: both CircleCI jobs (main e2e and the
SERVER_ROOT_PATH migration smoke) and the test_server_root_path workflow now
install and run Playwright from tests/e2e/ui, with the node cache keyed on
both lockfiles. classify_changes.sh treats tests/e2e/ui as client so spec
edits keep skipping backend jobs. The suite's mock LLM fixture is excluded
from the e2e basedpyright zero-error gate in pyrightconfig.json since it
belongs to the TS suite, not the typed Python harness.
@ryan-crabbe-berri
ryan-crabbe-berri force-pushed the litellm_move_ui_e2e_to_tests_e2e branch from f1b567f to 1a901d7 Compare July 22, 2026 18:24
@mubashir1osmani
mubashir1osmani enabled auto-merge (squash) July 22, 2026 18:25
Mubashir Osmani and others added 2 commits July 22, 2026 18:41
…o_callback_session

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ssion anomaly unit tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ryan-crabbe-berri
❌ Mubashir Osmani


Mubashir Osmani seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Mubashir Osmani and others added 2 commits July 22, 2026 19:04
…hard)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mubashir1osmani
mubashir1osmani merged commit 0fcaadf into litellm_internal_staging Jul 22, 2026
76 of 77 checks passed
@mubashir1osmani
mubashir1osmani deleted the litellm_move_ui_e2e_to_tests_e2e branch July 22, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants