Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-006

The host posts the baseline rendering while the side-by-side diff is on and takes only a well-formed switch message

While the side-by-side diff is on for a tracked file in a trusted workspace and markdownOkfSchemaStudio.preview.showIncomingChanges is not false, the host SHALL post to the page the text at the last commit rendered like the page content with its blocks numbered by the lines of that text, together with the line hunks between that text and the shown text, again when the shown text or the commit changes, and SHALL post an empty baseline when the file is not known to Git or the text at the last commit cannot be rendered; the switch message previewSideBySideChanged is accepted only with a boolean on field for the current render, and any other is dropped.

Step 2 of path 1 in StRS-MDOKFSTUDIO-REVIEW-018: from “The host is told the diff is on” to “The page holds the baseline”.

Scenarios 4

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

nominalThe baseline follows the shown text
InputOutcome
The side-by-side diff on, a tracked file in a trusted workspacethe host posts previewBaselineDiff with the HEAD text rendered like the page content and the hunks between it and the shown text
The shown text changesa new message with new hunks; the same HEAD text is not rendered again
The HEAD commit changesa new message with the new rendering
The Diff button offthe baseline is still posted
The diff switched offnothing more is read, rendered or posted
boundaryNo baseline
InputOutcome
A file Git does not knowan empty baseline (no html, no hunk)
A HEAD text that cannot be rendered, or whose content would carry a script or a noncean empty baseline, so the page keeps the green bars
markdownOkfSchemaStudio.preview.showIncomingChanges off, or an untrusted workspacenothing is read or posted
Raw scripts in the HEAD textnever part of the posted html
nominalA well-formed switch message
InputOutcome
previewSideBySideChanged with on true or false for the current renderaccepted
refusalDropped switch messages
InputOutcome
previewSideBySideChanged with a non-boolean or no ondropped
A switch message of a stale renderdropped

Implemented in 4

Tested by 3

Replaces

SwRS-MDOKFSTUDIO-REVIEW-007The side-by-side messages are validated and gated superseded superseded by SwRS-MDOKFSTUDIO-REVIEW-006, SwRS-MDOKFSTUDIO-REVIEW-009 Markdown file