test(e2e): cover add-MCP-server flow via discovery → custom form#29070
Conversation
The "Add MCP server" manual-QA step was uncovered. This adds a test that opens the discovery modal, jumps into the custom-server form, fills name + Streamable HTTP transport + a placeholder URL + None auth, submits, and verifies both the success toast and the new row.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Greptile SummaryThis PR adds a single new Playwright E2E test covering the previously-untested "Add MCP server" flow: opening the discovery modal, switching to the custom-server form, selecting Streamable HTTP transport and None auth, and verifying the success toast plus the new row in the table.
Confidence Score: 5/5Safe to merge — the change is a single additive E2E test file with no production code touched. Only one new test file is introduced, no existing code is modified, and the test exercises a UI flow that was previously untested. The locator strategy is sound and the previous review concerns have been explicitly addressed in code comments. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/e2e_tests/tests/mcp/mcpServers.spec.ts | New E2E test for the MCP server "Add" happy path — discovery modal → custom form → Streamable HTTP + None auth → success toast + table row assertion. Well-commented locator choices, unique timestamped name, and no teardown needed due to fresh-DB runner. |
Reviews (2): Last reviewed commit: "docs(e2e): note MCP coverage scope and l..." | Re-trigger Greptile
- Anchor the auth-type Select via its enclosing Collapse panel
("Authentication") instead of the placeholder text. The Form.Item has
no label prop, so the previous `hasText: /auth type/i` filter was
matching via "Select auth type" placeholder copy — fragile.
- Document the intentional lack of teardown, matching the pattern used
in addModel.spec.ts: the e2e runner discards the DB per invocation.
Addresses Greptile P2s on PR #29070.
Scope the post-create row lookup to `table tbody` so the form modal's `server_name` input — which still holds the timestamped value during its close animation — can't satisfy the assertion before the server actually lands in the list.
This spec only smoke-tests the happy-path Streamable HTTP + None auth flow. Add a top-of-file comment pointing at E2E_COVERAGE.md so future contributors can see what's still uncovered (other transports, all auth types, edit/delete, BYOK, tool list/call, access groups).
|
@greptileai re review |
bc31c57
into
litellm_internal_staging
Summary
Adds an e2e test for the previously-uncovered manual-QA item "Add MCP server". The test opens the discovery modal, drops into the custom-server form, fills a unique server name + Streamable HTTP transport + a placeholder URL + None auth, submits, and verifies both the success toast and the new row in the table.
Test plan
e2e_tests/tests/mcp/mcpServers.spec.ts::Add a custom MCP server via the discovery → custom formRefs LIT-3093