Behaviour SwRS-MDOKFSTUDIO-PALETTE-270
Card form inserts a MyST card
When the writer chooses Card from the MyST palette or the slash menu, the extension SHALL open a form for the card title, header, footer and link and, on Insert, write a {card} directive with the filled options after the selection.
Part of StRS-MDOKFSTUDIO-PALETTE-021, outside the paths drawn on its map.
Scenarios 2
The situations the tests check; open one to read it.
nominalOpen the form and insert
Givena block editor in the MyST palette mode
Whenthe writer presses the Card button, or chooses Card in the slash menu (the typed /query is removed first)
Thena form opens under the palette with the fields Title, Header, Footer and Link; Insert writes a {card} directive after the selection, with a :header:, :footer: and :link: option for each filled field, an empty field leaving its option out, and selects the body placeholder
boundaryCancel, empty title and line breaks
| Input | Outcome |
|---|---|
| Escape or Cancel | The form closes and the text is unchanged |
| Empty Title | The directive is written as {card} without an argument |
| A value with line breaks or runs of spaces | It is written on one line with single spaces |
| The text typed in the text box while the form is open | The form closes |