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
Path 1: See where a link leads and open it
- A link comes into viewSwRS-MDOKFSTUDIO-TOOLBAR-079 the same request twice is asked onceSwRS-MDOKFSTUDIO-TOOLBAR-079 · 5 tests the page asks the host for the target of its request, and the host answers with its kind and its path or reason
- The target of the link is knownSwRS-MDOKFSTUDIO-TOOLBAR-085 a missing or blocked target keeps its link and gains a warning iconSwRS-MDOKFSTUDIO-TOOLBAR-085 · 4 tests the link gets the target as its tooltip, or the reason when it is blocked
- The tooltip names where the link leadsSwRS-MDOKFSTUDIO-TOOLBAR-077 the host refuses with a warningSwRS-MDOKFSTUDIO-TOOLBAR-090 a scheme other than http, https or mailto, or an absolute path, is blocked with a reasonSwRS-MDOKFSTUDIO-TOOLBAR-077 · 7 tests the reader clicks the link and the host opens the target
- The target is openSwRS-MDOKFSTUDIO-TOOLBAR-094 a path outside every root is blockedSwRS-MDOKFSTUDIO-TOOLBAR-094 · 2 tests a relative Markdown link opens only a regular file below a workspace root
- The file is open
Path 2: Follow an anchor
- A link comes into viewSwRS-MDOKFSTUDIO-TOOLBAR-117 an unknown or stale request does not scrollSwRS-MDOKFSTUDIO-TOOLBAR-117 · 3 tests the reader follows an anchor, and the page scrolls to the mapped block to the reading line below the band
- The heading of the anchor is at the reading line
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