Behaviour SwRS-MDOKFSTUDIO-REVIEW-192
Deleting an inline thread removes whole lines, and a malformed delete message changes nothing
When the host applies a delete of an inline thread, the extension SHALL remove the lines of the thread and one surrounding blank line when both neighbours are blank or missing, remove the line break before a thread that ends the file, and change nothing else; a previewThreadDelete message is dropped unless it has an edit id and integer lines with 1 <= line <= endLine.
Step 2 of path 2 in StRS-MDOKFSTUDIO-REVIEW-015: from “The delete is sent with the lines of the thread” to “The thread is gone from the document”.
Scenarios 5
The situations the tests check; open one to read it.
nominalBlank neighbours
Givena thread between two blank lines
Whenit is deleted
Thenthe thread and one blank line go and no double gap is left
boundaryPosition of the thread in the file
| Input | Outcome |
|---|---|
| A thread directly after a text line | only the thread lines go |
| A thread on the last lines of the file | the line break before it goes: the file ends with the text before it and no trailing blank line is left (the edit range ends at the end of the file and starts at the end of the previous line) |
| A thread on the first lines of the file | the thread and the blank line after it go |
refusalLines that are not exactly one thread
Givenlines that hold ordinary text, a part of the thread, or the thread and more
Whena delete is asked
Thenthe answer is "The thread is no longer in the source. Refresh the preview." and the document is unchanged, as for a reply (see SwRS-MDOKFSTUDIO-REVIEW-186)
nominalValid delete message
Givena previewThreadDelete message with an edit id and lines 5 and 8
Whenthe message is validated
Thenit is accepted
refusalInvalid delete message
| Input | Outcome |
|---|---|
| A missing edit id | dropped |
| Line 0 | dropped |
| An end line before the line | dropped |
Implemented in 2
Tested by 4
Replaces
SwRS-MDOKFSTUDIO-REVIEW-178An inline thread change message carries valid lines and a non-blank text superseded superseded by SwRS-MDOKFSTUDIO-REVIEW-186, SwRS-MDOKFSTUDIO-REVIEW-192 Markdown file