Use case StRS-MDOKFSTUDIO-PALETTE-007
A writer inserts links, images, figures, tables, colours and emoji through pickers
As a writer, I create or fix a link by filling two fields, add pictures from the file system, adjust a figure without hand-editing its options, highlight text with a colour, add emoji from a picker and create a table of the size I need by pointing at a grid, without typing the syntax or looking up codes.
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: Insert an image path 2: Colour a selection, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Insert an image
- The palette is shown above the text boxSwRS-MDOKFSTUDIO-PALETTE-109 the dialog comes back without a pathSwRS-MDOKFSTUDIO-PALETTE-109 · 3 tests the writer presses Image, the host opens a native image file dialog and the editor stays open
- The image dialog is openSwRS-MDOKFSTUDIO-PALETTE-192 the writer cancels the dialogSwRS-MDOKFSTUDIO-PALETTE-192 · 4 tests the writer picks an image and the host answers a path relative to the document
- A path relative to the document comes backSwRS-MDOKFSTUDIO-PALETTE-109 · 3 tests an image reference is inserted or replaces the one under the caret
- An image reference is in the text
Path 2: Colour a selection
- The palette is shown above the text boxSwRS-MDOKFSTUDIO-PALETTE-058 · 3 tests the writer presses Colour and a picker opens with the tabs Text and Background, sixteen swatches, a colour code field and a Remove button
- The colour picker is openSwRS-MDOKFSTUDIO-PALETTE-058 an invalid colour code is typed in the fieldSwRS-MDOKFSTUDIO-PALETTE-058 · 3 tests the writer picks a swatch or types a valid colour code and the selection is wrapped in a safe colour span
- The selection is wrapped in a colour span
This map has 207 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 3 behaviours on the map are tested one by one, with 16 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-PALETTE-031Palette popovers open in the frame, one at a time, and Escape or typing closes them not on the map6 testsSwRS-MDOKFSTUDIO-PALETTE-036Leaving the frame from a palette control saves once and a press keeps the text box focus not on the map4 testsSwRS-MDOKFSTUDIO-PALETTE-058The Colour picker wraps the selection in a safe colour span 3 testsSwRS-MDOKFSTUDIO-PALETTE-069The Colour code button edits a colour code at the caret not on the map3 testsSwRS-MDOKFSTUDIO-PALETTE-072The Emoji picker filters and inserts one pictograph not on the map3 testsSwRS-MDOKFSTUDIO-PALETTE-078The Table button opens a 9 by 9 size grid and inserts a table of the chosen size not on the map2 testsSwRS-MDOKFSTUDIO-PALETTE-089The Link button opens a labelled link panel prefilled from the selection not on the map3 testsSwRS-MDOKFSTUDIO-PALETTE-092The link panel writes a safe inline Markdown link not on the map2 testsSwRS-MDOKFSTUDIO-PALETTE-109The Image button inserts or replaces an image reference 3 testsSwRS-MDOKFSTUDIO-PALETTE-150Figure writes a figure directive for a picked image not on the map3 testsSwRS-MDOKFSTUDIO-PALETTE-153The figure form edits the options of a figure and checks them not on the map8 testsSwRS-MDOKFSTUDIO-PALETTE-160Apply rewrites the figure directive in one minimal edit not on the map2 testsSwRS-MDOKFSTUDIO-PALETTE-192The host image picker answers a path relative to the document 4 testsSwRS-MDOKFSTUDIO-PALETTE-263Slash commands have short alternative names not on the map2 tests