Use case StRS-MDOKFSTUDIO-PALETTE-013
A writer picks labels, documents, citations and code languages from host lists, with feedback
As a writer, I link to a label, a document or a bibliography entry by choosing it, not by typing its name from memory, choose a code language from a list and get a highlighted code block without trial and error, and never wait on an editor that is stuck: a refusal or a silent failure is explained and I can try again.
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: Refer to a label of the document path 2: Fence code in a language, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Refer to a label of the document
- The palette is shown above the text boxSwRS-MDOKFSTUDIO-PALETTE-140 · 2 tests the writer presses Reference and a popover opens with a filter field, showing Loading... until the host answers
- The host is asked for the labelsSwRS-MDOKFSTUDIO-PALETTE-178 lines inside fences and bad names are not listedSwRS-MDOKFSTUDIO-PALETTE-178 · 2 tests the host lists the (name)= lines of the document that lie outside code fences
- The labels are listedSwRS-MDOKFSTUDIO-PALETTE-140 the list is empty, the host fails, or the list is cutSwRS-MDOKFSTUDIO-PALETTE-147 · 1 test the writer chooses a label and {ref} with the label in backticks is written in place of the selection
- A ref role is in the text
Path 2: Fence code in a language
- The palette is shown above the text boxSwRS-MDOKFSTUDIO-PALETTE-054 · 2 tests the writer presses Code block and a menu lists text, then each language the preview highlights, once and sorted
- The language menu is openSwRS-MDOKFSTUDIO-PALETTE-054 no language or an invalid language nameSwRS-MDOKFSTUDIO-PALETTE-054 · 2 tests the writer chooses a language and the touched lines are wrapped in a fence of that language
- The lines are wrapped in a fenced code block
This map has 143 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 4 behaviours on the map are tested one by one, with 17 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-BLOCK-047Done, Cmd/Ctrl+Enter or leaving the text box commits the edit not on the map10 testsSwRS-MDOKFSTUDIO-PALETTE-054The Code block list wraps lines in a fence of a highlighted language 2 testsSwRS-MDOKFSTUDIO-PALETTE-140Reference and Citation open a filterable list filled by the host 2 testsSwRS-MDOKFSTUDIO-PALETTE-147A chosen label is written as a ref role 1 testSwRS-MDOKFSTUDIO-PALETTE-148Document link picks a Markdown file and writes a doc role not on the map5 testsSwRS-MDOKFSTUDIO-PALETTE-149A chosen bibliography key is written as a cite role not on the map1 testSwRS-MDOKFSTUDIO-PALETTE-178The host lists the label targets of the document 2 testsSwRS-MDOKFSTUDIO-PALETTE-183The host scans nearby bibliography files for citation keys within bounds not on the map3 testsSwRS-MDOKFSTUDIO-TRUST-005The host handles the page messages of every preview, whatever the trust not on the map17 testsSwRS-MDOKFSTUDIO-TRUST-090Every page request is answered once by its id and result type, or ends with a readable error not on the map14 tests
SwRS-MDOKFSTUDIO-PALETTE-174The host drops a request that does not name the render it holds deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-TRUST-006A preview with restricted reads keeps every viewing action superseded superseded by SwRS-MDOKFSTUDIO-TRUST-005 Markdown file