Behaviour SwRS-MDOKFSTUDIO-REVIEW-008
The Side-by-side button switches the diff and is disabled in edit mode
When the reader presses the Side-by-side button of toolbar row 4, the page SHALL toggle the side-by-side diff, set the button pressed state and label to match, post the new state to the host, and, while edit mode is on, disable the button, show no diff and leave the green change bars as they are.
Step 1 of path 1 in StRS-MDOKFSTUDIO-REVIEW-018: from “A file tracked by Git differs from its last commit” to “The host is told the diff is on”.
Scenarios 2
The situations the tests check; open one to read it.
nominalThe button
| Input | Outcome |
|---|---|
| A page just loaded | the button is not pressed, labelled Show side-by-side changes since last commit, and the page attribute data-sphinx-preview-sbs is off |
| The reader presses the button | pressed, labelled Hide side-by-side changes since last commit, the attribute is on, and previewSideBySideChanged with on true is posted |
| The reader presses it again | the state goes back and on false is posted |
boundaryEdit mode
| Input | Outcome |
|---|---|
| Edit mode on | the button is disabled and its tooltip says it is not available in edit mode; a click posts nothing; no card is shown and the green bars stay |
| Edit mode off again | the button is enabled and the diff state is as it was |