Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-CORE-081

The site requirements viewer draws the map of a use case from its Main paths

When a use case has a Main paths section, the viewer SHALL draw its page as a joined map in SVG at its natural size, with each state shared by several paths drawn once, one stroke per path on a shared step, a pill showing the full ID and the test count of each behaviour, a line above the map saying what a path, a situation and a step are, a legend naming each path, a phone list of the same states and behaviours, and a sentence comparing the ways through the map with the behaviours tested one by one, with no text or pill overlapping another, and when it has no Main paths the page SHALL say the paths are not written yet.

Step 3 of path 1 in StRS-MDOKFSTUDIO-CORE-008: from “The reviewer reads a use case” to “The reviewer reads a behaviour”.

Scenarios 4

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

nominalUse case with Main paths
Givena use case whose Main paths hold 3 states, one step behaviour per state and a refusal option
Whenthe use case page is written
Thenthe page holds the SVG map, the phone list of the same states and a sentence giving the number of ways through the map (4 on the fixture) against the behaviours and scenarios tested one by one, and the line above the map says the use case is reached by one path
nominalTwo paths share states
Givena use case with two paths that share their last two states and one step, and a behaviour with a full ID such as SwRS-MDOKFSTUDIO-GFM-102
Whenthe use case page is written
Theneach shared state is one circle drawn once (the class join) with both paths through it, the shared step is one group with one stroke per path in that path's colour and the step index of each path, the pill shows the full ID on its first line and the test count on its second, the line above the map says "2 paths" and "Where paths meet, they share the circle or the step", and the legend names "path 2" with its title
boundaryUse case without Main paths
Givena use case with no Main paths section
Whenthe use case page is written
Thenthe page says the paths are not written yet and lists its behaviours, without a map
boundaryA map wider than the page
Givena use case with three paths whose map is wider than an 800 px window
Whenthe page is shown at 1280 px and at 800 px
Thenthe SVG is never wider than its natural width and at least 85 % of it, the box of the map scrolls sideways at 800 px, and no text box (widened by 5 % on each side) overlaps another text or a pill, nor runs past the SVG

Implemented in 1

Tested by 4