Skip to content

Commit 18d4439

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 9768ce8 commit 18d4439

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src-mdviewer/to-create-tests.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@
4646
- [ ] End/Home work normally on lines without images
4747

4848
## In-Document Search (Ctrl+F)
49-
- [ ] Ctrl+F opens search bar in md viewer (both edit and reader mode)
49+
- [x] Ctrl+F opens search bar in md viewer (both edit and reader mode)
5050
- [ ] Ctrl+F with text selected pre-fills search and highlights closest match as active
51-
- [ ] Typing in search input highlights matches with debounce (300ms)
52-
- [ ] Match count shows "N/total" format
53-
- [ ] Enter / Arrow Down navigates to next match
54-
- [ ] Shift+Enter / Arrow Up navigates to previous match
55-
- [ ] Navigation wraps around (last → first, first → last)
51+
- [x] Typing in search input highlights matches with debounce (300ms)
52+
- [x] Match count shows "N/total" format
53+
- [x] Enter / Arrow Down navigates to next match
54+
- [x] Shift+Enter / Arrow Up navigates to previous match
55+
- [x] Navigation wraps around (last → first, first → last)
5656
- [ ] Active match scrolls into view (instant, centered)
57-
- [ ] Escape closes search bar and restores cursor to previous position
58-
- [ ] Escape in search does NOT forward to Phoenix (no focus steal)
59-
- [ ] Closing search clears all mark.js highlights
57+
- [x] Escape closes search bar and restores cursor to previous position
58+
- [x] Escape in search does NOT forward to Phoenix (no focus steal)
59+
- [x] Closing search clears all mark.js highlights
6060
- [ ] Search works across cached document DOMs (uses #viewer-content)
61-
- [ ] × button closes search
62-
- [ ] Search starts from 1 character
61+
- [x] × button closes search
62+
- [x] Search starts from 1 character
6363
- [ ] Switching documents with search open re-runs search on new document
6464
- [ ] Switching back to previous document restores search match index (e.g. was on 3/5, returns to 3/5)

0 commit comments

Comments
 (0)