test(e2e): cover Internal Viewer nav, key, and team-info gating - #29075
Conversation
Three previously-uncovered manual-QA paths for the Internal Viewer role: - Nav only renders the read-only sections; admin-only items (Internal Users, Organizations, Models + Endpoints) stay hidden. - Virtual Keys page hides Create New Key, and the key detail view hides Regenerate / Reset Spend / Delete actions. - Team info page hides Members and Settings tabs for the viewer.
Greptile SummaryAdds a new Playwright e2e spec covering three Internal Viewer role-gating scenarios that were previously manual-QA items. All assertions use
Confidence Score: 5/5This PR is safe to merge — it adds only new test code and touches no production logic. The change is a purely additive test file with no modifications to production code, helpers, or fixtures. All previously-raised review concerns have been resolved: the networkidle race is eliminated by using navigateToPage, the redundant popup-dismiss call is gone, the Virtual Keys tab is now asserted visible, and the hidden-element checks use toHaveCount(0) consistently throughout. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/e2e_tests/tests/internal-viewer/internalViewer.spec.ts | New test file adding three e2e scenarios for Internal Viewer role gating: nav visibility, key-page write-control hiding, and team info tab filtering. All previously-raised review concerns have been resolved in this revision. |
Reviews (2): Last reviewed commit: "test(e2e): scope viewer nav to sidebar, ..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Address review feedback on the Internal Viewer e2e spec: - Scope the nav test to the sidebar complementary landmark and match items by link role + accessible name. The prior CSS nav, aside selector grabbed the top bar (the sidebar is a complementary landmark, not a <nav> tag), so the assertions never hit the real nav links. - Land via navigateToPage so the networkidle wait settles the role-gated nav before asserting. - Assert the Virtual Keys tab is visible (was only commented). - Use toHaveCount(0) for hidden team tabs to match the nav block; tabs are conditionally rendered, not CSS-hidden. - Drop redundant dismissFeedbackPopup calls (navigateToPage already dismisses internally).
|
@greptileai re review |
10bda44
into
litellm_internal_staging
…iAI#29075) * test(e2e): cover Internal Viewer nav, key, and team-info gating Three previously-uncovered manual-QA paths for the Internal Viewer role: - Nav only renders the read-only sections; admin-only items (Internal Users, Organizations, Models + Endpoints) stay hidden. - Virtual Keys page hides Create New Key, and the key detail view hides Regenerate / Reset Spend / Delete actions. - Team info page hides Members and Settings tabs for the viewer. * test(e2e): scope viewer nav to sidebar, strengthen tab assertions Address review feedback on the Internal Viewer e2e spec: - Scope the nav test to the sidebar complementary landmark and match items by link role + accessible name. The prior CSS nav, aside selector grabbed the top bar (the sidebar is a complementary landmark, not a <nav> tag), so the assertions never hit the real nav links. - Land via navigateToPage so the networkidle wait settles the role-gated nav before asserting. - Assert the Virtual Keys tab is visible (was only commented). - Use toHaveCount(0) for hidden team tabs to match the nav block; tabs are conditionally rendered, not CSS-hidden. - Drop redundant dismissFeedbackPopup calls (navigateToPage already dismisses internally).
Summary
Adds e2e coverage for three previously-uncovered Internal Viewer manual-QA items, using
INTERNAL_VIEWER_STORAGE_PATH:Test plan
e2e_tests/tests/internal-viewer/internalViewer.spec.ts::Nav shows only the allowed options for the Internal Viewer rolee2e_tests/tests/internal-viewer/internalViewer.spec.ts::Virtual Keys page hides Create / Regenerate / Reset / Delete controlse2e_tests/tests/internal-viewer/internalViewer.spec.ts::Team info page omits Members and Settings tabs for an Internal ViewerRefs LIT-3093