Repository navigation
Run the editor Cypress specs in CI #477
Copy link
Copy link
Open
Labels
DevOpsEditorTiptap & ProsemirrorTiptap & ProsemirrorenhancementNew feature or requestNew feature or request
Milestone
Description
Summary
The 50 editor Cypress specs under apps/webapp/cypress/e2e/editor/ run in no CI job. They cover formatting, lists, headings, the TOC, copy and paste, Find and the Slash menu. A regression there reaches production unless someone runs the suite on a laptop.
- Severity: Medium. Cypress E2E is the default test layer in AGENTS.md §Test Policy, and this part of it never runs on a push.
- Area:
.github/workflows/,scripts/,apps/webapp/cypress/e2e/editor/ - Source: repository review of 2026-10-14
Where
prod.docs.plus.ymlruns Cypress only for the five extension clean-room suites (:295–:304).chatroom-e2e.ymlrunsscripts/test-chatroom.sh. That script builds the webapp, starts it, and callsbash scripts/run-tests.sh --e2e --scope chatroom(:72).scripts/run-tests.sh --e2e --scope editoralready runs only the editor specs. It also fails a run whose spec count comes up short (:464–:472).- All 50 specs open the
/editorplayground throughcy.visitEditor(apps/webapp/cypress/support/commands.ts:439). The playground passesprovider: null, so it opens no collab socket. Only withpersist: truedoes it keep a localY.Dociny-indexeddb(apps/webapp/src/components/pages/editor/EditorPlayground.tsx:49,:43,:66). - The only Supabase call found in the editor specs is stubbed:
cy.intercept('POST', '**/rpc/get_user_bookmarks*', …)(apps/webapp/cypress/support/hyperlinkPicker.ts:97). Other calls to REST or Supabase without a stub are not ruled out. Step 2 settles that. - A production build serves
/editoronly whenNEXT_PUBLIC_E2E=true(apps/webapp/src/pages/editor.tsx:15). Without it, every spec fails atcy.visitEditor. document/draft-first-edit-anchor.cy.tshardcodeshttp://localhost:3001and readsdocsy-postgres-local. It needs the full local stack, so it stays out of this job.
Fix plan
- Script. Add
scripts/test-editor.sh, built from the build-and-serve part ofscripts/test-chatroom.sh, ending inbash scripts/run-tests.sh --e2e --scope editor. Leave out theNEXT_PUBLIC_VIRTUOSO_LICENSEcheck, because the playground renders no chat list. - Measure. Run
scripts/test-editor.shlocally. Post the pass, fail and duration numbers on this issue, with theCYPRESS_PARALLELvalue used.test-chatroom.shsets it to1. Fix each failing spec, or.skipit with a one-line reason and an issue link (AGENTS.md §Test Policy). A spec that fails because a call has no stub gets a stub or a.skip. - Workflow. Add
editor-e2e.ymlwith the setup steps and thepathslist ofchatroom-e2e.yml. In that list, name.github/workflows/editor-e2e.ymlin place of.github/workflows/chatroom-e2e.yml. Leave out itsbun test scripts/run-tests.test.tsstep, which that workflow already runs. Also leave out itsNEXT_PUBLIC_VIRTUOSO_LICENSEenv and its fork and Dependabotif:guard, which exist only for the license secret.
Decisions
- When does the job run? Recommended: on pushes to
mainthat match the samepathslist aschatroom-e2e.yml, plusworkflow_dispatch. Unlikechatroom-e2e.yml, leave outpull_requestuntil the job has a measured duration. If the measured run is long, run it on a weeklyscheduleonly, and say so in the workflow. - Does it gate the deploy? Recommended: no, at first. Let it run beside the deploy until it has been green for two weeks, then decide.
Out of scope
document/specs, which need Postgres.cypress-splitparallel runs.
Acceptance criteria
- A push to
mainthat matches thepathslist runs the editor specs in CI. - The first CI run is green, and every skipped spec names its issue.
- The issue records the measured duration.
Verify
- Run
scripts/test-editor.shlocally. The runner's spec count must be 50, the result offind apps/webapp/cypress/e2e/editor -name '*.cy.*' | wc -ltoday. - Push, and confirm in the Actions log that the job ran the specs, not that it skipped.
Related
- Tidy the contributor docs, templates and internal package READMEs #486 item 5 owns the
.github/WORKFLOWS.mdworkflow list. Whichever issue lands second addseditor-e2e.ymlto it.
Generated by Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DevOpsEditorTiptap & ProsemirrorTiptap & ProsemirrorenhancementNew feature or requestNew feature or request
Activity
HMarzban commentedon Oct 15, 2026
Related issues
Cross-link review, 2026-10-15. Generated by Claude Code
HMarzban commentedon Oct 24, 2026
Facts from the 2026-10-23 test run
filter/*specs. They open the pad route throughvisitSeededPad(apps/webapp/cypress/e2e/editor/filter/filter-shared.js:38).indent/*specs, open/editorthroughcy.visitEditor(apps/webapp/cypress/e2e/editor/indent/indent-shared.js:111). So "All 50 specs open the/editorplayground" is wrong only for filter.run-tests.sh --scopeaccepts one top-level folder only, so--scope editor/tocis rejected.run-tests.sh --extensions(.github/workflows/prod.docs.plus.yml:302) and the chatroom scope (chatroom-e2e.yml). The chatroom workflow skips Dependabot PRs. So a Tiptap bump runs only the extension suites in a browser, and no webapp spec.filter/*specs pass since6be36fcf8, so The Filter apply Cypress test has never passed #311 is closed.Fix in the same change:
full-doc-paste.cy.jspasses with no pasteapps/webapp/cypress/e2e/editor/copy-paste/full-doc-paste.cy.jspresses Meta+c and Meta+v under headless Electron. That never reaches the clipboard (standard-paste.cy.js:25-27), so the spec re-checks its own seed. It also selects with Meta+a, which maps to select-all only on macOS, while CI runs on Linux.win._editor.commands.selectAll().cy.pasteWithMimeTypes.<p>. A paste that starts with a heading skips the select-all branch oftitlePasteHandler(apps/webapp/src/components/TipTap/extensions/title-document/title-document.ts:43-49).This issue is now in milestone v2.3.0, under #575. Effort S for the paste fix, then M for this issue.