Use case StRS-MDOKFSTUDIO-DIAG-015
A writer reads charts and drawings in the page
A writer puts a chart or a drawing in the document and sees it in the page, with nothing executed or fetched.
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: Read a chart in the page path 2: Read a drawing in the page other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Read a chart in the page
- A document holds a Vega-Lite or Vega fenceSwRS-MDOKFSTUDIO-DIAG-122 chart data comes only from a file inside the allowed folders; a remote url shows a messageSwRS-MDOKFSTUDIO-DIAG-121 · 3 tests the fence becomes a chart figure with a collapsed source section
- The page has a chart figureSwRS-MDOKFSTUDIO-DIAG-124 · 5 tests the chart runtime loads with the chart and needs no eval
- The chart is drawn in the colours of the pageSwRS-MDOKFSTUDIO-DIAG-123 · 3 tests the chart is a themed SVG picture, or the error shows in its place
Path 2: Read a drawing in the page
- A document holds an svg fence or a raw svg blockSwRS-MDOKFSTUDIO-DIAG-125 · 4 tests the SVG is rebuilt from an allow-list and drawn inline
- The drawing is in the pageSwRS-MDOKFSTUDIO-DIAG-126 · 3 tests the picture takes its colours from the preview theme
- The writer clicks the picture in edit modeSwRS-MDOKFSTUDIO-DIAG-127 · 2 tests the source editor of the block opens
This map has 11 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 7 behaviours on the map are tested one by one, with 18 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-DIAG-121Vega-Lite and Vega fences become chart figures 3 testsSwRS-MDOKFSTUDIO-DIAG-122Chart data files are read through the resource policy 4 testsSwRS-MDOKFSTUDIO-DIAG-123Charts are drawn as themed SVG pictures with errors in place 3 testsSwRS-MDOKFSTUDIO-DIAG-124Chart expressions are evaluated without eval under an unchanged policy 5 testsSwRS-MDOKFSTUDIO-DIAG-125SVG blocks are drawn inline after the sanitizer rebuilt them 4 testsSwRS-MDOKFSTUDIO-DIAG-126A picture takes its colours from the preview theme 3 testsSwRS-MDOKFSTUDIO-DIAG-127A click on a picture opens its source editor 2 tests