Skip to content

Commit 3a1ca7c

Browse files
committed
test(mdviewer): add in-document search (Ctrl+F) integration tests
Add 22 search tests running in both edit and reader mode via shared execSearchTests driver: Ctrl+F opens search, typing highlights matches, N/total count, Enter/Shift+Enter navigation, wrap-around, Escape closes and restores focus, closing clears highlights, close button works, single-char search, and Escape not forwarded to Phoenix.
1 parent 41e070c commit 3a1ca7c

3 files changed

Lines changed: 419 additions & 20 deletions

File tree

src-mdviewer/to-create-tests.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@
4545
- [ ] Cmd+Left near image goes to start of block on Mac
4646
- [ ] End/Home work normally on lines without images
4747

48-
## Heading Editing
49-
- [x] Enter at start of heading (|Heading) inserts empty `<p>` above, heading shifts down
50-
- [x] Enter in middle of heading splits: text before stays heading, text after becomes `<p>`
51-
- [x] Enter at end of heading creates new empty `<p>` below (no content split)
52-
- [ ] Enter in middle syncs correctly to CM (heading line + new paragraph line)
53-
- [x] Shift+Enter in heading creates empty `<p>` below without moving content
54-
- [x] Shift+Enter moves cursor to new `<p>`, heading text untouched
55-
- [x] Backspace at start of heading converts heading to `<p>` (strips ### prefix in CM)
56-
- [x] Backspace at start of heading preserves content and cursor position
57-
- [ ] Backspace at start of heading updates toolbar from "Heading N" to "Paragraph"
58-
- [ ] Heading-to-paragraph conversion syncs correctly to CM source
59-
- [x] Backspace in middle of heading works normally (deletes character)
60-
61-
## Undo/Redo
62-
- [ ] Cursor restored to correct block element (source-line) after undo
63-
- [ ] Cursor restored to correct offset within block after undo
64-
- [ ] Undo/redo cursor works when editing at different positions in document
65-
- [ ] Typing in CM and undoing in CM doesn't interfere with md editor
66-
- [ ] Multiple rapid edits can be undone one by one
67-
6848
## In-Document Search (Ctrl+F)
6949
- [ ] Ctrl+F opens search bar in md viewer (both edit and reader mode)
7050
- [ ] Ctrl+F with text selected pre-fills search and highlights closest match as active

test/UnitTestSuite.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ define(function (require, exports, module) {
112112
require("spec/LiveDevelopmentCustomServer-test");
113113
require("spec/md-editor-integ-test");
114114
require("spec/md-editor-edit-integ-test");
115+
require("spec/md-editor-edit-more-integ-test");
115116
require("spec/NewFileContentManager-test");
116117
require("spec/InstallExtensionDialog-integ-test");
117118
require("spec/ExtensionInstallation-test");

0 commit comments

Comments
 (0)