litellm/tests/e2e/ui/tests/internal-user
yuneng-jiang b3151073d2
test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking (#40027)
* test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking

Three Playwright specs for the Virtual Keys flows customers hit most, each
reading its result back through /key/info and /v1/chat/completions rather
than trusting the toast:

- a monthly spend cap and reset window set through Edit Settings, surviving
  a reload, with clearing the window leaving the cap in place
- a team member narrowing their own team key's models, and the proxy
  refusing the model they dropped
- blocking a key from its detail page, then unblocking it

Each test owns the key it edits and deletes it on teardown, so retries and
--repeat-each never run out of fixtures.

* test(e2e/ui): tighten virtual key specs from review feedback

Replace the mutable suite-level key state with a Playwright fixture, so the
alias and token are never reassigned and cleanup stays tied to the test.

Assert /key/delete succeeded instead of discarding the response, so a failed
cleanup surfaces rather than leaving rows behind.

Drop the explanatory JSDoc the repo's comment policy disallows, keeping only
the one line explaining why Date.now() alone is not unique enough.

Type the master-key POST helper against a real guard instead of casting to
Record<string, any>.

Assert the unblocked key is served with a 200, not just the response text,
and that clearing the reset window also clears budget_reset_at.

* test(ui): assert the team response through Playwright
2026-09-08 22:49:54 -07:00
..
internalUser.spec.ts test(e2e-ui): assert user-observable behavior instead of DOM structure in audit fixes 2026-08-31 18:15:18 -07:00
internalUserKeyScope.spec.ts test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking (#40027) 2026-09-08 22:49:54 -07:00
internalUserNoTeam.spec.ts test(e2e/ui): give the seeded users passwords that pass the default password policy 2026-09-02 16:58:53 -07:00
internalUserWithTeams.spec.ts test(e2e-ui): assert user-observable behavior instead of DOM structure in audit fixes 2026-08-31 18:15:18 -07:00
modelsByTeam.spec.ts test(e2e/ui): cover team-scoped model visibility, re-editing litellm params, and model health checks (#40039) 2026-09-08 22:49:40 -07:00