Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-LIFE-023

A reader sees the line of a jump marked in the side preview and gets the raw text on request

As a reader, I jump to a line of a Markdown file from a search, a problem or a link and see that line marked in the side preview; I can always ask for the raw text and it stays text; the editor association I set for Markdown keeps working, and an older setting of the Studio for it is turned into that association for me.

Use case diagram

How it is split

This use case (StRS) is reached by 3 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: Keep the raw text one command away path 2: Jump while the side preview is open path 3: Get the association back from the old setting other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-LIFE-177: Open as Text replaces a Studio tab by the text editor of the same fileSwRS-MDOKFSTUDIO-LIFE-1773 teststhe reader runs Open as Text andthe text editor of the same fileopens in the same group, at theline shown, and staysSwRS-MDOKFSTUDIO-LIFE-186: The host tells a jump from a cursor moveSwRS-MDOKFSTUDIO-LIFE-1864 teststhe host tells the jump from acursor moveSwRS-MDOKFSTUDIO-LIFE-181: A requested line reaches the page once it is ready and wins over the restored reading placeSwRS-MDOKFSTUDIO-LIFE-1812 teststhe line reaches the page once itis ready, and only onceSwRS-MDOKFSTUDIO-LIFE-195: The editor association of Markdown files is restored once from the retired Studio settingSwRS-MDOKFSTUDIO-LIFE-1955 teststhe extension writes the *.mdassociation in that scope, thenremoves the retired settings, andshows nothingSwRS-MDOKFSTUDIO-LIFE-177: Open as Text replaces a Studio tab by the text editor of the same fileSwRS-MDOKFSTUDIO-LIFE-1773 testswhen the active tab is not a Studio tab, a message says soand nothing opensSwRS-MDOKFSTUDIO-LIFE-190: A cursor move never marks the side previewSwRS-MDOKFSTUDIO-LIFE-1901 testa cursor move of thekeyboard or the mouse marksnothingSwRS-MDOKFSTUDIO-LIFE-180: The line marker in edit mode covers no handle or action and opens no editorSwRS-MDOKFSTUDIO-LIFE-1802 testsin edit mode the markercovers no handle or actionSwRS-MDOKFSTUDIO-LIFE-179: The line marker stays through scrolls and layout changes and goes on a pointer press, an edit or a new lineSwRS-MDOKFSTUDIO-LIFE-1793 teststhe marker stays through layout changes and goes on a pointerpress or a new lineSwRS-MDOKFSTUDIO-LIFE-191: Links and Back and Next followed in the side preview mark their target lineSwRS-MDOKFSTUDIO-LIFE-1911 testa link or Back or Next followed in the side preview marks itstarget line the same waySwRS-MDOKFSTUDIO-LIFE-195: The editor association of Markdown files is restored once from the retired Studio settingSwRS-MDOKFSTUDIO-LIFE-1955 testsa write that fails keeps the retired setting and tries againat the next startA Markdown file shows in a Studio tabA Markdown file shows ina Studio tabThe reader reads and edits the raw textThe reader reads andedits the raw textA search result, a problem or a link takes a text editor to a line while the side preview follows the editorA search result, aproblem or a link takesa text editor to a linewhile the side previewfollows the editorThe side preview places the lineThe side preview placesthe lineThe reader reads and edits onThe reader reads andedits onThe reader's user or workspace settings hold the retired setting Open Markdown files in Studio, onThe reader's user orworkspace settings holdthe retired setting OpenMarkdown files inStudio, onThe reader's Markdown files open in Studio through the association of VS CodeThe reader's Markdownfiles open in Studiothrough the associationof VS Code

Path 1: Keep the raw text one command away

  1. A Markdown file shows in a Studio tabSwRS-MDOKFSTUDIO-LIFE-177 when the active tab is not a Studio tab, a message says so and nothing opensSwRS-MDOKFSTUDIO-LIFE-177 · 3 tests the reader runs Open as Text and the text editor of the same file opens in the same group, at the line shown, and stays
  2. The reader reads and edits the raw text

Path 2: Jump while the side preview is open

  1. A search result, a problem or a link takes a text editor to a line while the side preview follows the editorSwRS-MDOKFSTUDIO-LIFE-190 a cursor move of the keyboard or the mouse marks nothingSwRS-MDOKFSTUDIO-LIFE-186 · 4 tests the host tells the jump from a cursor move
  2. The side preview places the lineSwRS-MDOKFSTUDIO-LIFE-180 in edit mode the marker covers no handle or actionSwRS-MDOKFSTUDIO-LIFE-181 · 2 tests the line reaches the page once it is ready, and only once
  3. The reader reads and edits onSwRS-MDOKFSTUDIO-LIFE-179 the marker stays through layout changes and goes on a pointer press or a new lineSwRS-MDOKFSTUDIO-LIFE-191 a link or Back or Next followed in the side preview marks its target line the same waySwRS-MDOKFSTUDIO-LIFE-189 · 4 tests the marker stays through scrolls and goes on an edit of the document or a switch of file

Path 3: Get the association back from the old setting

  1. The reader's user or workspace settings hold the retired setting Open Markdown files in Studio, onSwRS-MDOKFSTUDIO-LIFE-195 a write that fails keeps the retired setting and tries again at the next startSwRS-MDOKFSTUDIO-LIFE-195 · 5 tests the extension writes the `*.md` association in that scope, then removes the retired settings, and shows nothing
  2. The reader's Markdown files open in Studio through the association of VS Code

This map has 3 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 9 behaviours on the map are tested one by one, with 18 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-LIFE-176Feature introductions show once and can be shown again not on the map3 testsSwRS-MDOKFSTUDIO-LIFE-177Open as Text replaces a Studio tab by the text editor of the same file 3 testsSwRS-MDOKFSTUDIO-LIFE-178The page marks a requested line with an arrow and a band at the line's place not on the map8 testsSwRS-MDOKFSTUDIO-LIFE-179The line marker stays through scrolls and layout changes and goes on a pointer press, an edit or a new line 3 testsSwRS-MDOKFSTUDIO-LIFE-180The line marker in edit mode covers no handle or action and opens no editor 2 testsSwRS-MDOKFSTUDIO-LIFE-181A requested line reaches the page once it is ready and wins over the restored reading place 2 testsSwRS-MDOKFSTUDIO-LIFE-186The host tells a jump from a cursor move 4 testsSwRS-MDOKFSTUDIO-LIFE-187The side preview that follows the editor marks the line of a jump not on the map4 testsSwRS-MDOKFSTUDIO-LIFE-188The side preview's scroll on a jump follows the anchor setting not on the map4 testsSwRS-MDOKFSTUDIO-LIFE-189The line marker of the side preview goes on an edit of the document or a switch of file 4 testsSwRS-MDOKFSTUDIO-LIFE-190A cursor move never marks the side preview 1 testSwRS-MDOKFSTUDIO-LIFE-191Links and Back and Next followed in the side preview mark their target line 1 testSwRS-MDOKFSTUDIO-LIFE-192The line marker marks the table row of the line not on the map3 testsSwRS-MDOKFSTUDIO-LIFE-193The line marker shows the hidden tabs that hold the line and marks its exact line not on the map2 testsSwRS-MDOKFSTUDIO-LIFE-194The line marker marks the front matter property row of the line not on the map2 testsSwRS-MDOKFSTUDIO-LIFE-195The editor association of Markdown files is restored once from the retired Studio setting 5 tests
SwRS-MDOKFSTUDIO-LIFE-174The Opening Files settings choose when Studio takes the place of a text editor deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-LIFE-175The editor association of Markdown files is migrated to the Studio setting once per scope superseded superseded by SwRS-MDOKFSTUDIO-LIFE-195 Markdown file
SwRS-MDOKFSTUDIO-LIFE-182Link and history navigation from a Studio tab opens Studio at the target line when Markdown files open in Studio deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-LIFE-183The host picks the Studio tab to reveal or opens a new one deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-LIFE-184The opening policy keeps a text editor or replaces it by Studio, by nine ordered rules deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-LIFE-185The opening watcher reads each new Markdown text tab and puts Studio in its place after the migration deprecated deprecated Markdown file