Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-TOOLBAR-003

The reader finds and replaces text in the preview

Readers and editors of a long document want to locate a word or phrase in what they read, see every occurrence, and change it in the document without switching to the text editor, with the rest of the file left as it is.

Use case diagram

How it is split

This use case (StRS) is reached by one path (the coloured line). A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests.

path 1: Find a word and replace it other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-TOOLBAR-009: Cmd/Ctrl+F opens a find bar over the previewSwRS-MDOKFSTUDIO-TOOLBAR-0096 teststhe reader presses Cmd+F or Ctrl+Fand a find bar opens with itsfield focusedSwRS-MDOKFSTUDIO-TOOLBAR-010: The find bar paints the matches of the rendered text and walks themSwRS-MDOKFSTUDIO-TOOLBAR-0109 teststhe reader types a query, everymatch is painted and Enter movesto the next oneSwRS-MDOKFSTUDIO-TOOLBAR-012: Replace edits only the matched source spansSwRS-MDOKFSTUDIO-TOOLBAR-0128 teststhe reader replaces one or allmatches, each in its source span,in one undo stepSwRS-MDOKFSTUDIO-TOOLBAR-009: Cmd/Ctrl+F opens a find bar over the previewSwRS-MDOKFSTUDIO-TOOLBAR-0096 testsin the text editor, the key isleft to VS CodeSwRS-MDOKFSTUDIO-TOOLBAR-010: The find bar paints the matches of the rendered text and walks themSwRS-MDOKFSTUDIO-TOOLBAR-0109 teststhe options match case, wholeword and regular expressionnarrow the searchSwRS-MDOKFSTUDIO-TOOLBAR-012: Replace edits only the matched source spansSwRS-MDOKFSTUDIO-TOOLBAR-0128 testsa match that does not map one-to-one to the source is notreplacedSwRS-MDOKFSTUDIO-TOOLBAR-012: Replace edits only the matched source spansSwRS-MDOKFSTUDIO-TOOLBAR-0128 testswhile a block editor is open, the replacement is refused withthe reasonThe preview page has the focusThe preview page has thefocusThe find bar is openThe find bar is openThe matches are walkedThe matches are walkedThe text is replaced in the documentThe text is replaced inthe document

This map has 538 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 3 behaviours on the map are tested one by one, with 18 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-TOOLBAR-009Cmd/Ctrl+F opens a find bar over the preview 6 testsSwRS-MDOKFSTUDIO-TOOLBAR-010The find bar paints the matches of the rendered text and walks them 9 testsSwRS-MDOKFSTUDIO-TOOLBAR-012Replace edits only the matched source spans 8 tests
SwRS-MDOKFSTUDIO-TOOLBAR-011The find bar matches case, whole words and regular expressions superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-010 Markdown file
SwRS-MDOKFSTUDIO-TOOLBAR-014Replace is unavailable while a block editor is open superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-012 Markdown file
SwRS-MDOKFSTUDIO-TOOLBAR-131Replace all announces the matches it will skip superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-012 Markdown file
SwRS-MDOKFSTUDIO-TOOLBAR-132The find and replace fields keep their native editing shortcuts superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-009 Markdown file