Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-039

Built-in pictures are kept by source and drawn one at a time

When the page needs built-in diagrams, it SHALL show the kept result without running the engine when the source, include base and light or dark variant equal those of an earlier result, and otherwise run the engine for one diagram at a time in the order requested and skip a queued run whose renders were all superseded.

Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-DIAG-006, in the state “The document holds a PlantUML diagram”.

Part of StRS-MDOKFSTUDIO-DIAG-009, outside the paths drawn on its map.

Scenarios 5

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

nominalPatch and switch back
Givena drawn diagram, a content patch that keeps its source, and a theme switch to dark and back
Whenthe page draws the diagram again
Thenwhen the source, include base and light or dark variant equal those of an earlier result, the page shows that result without running the engine
the engine runs once for the light variant and once for the dark variant, not again on the switch back
boundarySame text, different base
Giventwo diagrams with the same text and different include bases
Whenthe page draws both
Thenthe engine runs for each
boundaryWhich results are kept
InputOutcome
a diagram whose include the host refuses, drawn twicethe result is not kept: the host is asked again at the second render and a fixed file then shows the picture
a diagram whose included file holds an unsupported directivethe result is not kept, so the next render asks again
a diagram with a syntax error and no include problem, drawn twice with the same sourcethe second drawing shows the kept error without running the engine
nominalOne diagram at a time
Giventwo diagrams that each include a file, and a diagram waiting for the host's answer when a second one is requested
Whenboth are drawn
Thenthe engine runs for one diagram at a time in the order requested, and the second starts after the first finished
each include request belongs to the diagram that is drawing, and the second diagram does not read the first one's includes
boundaryQueued runs of a superseded render are dropped
InputOutcome
ten renders of one diagram element requested in a row, each with a different include basethe engine runs at most twice; runs still waiting in the queue whose only renders were superseded (or whose element left the page) are not started
a queued run that a second, current element also waits for (same key)the run still starts

Implemented in 2

Tested by 3

Known limits (2)

Replaces

SwRS-MDOKFSTUDIO-DIAG-041Results with refused includes are not kept superseded superseded by SwRS-MDOKFSTUDIO-DIAG-039 Markdown file
SwRS-MDOKFSTUDIO-DIAG-042The built-in engine draws one diagram at a time superseded superseded by SwRS-MDOKFSTUDIO-DIAG-039 Markdown file
SwRS-MDOKFSTUDIO-DIAG-043A superseded built-in render does not overwrite a newer one superseded superseded by SwRS-MDOKFSTUDIO-DIAG-039 Markdown file
SwRS-MDOKFSTUDIO-DIAG-044A content patch draws only new built-in diagrams superseded superseded by SwRS-MDOKFSTUDIO-DIAG-039 Markdown file