Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-FMSCHEMA-014

Frontmatter link fields resolve, show their status and can be followed

As a schema author, I declare that a field points to files so that writers get checked, navigable references; as a writer, I see at a glance which references are broken and why, and as a reviewer, I see key facts about a linked file without opening it and jump from a metadata reference to the file and line it names.

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: Follow a link field path 2: Link problems in the badge, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-FMSCHEMA-046: x-okf-link annotations declare link fields and their syntaxSwRS-MDOKFSTUDIO-FMSCHEMA-0463 teststhe page finds theannotation and resolvesthe target apart fromits query and fragmentSwRS-MDOKFSTUDIO-FMSCHEMA-050: Links resolve from the configured or default root and stay inside itSwRS-MDOKFSTUDIO-FMSCHEMA-0504 testsa document-relative,bundle-relative orproject-relative target must be anexisting file inside its rootSwRS-MDOKFSTUDIO-FMSCHEMA-063: Each link value shows whether it resolvesSwRS-MDOKFSTUDIO-FMSCHEMA-0635 testsabout 150 ms later the table isreplaced so that a resolving linkis a keyboard-focusable link witha tooltipSwRS-MDOKFSTUDIO-FMSCHEMA-073: A resolving frontmatter link opens its target, others are refused with a warningSwRS-MDOKFSTUDIO-FMSCHEMA-0733 testsa click or Enter opens the targetin the editor at the marker lineSwRS-MDOKFSTUDIO-FMSCHEMA-039: The title badge counts the issues and jumps to the first oneSwRS-MDOKFSTUDIO-FMSCHEMA-0396 teststhe badge in the table titlecounts the link problemsSwRS-MDOKFSTUDIO-FMSCHEMA-046: x-okf-link annotations declare link fields and their syntaxSwRS-MDOKFSTUDIO-FMSCHEMA-0463 testsan invalid annotation orlink value marks thefield with an E10 errorSwRS-MDOKFSTUDIO-FMSCHEMA-055: A filename stem resolves when exactly one file matchesSwRS-MDOKFSTUDIO-FMSCHEMA-0556 testsa filename-stem is acceptedwhen exactly one file matchesSwRS-MDOKFSTUDIO-FMSCHEMA-050: Links resolve from the configured or default root and stay inside itSwRS-MDOKFSTUDIO-FMSCHEMA-0504 testsa configured root that cannotbe usedSwRS-MDOKFSTUDIO-FMSCHEMA-039: The title badge counts the issues and jumps to the first oneSwRS-MDOKFSTUDIO-FMSCHEMA-0396 testsa table with info rows onlySwRS-MDOKFSTUDIO-FMSCHEMA-063: Each link value shows whether it resolvesSwRS-MDOKFSTUDIO-FMSCHEMA-0635 testsa link that does not resolveshows an error or warning markand a plain labelSwRS-MDOKFSTUDIO-FMSCHEMA-067: A link tooltip shows the fields and an excerpt of the linked fileSwRS-MDOKFSTUDIO-FMSCHEMA-06712 teststhe tooltip lists the fields of the target found in itsfrontmatterSwRS-MDOKFSTUDIO-FMSCHEMA-073: A resolving frontmatter link opens its target, others are refused with a warningSwRS-MDOKFSTUDIO-FMSCHEMA-0733 testsan unusable link opens nothing and shows a warningA schema annotates a property with `x-okf-link`A schema annotates aproperty withx-okf-linkThe link target is checked against the files (paths 1, 2)The link target ischecked against thefiles2The link is shown pending, then resolvedThe link is shownpending, then resolvedThe link is a focusable linkThe link is a focusablelinkThe target is open in the editorThe target is open inthe editorThe badge counts the problems of the link fieldsThe badge counts theproblems of the linkfields

Path 1: Follow a link field

  1. A schema annotates a property with `x-okf-link`SwRS-MDOKFSTUDIO-FMSCHEMA-046 an invalid annotation or link value marks the field with an E10 errorSwRS-MDOKFSTUDIO-FMSCHEMA-046 · 3 tests the page finds the annotation and resolves the target apart from its query and fragment
  2. The link target is checked against the filesSwRS-MDOKFSTUDIO-FMSCHEMA-055 a filename-stem is accepted when exactly one file matchesSwRS-MDOKFSTUDIO-FMSCHEMA-050 a configured root that cannot be usedSwRS-MDOKFSTUDIO-FMSCHEMA-050 · 4 tests a document-relative, bundle-relative or project-relative target must be an existing file inside its root
  3. The link is shown pending, then resolvedSwRS-MDOKFSTUDIO-FMSCHEMA-063 a link that does not resolve shows an error or warning mark and a plain labelSwRS-MDOKFSTUDIO-FMSCHEMA-063 · 5 tests about 150 ms later the table is replaced so that a resolving link is a keyboard-focusable link with a tooltip
  4. The link is a focusable linkSwRS-MDOKFSTUDIO-FMSCHEMA-067 the tooltip lists the fields of the target found in its frontmatterSwRS-MDOKFSTUDIO-FMSCHEMA-073 an unusable link opens nothing and shows a warningSwRS-MDOKFSTUDIO-FMSCHEMA-073 · 3 tests a click or Enter opens the target in the editor at the marker line
  5. The target is open in the editor

Path 2: Link problems in the badge

  1. The link target is checked against the filesSwRS-MDOKFSTUDIO-FMSCHEMA-039 a table with info rows onlySwRS-MDOKFSTUDIO-FMSCHEMA-039 · 6 tests the badge in the table title counts the link problems
  2. The badge counts the problems of the link fields

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

Behaviours of this use case

SwRS-MDOKFSTUDIO-FMSCHEMA-039The title badge counts the issues and jumps to the first one 6 testsSwRS-MDOKFSTUDIO-FMSCHEMA-046x-okf-link annotations declare link fields and their syntax 3 testsSwRS-MDOKFSTUDIO-FMSCHEMA-050Links resolve from the configured or default root and stay inside it 4 testsSwRS-MDOKFSTUDIO-FMSCHEMA-055A filename stem resolves when exactly one file matches 6 testsSwRS-MDOKFSTUDIO-FMSCHEMA-063Each link value shows whether it resolves 5 testsSwRS-MDOKFSTUDIO-FMSCHEMA-067A link tooltip shows the fields and an excerpt of the linked file 12 testsSwRS-MDOKFSTUDIO-FMSCHEMA-073A resolving frontmatter link opens its target, others are refused with a warning 3 testsSwRS-MDOKFSTUDIO-TOOLBAR-077A click or Enter on a link is routed to the host and opened or refused with a warning not on the map7 tests
SwRS-MDOKFSTUDIO-FMSCHEMA-047An invalid x-okf-link annotation marks the field superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-046 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-048Link values are checked for type and syntax superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-046 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-049Query and fragment are split off a link target superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-046 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-051Bundle-relative links resolve from the bundle root superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-052Project-relative links resolve from the project root superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-053Absolute link targets are refused superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-054Bundle and project targets cannot leave their root superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-056An ambiguous or unknown stem is an error superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-055 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-057An unreadable stem candidate gives a warning superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-055 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-058The stem index skips build and hidden folders superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-055 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-059The stem index is rebuilt when a Markdown file changes superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-055 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-060The bundleRoot, projectRoot and allowOutsideWorkspaceLinks settings set the roots superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-061The projectRoot setting sets the project root superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-062The allowOutsideWorkspaceLinks setting default refuses outside links superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-064A link that does not resolve shows its problem superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-063 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-065Links are shown as pending on the first paint superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-063 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-066Links are resolved about 150 ms after the render superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-063 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-068A link shows an excerpt of the linked file superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-067 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-069A link can show the line of its marker superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-067 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-070Linked file details refresh when the target changes on disk superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-067 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-071A link tooltip appears on hover and focus superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-067 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-072A link tooltip closes on leaving, Escape, scroll, resize and outside click superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-067 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-074An unusable frontmatter link is not followed superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-073 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-079The bundle root defaults to the schema folder's parent superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-080The project root defaults to the nearest git root superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-081The allowOutsideWorkspaceLinks setting set to true allows outside links superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-050 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-082A refused frontmatter link shows a warning with its reason superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-073 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-083A malformed frontmatter link request is refused superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-077 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-086A link problem is keyboard-focusable and explained in its tooltip superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-063 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-087A link problem counts in the badge superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-039 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