Behaviour SwRS-MDOKFSTUDIO-CORE-087
The site requirements viewer shows the use case diagram of a StRS
When a maintainer builds the Pages site and a use case (StRS) has a Use case diagram section holding a Mermaid fence, the build SHALL draw the diagram as an inline SVG in the site's colours on the page of the use case, under the user need, readable without JavaScript, and SHALL stop with the use case id and Mermaid's message when a fence cannot be drawn.
Part of StRS-MDOKFSTUDIO-TRUST-014.
Scenarios 3
The situations the tests check; open one to read it.
nominalA diagram under the user need
Givena use case whose file has a `### Use case diagram` section with one Mermaid fence
Whenthe site is built
Thenthe page of the use case shows the diagram as an inline SVG in the site's colours under the user need, before the map, and the page needs no JavaScript to show it
boundaryNo diagram
Givena use case with no `### Use case diagram` section, or a section with no Mermaid fence
Whenthe site is built
Thenits page is exactly the page built without this behaviour
refusalA fence Mermaid cannot draw
Givena use case whose Mermaid fence Mermaid cannot draw
Whenthe site is built
Thenthe build stops with an error that names the use case id, its file and Mermaid's message, and writes no diagram of it