Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-FMEDIT-008

Metadata edits keep the source intact, follow the schema and never lose text

As a writer or reviewer, I expect a metadata edit to leave comments, quoting, line endings and the rest of the document unchanged, with the diff containing only the edited field; I am protected from saving metadata that the schema rejects or that no longer matches the document, and I do not lose what I typed when I follow a link or go back.

Use case diagram

How it is split

This use case (StRS) is reached by one path (the 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: Save a value without side effects other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-FMEDIT-043: A frontmatter edit changes only the lines of its fieldSwRS-MDOKFSTUDIO-FMEDIT-0437 teststhe save changes only the lines ofits field and keeps comments,quoting, spacing and line endingsSwRS-MDOKFSTUDIO-FMEDIT-043: A frontmatter edit changes only the lines of its fieldSwRS-MDOKFSTUDIO-FMEDIT-0437 testsan edit that loses or corrupts a key is refusedSwRS-MDOKFSTUDIO-FMEDIT-016: The host refuses a value that breaks YAML, the field type or the schema, and ignores a malformed save messageSwRS-MDOKFSTUDIO-FMEDIT-0163 testsa value that breaks the YAML, the field type or the schema isrefused and nothing changesSwRS-MDOKFSTUDIO-FMEDIT-067: A navigation saves the open field editor as an unchecked flushSwRS-MDOKFSTUDIO-FMEDIT-0673 testsa navigation saves the typed text as a flushA field editor is openA field editor is openThe value is saved on the lines of its field and the diff holds only the edited fieldThe value is saved onthe lines of its fieldand the diff holds onlythe edited field

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

Behaviours of this use case

SwRS-MDOKFSTUDIO-BLOCK-193Page updates wait while an inline editor is open not on the map6 testsSwRS-MDOKFSTUDIO-FMEDIT-016The host refuses a value that breaks YAML, the field type or the schema, and ignores a malformed save message 3 testsSwRS-MDOKFSTUDIO-FMEDIT-024A click on a field name renames the key not on the map6 testsSwRS-MDOKFSTUDIO-FMEDIT-029Remove field deletes exactly the lines of a non-required field not on the map6 testsSwRS-MDOKFSTUDIO-FMEDIT-043A frontmatter edit changes only the lines of its field 7 testsSwRS-MDOKFSTUDIO-FMEDIT-067A navigation saves the open field editor as an unchecked flush 3 tests
SwRS-MDOKFSTUDIO-FMEDIT-002A field editor does not open while another editor is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-018A null value is refused for a field that is not nullable superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-025Enter or leaving the key editor renames the key superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-024 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-030Remove field deletes exactly the lines of the field superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-029 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-032The host refuses to remove a required field superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-029 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-039An added field is a single inserted line in the file's line endings superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-043 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-044Anchored or aliased values fall back to a whole-block rewrite superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-043 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-045A frontmatter edit that loses or corrupts a key is refused superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-043 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-046Values ending in three dots or dashes stay inside the block superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-043 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-047A value that does not fit the field type is refused superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-048A schema error on the edited field refuses the save superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-049Only errors of the edited field block a save superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-051A save in an untrusted workspace is refused superseded superseded by SwRS-MDOKFSTUDIO-TRUST-005 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-052A save from an older render is refused with a reopen hint superseded superseded by SwRS-MDOKFSTUDIO-TRUST-065 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-053A save VS Code rejects is reported superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-058 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-054A frontmatter save message names its editor and field, or is ignored superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-058Refresh is blocked while a field editor is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-059A checkbox toggle is refused while a field editor is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-060A properties update waits until the field editor closes superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-193 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-061A content patch closes the field editor superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-193 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-062Boundary navigation does not step into the properties table superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-079 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-063The properties table is never part of a block selection or move superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-148 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-064The insert point after the table has no move buttons superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-109 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-068A flush save is written without the type and schema check superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-067 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-069A refused flush warns that the typed text was dropped superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-067 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-070A normal frontmatter save carries no flush flag superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-067 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-071A refused plain save is saved again as a flush before a navigation superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-067 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-072Block selection and block moves ignore input while a field editor is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-073The figure editor and the Start writing Enter shortcut ignore input while a field editor is open superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-041 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-079A null value is refused when a conditional rule forbids it superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-080The figure editor and insert points ignore input while a field editor is open deprecated deprecated Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-083A save for a missing field or revision is refused as stale superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-016 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-085Hiding or closing the page saves the open field editor as a flush superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-067 Markdown file