Repository navigation
fix(playwright): make mcp administration spec pass on a clean instance - #38071
Conversation
| }); | ||
| await expect(serverSwitch).toBeChecked(); | ||
| await serverSwitch.uncheck(); | ||
| await serverSwitch.press('Space'); |
There was a problem hiding this comment.
Pressing Space works, but unlike check()/uncheck() it doesn't confirm the switch actually flipped. If the key press ever misses, the failure shows up later as a Save timeout or the 403 check further down, which is a pain to trace back. Could we add a quick state check after each press? Something like:
await serverSwitch.press('Space');
await expect(serverSwitch).not.toBeChecked();Same idea for the two presses near the end (Enable MCP Server and Allow Dynamic Client Registration).
There was a problem hiding this comment.
Done, added a state check after each of the three presses.
Code Review ✅ Approved 🟢 Low risk 1 closed / 1 findingsThe Playwright-only changes adjust test setup, locators, and pagination; they leave application runtime behavior unchanged. Makes the MCP administration Playwright spec pass on a clean instance by accepting the 404 from an unconfigured ✅ 1 closed✅ Edge Case: Cleanup on a clean instance stores a config instead of restoring none
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes the
McpAdministration.spec.tsfailure in the nightly AUT run: https://github.com/open-metadata/openmetadata-nightly/actions/runs/44200749877GET /api/v1/system/mcp/configreturns 404 until an MCP config is saved, and the spec asserted it was OK. It now accepts 404 and starts from an empty config, like the settings form does./settings/apps/McpApplication), toggling the core switches (keyboard instead ofuncheck()/check()), and the clients table role (grid).Type of change:
Tests:
Playwright (UI) tests
playwright/e2e/Features/McpAdministration.spec.ts/mcp/registerwith the 10 per hour registration rate limit, from my repeated local runs.yarn lint:playwright: 0 errors.Checklist:
REVIEW.mdat 36d7f39d45d. No 🔴. The one 🟡 (the paging loop could read the list mid-refetch) is fixed in 43f979a.

Confidence Score: 5/5
The changes appear safe to merge.Summary
Updates the MCP administration test to run on a clean instance and use the current settings page and controls.
No new actionable issues found in the changes since the previous review.
Reviews (3) · Last reviewed commit: "switch state checks" · Reviewed by Greptile