Behaviour SwRS-MDOKFSTUDIO-BLOCK-127
An included block is never moved, cut, copied, selected or pasted after
When a move, a copy, a cut, a block selection or a paste would involve a block that comes from an {include}, the extension SHALL refuse it, the page by disabling the arrow, ending or emptying the selection or showing a notice and the host by answering with the reason of that case, and change nothing.
Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-BLOCK-014, in the state “Edit mode is on”.
Part of StRS-MDOKFSTUDIO-BLOCK-003, outside the paths drawn on its map.
Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-BLOCK-016, in the state “Edit mode is on and no editor is open”.
Another outcome at step 1 of path 2 in StRS-MDOKFSTUDIO-BLOCK-025, in the state “A run of blocks is selected”.
Scenarios 9
The situations the tests check; open one to read it.
nominalBlocks without an include
| Input | Outcome |
|---|---|
| A block that opens another directive, the move is planned | It is planned |
| A document without includes, the bars are built | No arrow is disabled except at the ends |
| A span without an include, a copy is handled | It is done |
| The focused insert point of a normal block, the writer presses Ctrl+V | previewBlocksPaste is posted |
| A paste after line 0 or after a line outside the text | The include check does not refuse |
refusalThe host refuses to move an included block
refusalThe arrows beside an included block are disabled
boundaryA selection never reaches an included block
| Input | Outcome |
|---|---|
| Blocks A, B, included C and D, A is the anchor, the writer Shift+clicks D | A and B are selected, not C or D |
| An included block directly after the anchor A, the writer Shift+clicks it | Only A is selected |
| An included block clicked first, the writer Shift+clicks another block | Nothing is selected |
| A focused included block, the writer presses Shift+ArrowDown | Nothing is selected |
refusalCopy and cut of an included block
refusalThe host refuses to delete an included block
refusalThe page refuses a paste from the insert point of an included block
refusalThe host refuses a paste after a line that opens an include directive
refusalThe host refuses a paste after the closing fence of an include directive
Implemented in 5
Tested by 9
- test/core/edits/sourceEdits.test.tsunit
- test/core/mapping/blockMove.test.tsunit
- test/integration/blockClipboard.test.tsintegration
- test/integration/blockMove.test.tsintegration
- test/page/blockReq.requirements.test.tsunit
- test/page/modules/blockSelection.test.tsunit
- test/page/runtimeBlockDelete.test.tsunit
- test/page/runtimeBlockMoves.test.tsunit
- test/page/runtimeBlockSelection.test.tsunit