Use case StRS-MDOKFSTUDIO-BLOCK-016
A writer selects blocks and copies, cuts and pastes them as Markdown
As a writer, I select a run of blocks with Shift+click or Shift+Arrow to treat them as one, and I copy, cut and paste whole blocks as their exact Markdown while the document stays tidy: no double blank lines, no glued blocks.
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: Select blocks, copy and paste them other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Select blocks, copy and paste them
- Edit mode is on and no editor is openSwRS-MDOKFSTUDIO-BLOCK-140 Shift+Arrow grows and shrinks the selectionSwRS-MDOKFSTUDIO-BLOCK-127 a selection never reaches an included blockSwRS-MDOKFSTUDIO-BLOCK-140 · 3 tests Shift+click selects the run of body blocks from the anchor and opens no editor
- A run of blocks is selectedSwRS-MDOKFSTUDIO-BLOCK-169 a cut also deletes the blocks with their blank separatorSwRS-MDOKFSTUDIO-BLOCK-148 a content patch clears the selectionSwRS-MDOKFSTUDIO-BLOCK-166 · 4 tests Cmd or Ctrl+C puts the exact Markdown of the selected blocks on the clipboard
- The Markdown of the blocks is on the clipboardSwRS-MDOKFSTUDIO-BLOCK-174 an empty clipboard pastes nothingSwRS-MDOKFSTUDIO-BLOCK-174 · 5 tests paste inserts the clipboard text as new blocks after the selection or insert point
- The blocks are pasted as new blocks
This map has 533 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 6 behaviours on the map are tested one by one, with 42 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-BLOCK-124Moves and clipboard edits are refused for ranges that do not match the document not on the map5 testsSwRS-MDOKFSTUDIO-BLOCK-127An included block is never moved, cut, copied, selected or pasted after 9 testsSwRS-MDOKFSTUDIO-BLOCK-140Shift+click and Shift+Arrow select a run of blocks 3 testsSwRS-MDOKFSTUDIO-BLOCK-148A block selection survives saves and is cleared by patches 1 testSwRS-MDOKFSTUDIO-BLOCK-166Cmd/Ctrl+C copies the exact Markdown of the selected blocks 4 testsSwRS-MDOKFSTUDIO-BLOCK-169Cut removes the selected blocks with one blank separator 5 testsSwRS-MDOKFSTUDIO-BLOCK-174Paste inserts the clipboard as new blocks after the selection or insert point 5 testsSwRS-MDOKFSTUDIO-TRUST-005The host handles the page messages of every preview, whatever the trust not on the map17 testsSwRS-MDOKFSTUDIO-TRUST-065A page message is matched to the shown render or document by the gate of its type not on the map12 tests
SwRS-MDOKFSTUDIO-BLOCK-241previewBlocksCopy needs a line range superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-259 Markdown file
SwRS-MDOKFSTUDIO-BLOCK-242previewBlocksCut needs a line range and an optional pin superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-259 Markdown file
SwRS-MDOKFSTUDIO-BLOCK-243previewBlocksPaste needs a line to paste after superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-259 Markdown file