Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-BLOCK-102

An empty body offers one Start writing button

While edit mode is on and the body of a rendered document has no block, the page SHALL show one Start writing button, after the properties table when there is one, in place of the insert points, and open the first-block editor from it on a click.

Step 1 of path 2 in StRS-MDOKFSTUDIO-BLOCK-011: from “Edit mode is on and the body of the document is empty” to “The editor of the first block is open”.

Part of StRS-MDOKFSTUDIO-BLOCK-003, outside the paths drawn on its map.

Scenarios 5

The situations the tests check; open one to read it.

nominalEmpty body shows one Start writing button
InputOutcome
An empty document in edit modeOne visible Start writing button exists for line 0 and no insert point
A document with only frontmatterThe Start writing button follows the properties table
Givena rendered document whose body has no block, in edit mode
Whenthe page builds its bars
Thenthe button text is Start writing and its bar has the class sphinx-preview-insert-point--start
refusalNo Start writing button on a failed or pending render
Givenan error page with no body blocks in edit mode, or a pending render
Whenthe page builds its bars
Thenno Start writing button exists; a successful (or recovered) render of an empty document has the button
nominalA click opens the editor of the first block
Givenan empty document in edit mode
Whenthe writer clicks Start writing
ThenpreviewEditOpen carries insertAfterLine 0 and line 1, and the button is replaced by the focused editor
nominalThe button is hidden while its editor is open
Givenan empty document
Whenthe Start writing editor opens
the writer presses Ctrl or Cmd+Enter
the writer presses Escape instead
Thenthe button is hidden behind the frame (the bar carries data-sphinx-preview-editing)
the block is saved
the editor closes and the button is visible again
boundaryThe first-block editor is marked
InputOutcome
The editor of the first block of a document without frontmatter, edit mode onThe frame carries sphinx-preview-block-editor--first, whose margin is specified by SwRS-MDOKFSTUDIO-LAYOUT-007 and SwRS-MDOKFSTUDIO-LAYOUT-011
The Start writing editor of a document without a properties tableThe frame carries sphinx-preview-block-editor--first
A later blockNo first-block mark
An insertion editor below another blockNo first-block mark
The first body block below a properties tableNo first-block mark
Start writing below a properties tableNo first-block mark

Implemented in 2

Tested by 2