Repository navigation
Closed
Labels
Milestone
Description
Summary
The 51 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 six extension clean-room suites (:166,:298–:302).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).- 48 of the 51 specs open the
/editorplayground throughcy.visitEditor(apps/webapp/cypress/support/commands.ts:439). The 3filter/*specs open a real pad instead (Decision 3). 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.
- What happens to the 3
filter/*specs in this job? They open a real pad throughvisitSeededPad, so they need REST and WS.test-editor.shstarts neither. Recommended: skip them only when a Cypress env flag set bytest-editor.shis on. Give a one-line reason and a link to this issue. They still run locally.--scopetakes one folder only, so the job cannot leave them out by path.
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 51, 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
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). The editor job starts only the webapp, so these 3 fail there. Decision 3 in the issue body covers them.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.
HMarzban commentedon Oct 24, 2026
Maintainer ruling, 2026-10-24
main, with thepathslist from build step 3. Nopull_requesttrigger.filter/*specs: skip them in this job only, behind a Cypress env flag thattest-editor.shsets. Each skip gives a one-line reason and links this issue. They keep running locally on the full stack. The filter logic runs in the browser, but the filter mounts only on the pad route, which needs REST and WS.All three decisions on this issue are now made.
HMarzban commentedon Oct 24, 2026
Related, 2026-10-24
editor-e2e.ymlcopies thepathslist fromchatroom-e2e.yml(ruled on this issue). When Run only the CI suites a pull request or push can affect #563 lands, move this job onto its scheme too.HMarzban commentedon Oct 26, 2026
Built and committed on local main. Awaits the maintainer's final push.
Remaining gate: the push, then the first green editor-e2e run on main. Measured locally: 51 of 51 specs, 296 passing, 0 failing, 7 pending, 7m 42s. A Linux container run also passed.
Three list cases fail every time and are skipped with a link to this issue: two in combined-lists and one in list-edge-cases. They need their own tracking issue before this one closes.
ci(editor): add an editor-only Cypress E2E job and make editor specs …
HMarzban commentedon Nov 3, 2026
Status, 2026-11-03. The editor job shipped in
cfb5bc8e4, and it is pushed. Its first run onmainpassed in 13m 59s (run41608014402). Left:combined-lists.cy.jsand one inlist-edge-cases.cy.js.test(webapp): point the skipped list specs at #679
HMarzban commentedon Nov 3, 2026
Done, 2026-11-03.
The editor Cypress job shipped in
cfb5bc8e4. It runs the 51 editor specs on pushes tomainthat touch the editor paths. It runs beside the deploy and does not gate it yet.Its first run on
mainpassed in 13m 59s (run41608014402).The three
filter/*specs skip in this job only, as Decision 3 rules. Their skip still links this issue as its reason.The three skipped list cases now have their own issue, #679. Their skips point at #679 since
25453c92d.Next: after two green weeks, decide again whether the job gates the deploy.