Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-FMEDIT-005

A writer adds, renames and removes metadata fields

As a writer, I rename a metadata key without touching the rest of the frontmatter, add the metadata fields my schema expects, or a custom one, and fill them in at once, and remove an obsolete field safely, without losing other fields or comments.

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.

path 1: Rename a key path 2: Add a field other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-FMEDIT-024: A click on a field name renames the keySwRS-MDOKFSTUDIO-FMEDIT-0246 testsa click on a field name opens thekey editorSwRS-MDOKFSTUDIO-FMEDIT-024: A click on a field name renames the keySwRS-MDOKFSTUDIO-FMEDIT-0246 testsEnter or leaving with a changedname renames only the key textSwRS-MDOKFSTUDIO-FMEDIT-028: The field action menu offers the missing schema fields or a custom keySwRS-MDOKFSTUDIO-FMEDIT-0283 teststhe Add field button adds a fieldchosen among the missing schemafields or typed as a custom keySwRS-MDOKFSTUDIO-FMEDIT-037: An added field is one inserted line where its row shows, and its editor opensSwRS-MDOKFSTUDIO-FMEDIT-0373 teststhe field is one inserted linewhere its row shows and its editoropens by itself onceSwRS-MDOKFSTUDIO-FMEDIT-024: A click on a field name renames the keySwRS-MDOKFSTUDIO-FMEDIT-0246 teststhe key editor works withouta schemaSwRS-MDOKFSTUDIO-FMEDIT-024: A click on a field name renames the keySwRS-MDOKFSTUDIO-FMEDIT-0246 testsan empty or padded name is refusedSwRS-MDOKFSTUDIO-FMEDIT-028: The field action menu offers the missing schema fields or a custom keySwRS-MDOKFSTUDIO-FMEDIT-0283 testsno custom key is offered when extra properties are forbiddenSwRS-MDOKFSTUDIO-FMEDIT-029: Remove field deletes exactly the lines of a non-required fieldSwRS-MDOKFSTUDIO-FMEDIT-0296 testsRemove field deletes exactly the lines of the fieldSwRS-MDOKFSTUDIO-FMEDIT-029: Remove field deletes exactly the lines of a non-required fieldSwRS-MDOKFSTUDIO-FMEDIT-0296 testsRemove field is disabled for a schema-required fieldThe properties table is shown in edit modeThe properties table isshown in edit modeThe key editor is openThe key editor is openThe key has its new name and the comments are keptThe key has its new nameand the comments arekeptA field editor is openA field editor is openA new field is addedA new field is addedThe editor of the new field is openThe editor of the newfield is open

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

Behaviours of this use case

SwRS-MDOKFSTUDIO-FMEDIT-024A click on a field name renames the key 6 testsSwRS-MDOKFSTUDIO-FMEDIT-028The field action menu offers the missing schema fields or a custom key 3 testsSwRS-MDOKFSTUDIO-FMEDIT-029Remove field deletes exactly the lines of a non-required field 6 testsSwRS-MDOKFSTUDIO-FMEDIT-037An added field is one inserted line where its row shows, and its editor opens 3 testsSwRS-MDOKFSTUDIO-FMEDIT-043A frontmatter edit changes only the lines of its field not on the map7 tests
SwRS-MDOKFSTUDIO-FMEDIT-025Enter or leaving the key editor renames the key superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-024 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-026An empty or padded key name is refused in the key editor superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-024 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-027The host refuses a rename to a name already used 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-031Remove field is disabled for a schema-required 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-033The Add field picker lists the schema fields still missing superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-028 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-034Without schema fields to add, a typed field name is added superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-028 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-035The picker offers a Custom key when extra properties are allowed superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-028 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-036An invalid custom key name is refused in the picker superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-028 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-038Without a schema, an added field follows the row whose menu was used superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-037 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-040The editor of an added field opens by itself once superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-037 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-041A pending new-field editor is dropped when it cannot be used superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-037 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-042A new custom key is saved as a plain scalar when that is safe superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-037 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-084The field action menu stays inside its row in a narrow preview superseded superseded by SwRS-MDOKFSTUDIO-FMEDIT-028 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-086A closed schema flags the properties section superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-084 Markdown file