Markdown OKF-Schema Studio

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
SwRS-MDOKFSTUDIO-BLOCK-140: Shift+click and Shift+Arrow select a run of blocksSwRS-MDOKFSTUDIO-BLOCK-1403 testsShift+click selects the run ofbody blocks from the anchor andopens no editorSwRS-MDOKFSTUDIO-BLOCK-166: Cmd/Ctrl+C copies the exact Markdown of the selected blocksSwRS-MDOKFSTUDIO-BLOCK-1664 testsCmd or Ctrl+C puts the exactMarkdown of the selected blocks onthe clipboardSwRS-MDOKFSTUDIO-BLOCK-174: Paste inserts the clipboard as new blocks after the selection or insert pointSwRS-MDOKFSTUDIO-BLOCK-1745 testspaste inserts the clipboard textas new blocks after the selectionor insert pointSwRS-MDOKFSTUDIO-BLOCK-140: Shift+click and Shift+Arrow select a run of blocksSwRS-MDOKFSTUDIO-BLOCK-1403 testsShift+Arrow grows andshrinks the selectionSwRS-MDOKFSTUDIO-BLOCK-127: An included block is never moved, cut, copied, selected or pasted afterSwRS-MDOKFSTUDIO-BLOCK-1279 testsa selection never reaches anincluded blockSwRS-MDOKFSTUDIO-BLOCK-169: Cut removes the selected blocks with one blank separatorSwRS-MDOKFSTUDIO-BLOCK-1695 testsa cut also deletes theblocks with their blankseparatorSwRS-MDOKFSTUDIO-BLOCK-148: A block selection survives saves and is cleared by patchesSwRS-MDOKFSTUDIO-BLOCK-1481 testa content patch clears theselectionSwRS-MDOKFSTUDIO-BLOCK-174: Paste inserts the clipboard as new blocks after the selection or insert pointSwRS-MDOKFSTUDIO-BLOCK-1745 testsan empty clipboard pastes nothingEdit mode is on and no editor is openEdit mode is on and noeditor is openA run of blocks is selectedA run of blocks isselectedThe Markdown of the blocks is on the clipboardThe Markdown of theblocks is on theclipboardThe blocks are pasted as new blocksThe blocks are pasted asnew 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