test(e2e): cover navbar Logout flow as proxy admin - #29076
Conversation
The Logout button under the navbar User dropdown was an uncovered manual-QA step. This test signs in as admin, opens the dropdown, clicks Logout, then navigates to a protected page and asserts the redirect to /ui/login — proving the session was cleared.
Greptile SummaryAdds a Playwright e2e test that verifies the Logout button in the navbar
Confidence Score: 5/5Safe to merge — this is a new test-only file that adds no production code changes. The change is a single new e2e spec file. The prior review's blocking concerns (wrong button selector, synthetic hover on a click-triggered dropdown) have both been corrected. The test correctly uses the aria-label selector and a plain click to open the antd Dropdown, and No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/e2e_tests/tests/auth/logout.spec.ts | New e2e test for logout flow; selector and trigger mechanism look correct after addressing prior review comments; one concern around intermediate navigation state after clicking Logout |
Reviews (2): Last reviewed commit: "test(e2e): fix logout dropdown trigger a..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The button never rendered the literal text "User" (it shows initials +
display name), and the antd Dropdown uses trigger={["click"]}, so the
synthetic mouseover/mouseenter never opened the popup. Open it with a real
click on the button's aria-label ("Account menu — ...").
|
@greptileai re review |
5eafe1c
into
litellm_internal_staging
* test(e2e): cover navbar Logout flow as proxy admin
The Logout button under the navbar User dropdown was an uncovered
manual-QA step. This test signs in as admin, opens the dropdown,
clicks Logout, then navigates to a protected page and asserts the
redirect to /ui/login — proving the session was cleared.
* test(e2e): fix logout dropdown trigger and account-menu selector
The button never rendered the literal text "User" (it shows initials +
display name), and the antd Dropdown uses trigger={["click"]}, so the
synthetic mouseover/mouseenter never opened the popup. Open it with a real
click on the button's aria-label ("Account menu — ...").
Summary
Adds an e2e test for the previously-uncovered manual-QA item "Click Logout". The test opens the navbar User dropdown, clicks Logout, then navigates to a protected page and asserts the redirect to
/ui/login— proving the session cookie was cleared.Uses the same synthetic-hover trick as
login.spec.tsbecause antd's dropdown trigger closes on cursor movement between Playwright actions.Test plan
e2e_tests/tests/auth/logout.spec.ts::Clicking Logout clears the session and forces re-login on a protected pageRefs LIT-3093