You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up of #1053, which extracted tests/helpers/ui/canvas-controls.ts and
adopted it at the four helper/POM sites. This is the fifth site of the same
defect class, and the only one that lives in a spec — deliberately left out of
that PR: it is @stable MCP coverage, so touching it means validating an MCP
server flow E2E, a cost that does not belong to a helper refactor (one issue, one
PR).
awaitpage.getByTestId("canvas_controls_dropdown").click();// ← unconditional openawaitpage.getByTestId("fit_view").click();awaitzoomOut(page,3);// zoomOut() already toggles the canvas-controls menu closed. The previous// extra click({ force: true }) here re-opened it, leaving the Radix zoom// menu overlay on screen where it intercepted the mcp-server-dropdown click// ("<html> intercepts pointer events"). Ensure the menu is fully closed// before interacting with the MCP node.awaitpage.keyboard.press("Escape");awaitexpect(page.getByTestId("zoom_out")).toBeHidden();
The whole sequence — open if needed, fit the view, zoom out N, leave the menu
closed — is exactly one call:
awaitadjustScreenView(page,{numberOfZoomOut: 3});
That removes the unconditional open, the duplicated fit-view step, and makes the Escape + toBeHidden() belt-and-braces redundant. Whether to delete those two
lines or keep them as a cheap explicit gate is a judgement call for whoever picks
this up — they cost little and they guard a failure that actually happened.
Done when
The hand-rolled sequence is replaced by adjustScreenView
A decision is recorded on the trailing Escape + toBeHidden() (kept or dropped, with the reason)
The spec is validated E2E against the current nightly, --retries=0, and keeps @stable
Notes
Read tests/helpers/ui/canvas-controls.ts first — the live-verified DOM
contract (Radix data-state, controls rendered inside DropdownMenuContent,
plain Buttons that do not dismiss the menu) and the rejected alternatives are
written down there.
Follow-up of #1053, which extracted
tests/helpers/ui/canvas-controls.tsandadopted it at the four helper/POM sites. This is the fifth site of the same
defect class, and the only one that lives in a spec — deliberately left out of
that PR: it is
@stableMCP coverage, so touching it means validating an MCPserver flow E2E, a cost that does not belong to a helper refactor (one issue, one
PR).
The site
tests/tests-automations/regression/mcp/server/mcp-server.spec.ts:643-648:Two things are worth noting about it:
upload-file.tscarried(Three more canvas-controls toggles carry the #997 defect — extract the postcondition helper #1053). If the menu is already open on entry, that first click closes it,
fit_viewis then gone, and the spec dies on a click timeout.Escape+toBeHidden()pair is the workaround that was left behind. It alsoencodes an assumption that is no longer the contract:
zoomOut()no longertoggles anything — after Three more canvas-controls toggles carry the #997 defect — extract the postcondition helper #1053 it asserts a postcondition (menu closed,
whoever opened it), read off the trigger's
data-state.What the fix looks like
The whole sequence — open if needed, fit the view, zoom out N, leave the menu
closed — is exactly one call:
That removes the unconditional open, the duplicated fit-view step, and makes the
Escape+toBeHidden()belt-and-braces redundant. Whether to delete those twolines or keep them as a cheap explicit gate is a judgement call for whoever picks
this up — they cost little and they guard a failure that actually happened.
Done when
adjustScreenViewEscape+toBeHidden()(kept or dropped, with the reason)--retries=0, and keeps@stableNotes
tests/helpers/ui/canvas-controls.tsfirst — the live-verified DOMcontract (Radix
data-state, controls rendered insideDropdownMenuContent,plain
Buttons that do not dismiss the menu) and the rejected alternatives arewritten down there.
canvas_controls_dropdownafter Three more canvas-controls toggles carry the #997 defect — extract the postcondition helper #1053 returns only this spec plus the threereadiness gates (
setup-blank-flow,setup-playground,load-template-by-name) that wait on the testid without ever clicking it.