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
Path 1: Rename a key
- The properties table is shown in edit modeSwRS-MDOKFSTUDIO-FMEDIT-024 the key editor works without a schemaSwRS-MDOKFSTUDIO-FMEDIT-024 · 6 tests a click on a field name opens the key editor
- The key editor is openSwRS-MDOKFSTUDIO-FMEDIT-024 an empty or padded name is refusedSwRS-MDOKFSTUDIO-FMEDIT-024 · 6 tests Enter or leaving with a changed name renames only the key text
- The key has its new name and the comments are kept
Path 2: Add a field
- A field editor is openSwRS-MDOKFSTUDIO-FMEDIT-028 no custom key is offered when extra properties are forbiddenSwRS-MDOKFSTUDIO-FMEDIT-029 Remove field deletes exactly the lines of the fieldSwRS-MDOKFSTUDIO-FMEDIT-029 Remove field is disabled for a schema-required fieldSwRS-MDOKFSTUDIO-FMEDIT-028 · 3 tests the Add field button adds a field chosen among the missing schema fields or typed as a custom key
- A new field is addedSwRS-MDOKFSTUDIO-FMEDIT-037 · 3 tests the field is one inserted line where its row shows and its editor opens by itself once
- The editor of the new field 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