Repository navigation
fix(e2e): repair smoke drift from #1109 + neutralize ensure-default modal race (#1134) - #1135
Conversation
|
Resolve by running |
|
⏳ Needs a rebase onto I've re-triggered the failed CodeQL run, but it's analyzing the stale base. Please rebase onto |
…odal race (#1134) frontend-e2e has been red on dev since 2026-06-10 (first on the #1114 run), unnoticed because the workflow is ui-label-gated. - smoke.spec.js: /operating-room now redirects to /operations (#1109); the old text assertions match nothing on the new page. Assert the redirect URL + Operations heading + tab strip instead — the test now also covers the legacy redirect. - api-keys-copy.spec.js: McpKeysTab onMounted fires ensure-default, which auto-creates 'Default MCP Key' and opens the key-ready modal at an arbitrary point mid-test, intercepting the Create click (both modals are fixed z-10 inset-0; later DOM node wins). beforeEach now calls ensure-default via API and reloads, making the page's own call a guaranteed no-op — the auto-modal can never appear mid-test, and the clipboard assertions always run against the test's own key modal rather than green-washing on the auto-modal. Fixes #1134 Co-Authored-By: Claude Fable 5 <[email protected]>
44e79ce to
4172ab6
Compare
|
✅ Rebased onto |
Review — LGTM ✅Test-only fix (26/5), all CI green including the Verified every claim:
smoke.spec.js — old api-keys-copy.spec.js — race root cause is accurate: two Minor nit (non-blocking): the initial No changes needed. Ready to merge. |
Summary
frontend-e2ehas been silently red on dev since 2026-06-10 — first failure on the #1114 run, before #1133 existed — because the workflow only runs onui-labelled PRs and recent UI PRs merged without the label. Two pre-existing test issues, both test-only fixes:1.
smoke.spec.js— operating room (assertion drift from #1109)/operating-roomredirects to/operationssince #1109; the page's visible text (heading Operations, tabs, "All clear…") matches none of the old/operating|queue|priority|all types|no items/patterns. The redirect itself works fine — verified via run artifacts. New assertions: redirect URL + Operations heading +Needs Responsetab, so the test now also covers the legacy redirect.2.
api-keys-copy.spec.js— ensure-default modal raceMcpKeysTab.vueonMountedfiresPOST /api/mcp/keys/ensure-default; with no user-scoped key present it auto-creates Default MCP Key and opens the "Your MCP API Key is Ready!" modal at an arbitrary point mid-test. Both that modal and the test's Create modal arefixed z-10 inset-0, so the later DOM node (auto-modal) intercepts the Create click for the full 30s budget — run-artifact screenshot shows the auto-modal covering the form.beforeEachnow callsensure-defaultviapage.requestand reloads, making the remounted page's own call a guaranteed no-op. Bonus: test 1's clipboard assertions previously could pass against the auto modal (same buttons, format-only checks); they now always exercise the test's own key modal.Verification
uilabel, sofrontend-e2eruns here and must be green to merge.Unblocks #1133 (which re-runs e2e on top of this fix).
Fixes #1134
🤖 Generated with Claude Code