Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-TOOLBAR-011

Links open the right target, show where they lead, or are refused with a reason

As a reader, I click a link and land on the right document, line, heading or web page. When a link cannot be followed I am told why. I rest the pointer on a link and read where it goes before I click, and a small warning icon next to a link tells me that its target is missing or blocked. A link in the page cannot take me to a file outside my workspace.

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: See where a link leads and open it path 2: Follow an anchor, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-TOOLBAR-079: Links in view are looked up in bounded batchesSwRS-MDOKFSTUDIO-TOOLBAR-0795 teststhe page asks the host for thetarget of its request, and thehost answers with its kind and itspath or reasonSwRS-MDOKFSTUDIO-TOOLBAR-085: A link shows its target kind in a tooltip without changing its targetSwRS-MDOKFSTUDIO-TOOLBAR-0854 teststhe link gets the target as itstooltip, or the reason when it isblockedSwRS-MDOKFSTUDIO-TOOLBAR-077: A click or Enter on a link is routed to the host and opened or refused with a warningSwRS-MDOKFSTUDIO-TOOLBAR-0777 teststhe reader clicks the link and thehost opens the targetSwRS-MDOKFSTUDIO-TOOLBAR-094: A local link target must be a regular file inside the workspaceSwRS-MDOKFSTUDIO-TOOLBAR-0942 testsa relative Markdown link opensonly a regular file below aworkspace rootSwRS-MDOKFSTUDIO-TOOLBAR-117: An in-page anchor scrolls the page to its target at the reading lineSwRS-MDOKFSTUDIO-TOOLBAR-1173 teststhe reader follows an anchor, andthe page scrolls to the mappedblock to the reading line belowthe bandSwRS-MDOKFSTUDIO-TOOLBAR-079: Links in view are looked up in bounded batchesSwRS-MDOKFSTUDIO-TOOLBAR-0795 teststhe same request twice isasked onceSwRS-MDOKFSTUDIO-TOOLBAR-117: An in-page anchor scrolls the page to its target at the reading lineSwRS-MDOKFSTUDIO-TOOLBAR-1173 testsan unknown or stale requestdoes not scrollSwRS-MDOKFSTUDIO-TOOLBAR-085: A link shows its target kind in a tooltip without changing its targetSwRS-MDOKFSTUDIO-TOOLBAR-0854 testsa missing or blocked targetkeeps its link and gains awarning iconSwRS-MDOKFSTUDIO-TOOLBAR-077: A click or Enter on a link is routed to the host and opened or refused with a warningSwRS-MDOKFSTUDIO-TOOLBAR-0777 teststhe host refuses with awarningSwRS-MDOKFSTUDIO-TOOLBAR-090: A link is an anchor, external, local or blockedSwRS-MDOKFSTUDIO-TOOLBAR-0904 testsa scheme other than http,https or mailto, or anabsolute path, is blocked witha reasonSwRS-MDOKFSTUDIO-TOOLBAR-094: A local link target must be a regular file inside the workspaceSwRS-MDOKFSTUDIO-TOOLBAR-0942 testsa path outside every root is blockedA link comes into view (paths 1, 2)A link comes into view2The target of the link is knownThe target of the linkis knownThe tooltip names where the link leadsThe tooltip names wherethe link leadsThe target is openThe target is openThe file is openThe file is openThe heading of the anchor is at the reading lineThe heading of theanchor is at the readingline

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

Behaviours of this use case

SwRS-MDOKFSTUDIO-TOOLBAR-077A click or Enter on a link is routed to the host and opened or refused with a warning 7 testsSwRS-MDOKFSTUDIO-TOOLBAR-079Links in view are looked up in bounded batches 5 testsSwRS-MDOKFSTUDIO-TOOLBAR-085A link shows its target kind in a tooltip without changing its target 4 testsSwRS-MDOKFSTUDIO-TOOLBAR-090A link is an anchor, external, local or blocked 4 testsSwRS-MDOKFSTUDIO-TOOLBAR-094A local link target must be a regular file inside the workspace 2 testsSwRS-MDOKFSTUDIO-TOOLBAR-098A wikilink is found by file name, or refused when ambiguous or empty not on the map2 testsSwRS-MDOKFSTUDIO-TOOLBAR-102A link fragment selects a source line, block id, label, heading or field not on the map3 testsSwRS-MDOKFSTUDIO-TOOLBAR-117An in-page anchor scrolls the page to its target at the reading line 3 testsSwRS-MDOKFSTUDIO-TRUST-005The host handles the page messages of every preview, whatever the trust not on the map17 testsSwRS-MDOKFSTUDIO-TRUST-007A page loads local files only from its resource roots not on the map7 testsSwRS-MDOKFSTUDIO-TRUST-059The page accepts only registered host messages addressed to its render not on the map6 testsSwRS-MDOKFSTUDIO-TRUST-065A page message is matched to the shown render or document by the gate of its type not on the map12 tests
SwRS-MDOKFSTUDIO-TOOLBAR-083The host accepts discovery messages of bounded size superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-079 Markdown file
SwRS-MDOKFSTUDIO-TOOLBAR-113A link message needs a request, else it is ignored or refused superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-077 Markdown file
SwRS-MDOKFSTUDIO-TRUST-006A preview with restricted reads keeps every viewing action superseded superseded by SwRS-MDOKFSTUDIO-TRUST-005 Markdown file
SwRS-MDOKFSTUDIO-TRUST-063A link targets message needs an array of the current render superseded superseded by SwRS-MDOKFSTUDIO-TRUST-059 Markdown file