Use case StRS-MDOKFSTUDIO-BLOCK-008
A writer types and moves between blocks with text editor keys
As a writer, I type Markdown in the block editor and the keys do what I expect: lists continue, Tab indents, selected text gets wrapped, Home and End jump, undo stays in the editor, and I keep writing in the next or previous block by pressing an arrow key at the edge of the text, without the mouse.
Use case diagram
How it is split
This use case (StRS) is reached by 2 paths, one per 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: Type a list path 2: Move on to the next block other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Type a list
- A block editor is open on a listSwRS-MDOKFSTUDIO-BLOCK-061 Enter on an empty list itemSwRS-MDOKFSTUDIO-BLOCK-069 typing a marker key over a selection wraps itSwRS-MDOKFSTUDIO-BLOCK-003 the VS Code key bindings of undo and redo run on the text boxSwRS-MDOKFSTUDIO-BLOCK-061 · 4 tests Enter continues the list marker
- The next item starts with its marker
Path 2: Move on to the next block
- A block editor is open with the caret on its last lineSwRS-MDOKFSTUDIO-BLOCK-079 with a modifier or a selection the key stays with the text boxSwRS-MDOKFSTUDIO-BLOCK-079 · 5 tests ArrowDown saves a changed text and opens the editor of the next block with the caret at its start
- The editor of the next block is open with the caret at its start
This map has 15 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 4 behaviours on the map are tested one by one, with 27 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-BLOCK-003Edit-mode text box follows VS Code undo, redo, select-all and delete-line key bindings 8 testsSwRS-MDOKFSTUDIO-BLOCK-004Arrow keys, Enter and Escape drive block editing without the mouse not on the map5 testsSwRS-MDOKFSTUDIO-BLOCK-061Tab, Shift+Tab and Enter indent and continue lists, quotes and fences 4 testsSwRS-MDOKFSTUDIO-BLOCK-069Marker keys wrap a selection; Home, End, select-all and undo stay in the text box 8 testsSwRS-MDOKFSTUDIO-BLOCK-079Arrow keys at the edges open the previous or next block 5 testsSwRS-MDOKFSTUDIO-BLOCK-254Right and Left move the block selection down and up the structure not on the map5 testsSwRS-MDOKFSTUDIO-BLOCK-261A one-line editor commits on Enter and ignores Tab not on the map3 testsSwRS-MDOKFSTUDIO-LIFE-173Save key saves the previewed document not on the map7 tests
SwRS-MDOKFSTUDIO-BLOCK-077Keys no editor handled still reach VS Code deprecated deprecated Markdown file