test(ui): e2e cover team model edit + admin identity in navbar#28652
Conversation
Adds two Playwright tests as part of the manual-QA → e2e migration: "Edit team model selection" exercises the Settings tab Models multi-select + Save Changes flow on a seeded team, and the existing login test now opens the User dropdown and asserts the role and User ID render — guarding against regressions where login succeeds but the auth context is empty. Resolves LIT-3093
Greptile SummaryThis PR migrates two manual-QA checks into Playwright e2e tests: the login test now verifies the navbar account popup renders the correct role and user ID after login, and a new "Edit team model selection" test exercises the Settings tab on an existing team.
Confidence Score: 5/5Test-only change with no production code affected; both tests are safe to merge. Both changes are confined to e2e test files. The login test uses proper Playwright interactions with a stable aria-label selector, and the teams test correctly restores fixture state via a pre/finally API call. The only non-blocking concern is that a finally-block throw can obscure the original failure in CI, but this does not affect production correctness or test reliability under normal conditions. No files require special attention beyond the minor finally error-masking note in teams.spec.ts.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/e2e_tests/tests/login/login.spec.ts | Extends the login test to click the account button and verify role/userId in the popup, using a stable aria-label selector and proper Playwright click instead of synthetic events. |
| ui/litellm-dashboard/e2e_tests/tests/proxy-admin/teams.spec.ts | Adds "Edit team model selection" test with API-based fixture restore in a try/finally; idempotency concern from prior thread is addressed, but a finally-block throw can mask the original test failure. |
Reviews (4): Last reviewed commit: "fix(e2e): match navbar account button by..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…itellm_e2e_team_models_and_admin_user_info
The 'Edit team model selection' test removed fake-anthropic-claude from E2E_TEAM_CRUD_ID without restoring it. CI runs with retries: 2 and the seed script runs once before the suite, so a flake on this test would fail the retry at the "tag is visible" assertion. Wrap the test in try/finally and restore the seeded models via /team/update before and after.
|
@greptileai re review |
Surfaces the real cause when the master key is wrong or the proxy is unreachable, instead of silently leaving the team in a stale state and failing later on the visibility assertion.
|
@greptileai re review |
… "User" text
The previous trigger filter (hasText: /^User$/) didn't match the rendered
UserDropdown button — its text is the displayName ("Account" for the
master-key admin, an email for SSO users), never "User". The evaluate
call then timed out after 15s in CI. Use the stable aria-label prefix
the component always emits, and click directly since the dropdown is
configured trigger=["click"] (the synthetic hover was unnecessary).
|
@greptileai re review |
7cae5dc
into
litellm_internal_staging
Summary
Adds two Playwright tests as part of the manual-QA → e2e migration. "Edit team model selection" opens the seeded E2E Team CRUD, switches to the Settings tab, removes the
fake-anthropic-claudemodel from the multi-select, and verifies the success notification. The existing login test now opens the navbar User dropdown after login and asserts the role and User ID render — catching the class of bug where login succeeds but the auth context is empty (the bare "Virtual Keys" check would not).Test plan
e2e_tests/tests/proxy-admin/teams.spec.ts::Edit team model selection— Settings tab → remove a model tag → Save → verify success toaste2e_tests/tests/login/login.spec.ts::user can log in— login, hover navbar User button, assert role "Admin" and user id "default_user_id" render in the popupSLOWMO=500 ./e2e_tests/run_e2e.sh --headed -g "Edit team model selection|user can log in")Refs LIT-3093