Use case StRS-MDOKFSTUDIO-MYST-009
A writer sees, links and renames labels safely
As a writer, I want to see where each cross-reference points, reuse each label and rename it safely, so that cross-references are easy and references do not silently break.
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: Reference a label path 2: Rename a label, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Reference a label
- A document holds a `(name)=` labelSwRS-MDOKFSTUDIO-MYST-036 a label before another block or at the endSwRS-MDOKFSTUDIO-MYST-036 · 2 tests the page shows a faint anchor icon on the next paragraph or heading, without moving the text
- The label shows an anchor iconSwRS-MDOKFSTUDIO-MYST-019 explicit text and paragraph labelsSwRS-MDOKFSTUDIO-MYST-019 · 2 tests a `{ref}` to the label renders an in-page link showing the target text or the given text
- The reference is an in-page link
Path 2: Rename a label
- The label shows an anchor iconSwRS-MDOKFSTUDIO-MYST-038 an invalid name is not sentSwRS-MDOKFSTUDIO-BLOCK-041 an open block editor makes the label rename refused with its reasonSwRS-MDOKFSTUDIO-MYST-038 · 9 tests in edit mode a click on the icon opens a Rename label popover with the name selected
- The Rename label popover is openSwRS-MDOKFSTUDIO-MYST-045 a malformed or stale messageSwRS-MDOKFSTUDIO-MYST-045 · 5 tests the page posts the rename with a source line, two valid names and the current render, and the host answers with the same edit id
- The host holds a valid renameSwRS-MDOKFSTUDIO-MYST-045 a line that is no longer `(old)=` changes nothingSwRS-MDOKFSTUDIO-MYST-045 · 5 tests the host changes only the `(old)=` text of the stated line, as one undo step
- The label has its new name in the source
This map has 3,286 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 32 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-MYST-019Reference roles link to in-page targets 2 testsSwRS-MDOKFSTUDIO-MYST-036Labels show an anchor icon on the next block 2 testsSwRS-MDOKFSTUDIO-MYST-038The anchor icon opens a rename field that sends valid names 9 testsSwRS-MDOKFSTUDIO-MYST-045The host renames only the label text in one undo step 5 tests
SwRS-MDOKFSTUDIO-MYST-037The anchor icon is not a mapped block and carries its source line superseded superseded by SwRS-MDOKFSTUDIO-MYST-036 Markdown file
SwRS-MDOKFSTUDIO-MYST-039Enter sends the label rename and an unchanged name sends nothing superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-040Escape or an outside press closes the rename field superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-041Invalid label names are not sent superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-042The host refuses a rename in an untrusted or read-only preview superseded superseded by SwRS-MDOKFSTUDIO-TRUST-005 Markdown file
SwRS-MDOKFSTUDIO-MYST-043The host refuses a rename while an edit is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-MYST-044The host refuses a rename for an out-of-date preview superseded superseded by SwRS-MDOKFSTUDIO-TRUST-065 Markdown file
SwRS-MDOKFSTUDIO-MYST-046A valid rename edits only the label text as one undo step superseded superseded by SwRS-MDOKFSTUDIO-MYST-045 Markdown file
SwRS-MDOKFSTUDIO-MYST-047A successful rename reports the remaining uses superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-048The rename field shows progress and refusals superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-049The rename field times out after 6 seconds superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-050Rename is blocked while an editor is open in the page superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-MYST-051The label rename message is validated and answered superseded superseded by SwRS-MDOKFSTUDIO-MYST-045 Markdown file
SwRS-MDOKFSTUDIO-MYST-090The rename field closes itself after 5 seconds superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file
SwRS-MDOKFSTUDIO-MYST-094A label starting with underscore, dot or hyphen cannot be renamed superseded superseded by SwRS-MDOKFSTUDIO-MYST-038 Markdown file