Use case StRS-MDOKFSTUDIO-PALETTE-018
A writer pastes screenshots and rich text safely as Markdown
As a writer, I paste a screenshot and it becomes a picture of the document without any dialog, and I copy from a web page, a word processor or an editor and the headings, lists, links and tables arrive as Markdown in my block, with no script or tracking content that a later reader could be exposed to.
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. Where paths meet, they share the circle or the step.
path 1: Paste a screenshot path 2: Paste rich text, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Paste a screenshot
- A block text box is open in edit modeSwRS-MDOKFSTUDIO-PALETTE-203 the image cannot be read or the host refuses itSwRS-MDOKFSTUDIO-PALETTE-203 · 3 tests the writer pastes a clipboard that holds only an image and the page sends it to the host
- The host receives the imageSwRS-MDOKFSTUDIO-PALETTE-196 a check failsSwRS-MDOKFSTUDIO-PALETTE-196 · 6 tests the host saves the image in the folder of the document under a name it chooses
- The image is saved next to the documentSwRS-MDOKFSTUDIO-PALETTE-203 · 3 tests its reference is inserted as a paragraph of its own
- An image reference stands as a paragraph of its own
Path 2: Paste rich text
- A block text box is open in edit modeSwRS-MDOKFSTUDIO-PALETTE-213 the conversion failsSwRS-MDOKFSTUDIO-PALETTE-213 · 4 tests the writer pastes text/html and the host converts it to Markdown
- The host converts the HTMLSwRS-MDOKFSTUDIO-PALETTE-229 an unsafe address keeps only the textSwRS-MDOKFSTUDIO-PALETTE-217 · 4 tests each known element is written as its Markdown
- The selection is replaced by the converted Markdown
This map has 282 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 5 behaviours on the map are tested one by one, with 29 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-PALETTE-004Files dropped from the Explorer become links or images at the drop point not on the map5 testsSwRS-MDOKFSTUDIO-PALETTE-196The host saves a pasted image next to the document under a name it chooses 6 testsSwRS-MDOKFSTUDIO-PALETTE-203A pasted image is sent to the host and its name inserted on its own paragraph 3 testsSwRS-MDOKFSTUDIO-PALETTE-213Pasted rich text is converted by the host and replaces the selection in one step 4 testsSwRS-MDOKFSTUDIO-PALETTE-217Pasted HTML becomes the matching Markdown 4 testsSwRS-MDOKFSTUDIO-PALETTE-229Pasted HTML never brings active content 2 testsSwRS-MDOKFSTUDIO-PALETTE-264A pasted URL becomes a link, an autolink or an image in the block text box not on the map3 testsSwRS-MDOKFSTUDIO-TRUST-005The host handles the page messages of every preview, whatever the trust not on the map17 tests