Use case StRS-MDOKFSTUDIO-LIFE-022
Closing a preview or a folder leaves nothing behind
As a reader, I close a preview or a document, remove a folder from the workspace or turn the extension off, and no work or warning of that preview lingers. When the folder of a preview I keep open is removed, the preview stays on its panel and still shows its file, with restricted reads.
Use case diagram
How it is split
This use case (StRS) is reached by 2 paths, one per 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: Close a preview path 2: Remove the folder of a preview other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Close a preview
- A preview is open, rendering or idleSwRS-MDOKFSTUDIO-LIFE-143 another live preview of the same root or file keeps its watcher and its Problems entriesSwRS-MDOKFSTUDIO-LIFE-143 · 5 tests the reader closes the panel or the document, and the preview stops its render queue, watchers and Problems entries
- The preview has left nothing behind
Path 2: Remove the folder of a preview
- A preview shows a file of a workspace folderSwRS-MDOKFSTUDIO-LIFE-143 a removed folder with no document to show disposes the preview and its panelSwRS-MDOKFSTUDIO-LIFE-143 · 5 tests the reader removes the folder, the preview's work is disposed and the same panel shows the file again with restricted reads
- The preview shows its file with restricted readsSwRS-MDOKFSTUDIO-LIFE-143 · 5 tests a folder that holds the file is added back and the preview gets full reads again on the same panel
- The preview has full reads again
This map has 8 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 1 behaviours on the map are tested one by one, with 7 scenarios.