Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-THEME-004

The theme choice holds for the workspace and survives slow loads and bad values

As a reader, I pick a theme once and every preview of this workspace opens in it afterwards, also after a window reload; when I open the preview for the first time in a workspace, I see a calm warm paper page without having to find the Theme button, whatever my VS Code theme is; I open or restore a preview on a slow machine and still see it in the colours of my current VS Code theme, not in stale ones; and I never get a broken or unreadable preview because a stored theme setting is damaged.

Use case diagram

How it is split

This use case (StRS) is reached by one path (the coloured line). A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests.

path 1: Pick a theme and find it again other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-LIFE-169: A view choice made on the page is stored for the workspaceSwRS-MDOKFSTUDIO-LIFE-16915 teststhe reader picks a mode, and thehost validates it and stores itfor the workspaceSwRS-MDOKFSTUDIO-LIFE-170: A new page starts each view choice from the panel, stored or default valueSwRS-MDOKFSTUDIO-LIFE-17014 teststhe preview opens again and startsfrom the stored workspace valueSwRS-MDOKFSTUDIO-LIFE-169: A view choice made on the page is stored for the workspaceSwRS-MDOKFSTUDIO-LIFE-16915 testsa mode other than current,dark, white or cream isdropped and the stored modedoes not changeSwRS-MDOKFSTUDIO-LIFE-170: A new page starts each view choice from the panel, stored or default valueSwRS-MDOKFSTUDIO-LIFE-17014 testsan invalid value is ignored and the next source is usedThe page is shown in one theme modeThe page is shown in onetheme modeThe mode is stored for the workspaceThe mode is stored forthe workspaceThe page is shown in the mode the reader pickedThe page is shown in themode the reader picked

This map has 111 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 2 behaviours on the map are tested one by one, with 19 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-THEME-001The Theme button cycles Current, Dark, White and Cream not on the map6 testsSwRS-MDOKFSTUDIO-THEME-016Current mode follows the VS Code theme and redraws on change not on the map4 tests
SwRS-MDOKFSTUDIO-THEME-013The host drops a theme-mode message with an unknown mode superseded superseded by SwRS-MDOKFSTUDIO-LIFE-169 Markdown file