-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
auditCodebase audit findingCodebase audit findingtest-gapMissing or insufficient test coverageMissing or insufficient test coverage
Description
Problem
The multi-cursor plugin has 18 test files with good coverage of individual operations (typing, deletion, clipboard, arrow movement, soft undo). However, there is no integration test that verifies undo/redo behavior with ProseMirror's history() plugin.
What's missing
- Does
Cmd+Zafter a multi-cursor edit correctly undo all cursor changes as a single step? - Does undo restore the
MultiSelectioncorrectly? (This depends ontoJSON/fromJSONroundtrip, which is tested individually, but not through the history plugin path) - Does
Cmd+Zafter multiple sequential multi-cursor edits produce correct incremental undo?
The toJSON/fromJSON and Selection.jsonID("multi", MultiSelection) registration are tested, but the actual history plugin integration (which serializes selections through this path) is not exercised end-to-end.
Suggested fix
Add integration tests that include ProseMirror's history() plugin in the test editor state and verify:
- Multi-cursor edit → undo restores both document content and MultiSelection
- Multiple sequential edits → incremental undo works correctly
- Undo → redo roundtrip preserves MultiSelection with correct backward flags
Directory: src/plugins/multiCursor/__tests__/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
auditCodebase audit findingCodebase audit findingtest-gapMissing or insufficient test coverageMissing or insufficient test coverage