Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-DIAG-001

A writer reads and inserts Mermaid diagrams that follow the theme

As a writer, I put a Mermaid diagram in my document, or insert one in a single step, and see the drawn diagram in the preview in the colours of my theme, with the source one click away.

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.

path 1: Insert a diagram and read it path 2: Break a diagram other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-DIAG-017: The Mermaid action inserts a starter flowchart in GFM modeSwRS-MDOKFSTUDIO-DIAG-0175 teststhe writer picks Mermaid and astarter flowchart fence isinserted with Start selectedSwRS-MDOKFSTUDIO-DIAG-001: Mermaid fences become inert diagram picturesSwRS-MDOKFSTUDIO-DIAG-00110 teststhe preview renders the fence asone picture with its source in acollapsed "Diagram source"disclosureSwRS-MDOKFSTUDIO-DIAG-005: Mermaid colours follow the preview themeSwRS-MDOKFSTUDIO-DIAG-0053 teststhe reader changes the themeSwRS-MDOKFSTUDIO-DIAG-015: Invalid Mermaid shows one message with the parser reasonSwRS-MDOKFSTUDIO-DIAG-0152 teststhe page cannot draw it and showsone message with a collapsed "Showthe parser error" sectionSwRS-MDOKFSTUDIO-DIAG-017: The Mermaid action inserts a starter flowchart in GFM modeSwRS-MDOKFSTUDIO-DIAG-0175 teststhe Strict or MyST paletteoffers no MermaidSwRS-MDOKFSTUDIO-DIAG-001: Mermaid fences become inert diagram picturesSwRS-MDOKFSTUDIO-DIAG-00110 testsan empty fence is leftblank, with no messageSwRS-MDOKFSTUDIO-DIAG-005: Mermaid colours follow the preview themeSwRS-MDOKFSTUDIO-DIAG-0053 teststhe colours stay the same, nothing is redrawnSwRS-MDOKFSTUDIO-DIAG-009: Diagrams are drawn once per source and theme and late results are droppedSwRS-MDOKFSTUDIO-DIAG-0095 testsa content update that replaces the node keeps the earlierpictureSwRS-MDOKFSTUDIO-DIAG-015: Invalid Mermaid shows one message with the parser reasonSwRS-MDOKFSTUDIO-DIAG-0152 testsa reason that holds markup is shown as textEdit mode is on with the GFM paletteEdit mode is on with theGFM paletteA Mermaid fence is in the documentA Mermaid fence is inthe documentThe diagram is drawn as a pictureThe diagram is drawn asa pictureThe diagram is redrawn in the new theme, labels keptThe diagram is redrawnin the new theme, labelskeptA Mermaid fence holds invalid syntaxA Mermaid fence holdsinvalid syntaxA parser message shows and the source stays availableA parser message showsand the source staysavailable

This map has 325 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 27 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-DIAG-001Mermaid fences become inert diagram pictures 10 testsSwRS-MDOKFSTUDIO-DIAG-005Mermaid colours follow the preview theme 3 testsSwRS-MDOKFSTUDIO-DIAG-009Diagrams are drawn once per source and theme and late results are dropped 5 testsSwRS-MDOKFSTUDIO-DIAG-015Invalid Mermaid shows one message with the parser reason 2 testsSwRS-MDOKFSTUDIO-DIAG-017The Mermaid action inserts a starter flowchart in GFM mode 5 testsSwRS-MDOKFSTUDIO-DIAG-129A diagram renderer script loads only when the page holds a figure of its engine not on the map1 test
SwRS-MDOKFSTUDIO-DIAG-002The Mermaid renderer loads only when a Mermaid figure exists superseded superseded by SwRS-MDOKFSTUDIO-DIAG-001 Markdown file
SwRS-MDOKFSTUDIO-DIAG-003Mermaid diagrams are drawn as inert pictures superseded superseded by SwRS-MDOKFSTUDIO-DIAG-001 Markdown file
SwRS-MDOKFSTUDIO-DIAG-004Mermaid pictures keep their natural size within the content width superseded superseded by SwRS-MDOKFSTUDIO-DIAG-001 Markdown file
SwRS-MDOKFSTUDIO-DIAG-006Mermaid diagrams are drawn again when the theme changes superseded superseded by SwRS-MDOKFSTUDIO-DIAG-005 Markdown file
SwRS-MDOKFSTUDIO-DIAG-007Mermaid falls back to built-in colours superseded superseded by SwRS-MDOKFSTUDIO-DIAG-005 Markdown file
SwRS-MDOKFSTUDIO-DIAG-008Mermaid edge labels stay readable superseded superseded by SwRS-MDOKFSTUDIO-DIAG-005 Markdown file
SwRS-MDOKFSTUDIO-DIAG-010The Mermaid drawing cache keeps 64 drawings deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-DIAG-011A content patch draws only Mermaid diagrams not yet drawn superseded superseded by SwRS-MDOKFSTUDIO-DIAG-009 Markdown file
SwRS-MDOKFSTUDIO-DIAG-012Mermaid draw passes run one at a time superseded superseded by SwRS-MDOKFSTUDIO-DIAG-009 Markdown file
SwRS-MDOKFSTUDIO-DIAG-013Mermaid element ids stay unique for the page life deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-DIAG-014A late Mermaid result for a replaced theme is not shown superseded superseded by SwRS-MDOKFSTUDIO-DIAG-009 Markdown file
SwRS-MDOKFSTUDIO-DIAG-016An invalid Mermaid diagram keeps exactly one error superseded superseded by SwRS-MDOKFSTUDIO-DIAG-015 Markdown file
SwRS-MDOKFSTUDIO-DIAG-018Mermaid is offered in the GFM palette mode only superseded superseded by SwRS-MDOKFSTUDIO-DIAG-017 Markdown file
SwRS-MDOKFSTUDIO-DIAG-019Comment quotes are never wrapped inside diagrams superseded superseded by SwRS-MDOKFSTUDIO-REVIEW-017 Markdown file
SwRS-MDOKFSTUDIO-DIAG-020Selecting text inside a diagram offers no comment superseded superseded by SwRS-MDOKFSTUDIO-REVIEW-038 Markdown file
SwRS-MDOKFSTUDIO-DIAG-021Diagrams can use the wider column in Auto width deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-DIAG-022A diagram under edit is hidden superseded superseded by SwRS-MDOKFSTUDIO-DIAG-001 Markdown file
SwRS-MDOKFSTUDIO-DIAG-116A late Mermaid error for a replaced key is not shown superseded superseded by SwRS-MDOKFSTUDIO-DIAG-009 Markdown file