Skip to content

test(e2e): cover Internal User key modal, team info, key page - #29074

Merged
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_e2e_internal_user_role
May 29, 2026
Merged

test(e2e): cover Internal User key modal, team info, key page#29074
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_e2e_internal_user_role

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds e2e coverage for three previously-uncovered Internal User manual-QA items, using INTERNAL_USER_STORAGE_PATH:

Test plan

  • e2e_tests/tests/internal-user/internalUser.spec.ts::Create Key modal shows the team dropdown populated with the user's teams
  • e2e_tests/tests/internal-user/internalUser.spec.ts::Team info page omits the Settings tab for non-admin members
  • e2e_tests/tests/internal-user/internalUser.spec.ts::Virtual Keys page does not surface litellm-dashboard team keys

Refs LIT-3093

Three previously-uncovered manual-QA paths for the Internal User role:

- Create Key modal — confirm the team dropdown is populated with the
  user's teams (verifying the role-scoped UI flow exists).
- Team info page — confirm the Settings/Members tabs are hidden for a
  regular team member; only the read-only tabs render.
- Virtual Keys page — confirm the proxy's internal litellm-dashboard
  team keys never leak into an internal user's table.
@greptile-apps

greptile-apps Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds E2E coverage for three previously-uncovered Internal User manual-QA scenarios and consolidates a shared helper into the navigation module.

  • internalUser.spec.ts (new): Three tests verify that the Create Key modal populates the team dropdown with the user's teams, that the Settings (and Members) tabs are hidden from non-admin team members, and that litellm-dashboard team keys are filtered out of the Virtual Keys page — with an anchor assertion on the user's seeded key to prevent vacuous passes.
  • helpers/navigation.ts: clickTeamId is promoted from a local function in teams.spec.ts to a shared exported helper, eliminating duplication.
  • teams.spec.ts: Local clickTeamId definition removed; now imports from the shared helper.

Confidence Score: 5/5

Safe to merge — changes are purely additive E2E tests and a shared helper refactor with no production code touched.

All three changed files are test infrastructure only. The helper consolidation is a clean refactor with identical behaviour, and the new tests address the gaps called out in earlier review threads.

No files require special attention.

Important Files Changed

Filename Overview
ui/litellm-dashboard/e2e_tests/helpers/navigation.ts Moved clickTeamId helper from teams.spec.ts into the shared navigation module as an exported function, enabling reuse across test files.
ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUser.spec.ts New E2E test file covering three internal-user scenarios: team dropdown in Create Key modal, Settings/Members tab visibility on team info page, and litellm-dashboard key filtering on Virtual Keys page.
ui/litellm-dashboard/e2e_tests/tests/proxy-admin/teams.spec.ts Removed the locally-defined clickTeamId function and replaced it with the now-shared import from helpers/navigation.ts; no behavioural changes.

Reviews (2): Last reviewed commit: "test(e2e): share clickTeamId helper, str..." | Re-trigger Greptile

Comment thread ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUser.spec.ts Outdated
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Address review feedback on the Internal User e2e spec:
- Extract clickTeamId into helpers/navigation.ts; import in both
  internalUser and teams specs instead of duplicating it.
- Anchor the litellm-dashboard absence check on the user's own seeded
  key so it cannot pass vacuously against an empty table.
- Drop redundant dismissFeedbackPopup calls (navigateToPage already
  dismisses internally).
@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor Author

@greptileai re review

@yuneng-berri
yuneng-berri merged commit fcd5760 into litellm_internal_staging May 29, 2026
114 of 118 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…I#29074)

* test(e2e): cover Internal User key modal, team info, key page

Three previously-uncovered manual-QA paths for the Internal User role:

- Create Key modal — confirm the team dropdown is populated with the
  user's teams (verifying the role-scoped UI flow exists).
- Team info page — confirm the Settings/Members tabs are hidden for a
  regular team member; only the read-only tabs render.
- Virtual Keys page — confirm the proxy's internal litellm-dashboard
  team keys never leak into an internal user's table.

* test(e2e): share clickTeamId helper, strengthen key-filter assertion

Address review feedback on the Internal User e2e spec:
- Extract clickTeamId into helpers/navigation.ts; import in both
  internalUser and teams specs instead of duplicating it.
- Anchor the litellm-dashboard absence check on the user's own seeded
  key so it cannot pass vacuously against an empty table.
- Drop redundant dismissFeedbackPopup calls (navigateToPage already
  dismisses internally).
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.

2 participants