Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-172

A document opens in preview mode and E switches to edit mode

When a document opens in a panel, the extension SHALL start the page in preview mode, unless the saved state of that same document holds edit mode, and while the page is in preview mode the extension SHALL switch to edit mode when E is pressed alone outside any text field.

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

Scenarios 5

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

nominalAnother document replaces the one shown in the panel
Givena panel whose saved state names document A with edit mode on
Whendocument B opens in the same panel
ThenB starts in preview mode, whatever the stored workspace edit mode is
nominalA fresh panel
Givena panel with no saved state and a workspace whose stored edit mode is true
Whena document opens
Thenthe page starts in preview mode
boundaryThe same document reloads
Givena panel whose saved state names the same document with edit mode on
Whenthe page reloads
Thenthe page starts in edit mode (see SwRS-MDOKFSTUDIO-LIFE-170)
nominalE switches to edit mode
Givena page in preview mode with a working Edit button
WhenE is pressed alone, with focus outside any text field
Thenthe page switches to edit mode as the Edit button does
boundaryE with a modifier or in a text field
Givena page in preview mode
WhenE is pressed with Ctrl, Cmd, Alt or Shift, or inside an input, a text area, a select or an editable element
Thenthe mode stays unchanged and the key is not intercepted

Implemented in 2

Tested by 2