Use case StRS-MDOKFSTUDIO-PALETTE-002
A writer chooses which palette buttons are offered
As a writer, I pick the set of buttons that matches the Markdown flavour of my project, the next preview remembers it, and I change the mode without taking my hands off the keyboard; as a maintainer of a project, I set the palette mode that all writers of the workspace start with.
Use case diagram
How it is split
This use case (StRS) is reached by one path (the coloured line). A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests.
path 1: Switch the palette mode and find it again other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Switch the palette mode and find it again
- A block text box is open in edit modeSwRS-MDOKFSTUDIO-PALETTE-017 · 1 test the writer presses Cmd+Shift+M, or Ctrl+Shift+M elsewhere, and the focus moves to the mode select
- The focus is in the mode selectSwRS-MDOKFSTUDIO-LIFE-169 a mode other than strict, gfm, myst or full is refused and the stored mode staysSwRS-MDOKFSTUDIO-PALETTE-001 · 8 tests the writer chooses another mode and the palette lists the buttons of that mode
- The palette shows the buttons of the chosen modeSwRS-MDOKFSTUDIO-LIFE-169 · 15 tests the choice is kept in the saved state of the panel and stored for the workspace
- The mode is stored for the workspaceSwRS-MDOKFSTUDIO-LIFE-170 · 14 tests a new page starts in the stored mode, else in the mode given by the setting
- A new preview opens with the same palette mode
This map has 4,870 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 34 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-PALETTE-001The palette mode decides the button sets, in registry order 8 testsSwRS-MDOKFSTUDIO-PALETTE-017Cmd/Ctrl+Shift+M reaches the mode select and Escape or Enter returns to the text 1 testSwRS-MDOKFSTUDIO-PALETTE-036Leaving the frame from a palette control saves once and a press keeps the text box focus not on the map4 tests
SwRS-MDOKFSTUDIO-PALETTE-010An unknown palette mode is refused and stores nothing superseded superseded by SwRS-MDOKFSTUDIO-LIFE-169 Markdown file