test_flows_export_as_mermaid_and_plantuml¶
Tests › tests/test_wiki_exports.py
What this test is for
Why it exists
Mermaid and PlantUML sequence diagrams with the loop frame, linked from the page.
Verifies REQ-DDB-WIKI-029
Given
html = _html(site)mmd = (html / "exports/flows/flow-load.mmd").read_text()
2 more
puml = (html / "exports/flows/flow-load.puml").read_text()page = site["flow-load.html"]
When
- —
Then
- ✓ mmd.startswith("sequenceDiagram") holds
- ✓ mmd contains "autonumber"
- ✓ mmd contains "->>"
- ✓ mmd contains ": parse"
- ✓ mmd contains "loop"
- ✓ mmd contains "\n end"
- ✓ mmd.index("loop") < mmd.index(": parse") < mmd.index("end") holds
- ✓ puml.startswith("@startuml") holds
- ✓ puml.rstrip().endswith("@enduml") holds
- ✓ puml contains "loop"
- ✓ page contains 'href="exports/flows/flow-load.mmd"'
- ✓ page contains 'href="exports/flows/flow-load.puml"'
tests/test_wiki_exports.py:29 · its file's page
What it checks (5)
assert mmd.startswith("sequenceDiagram") and "autonumber" in mmdnot attributedassert "->>" in mmd and ": parse" in mmd and "loop" in mmd and "\n end" in mmdnot attributedassert mmd.index("loop") < mmd.index(": parse") < mmd.index("end")not attributedassert puml.startswith("@startuml") and puml.rstrip().endswith("@enduml") and "loop" in pumlnot attributedassert ( 'href="exports/flows/flow-load.mmd"' in page and 'href="exports/flows/flow-load.puml"' in page )not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_flows_export_as_mermaid_and_plantuml→_htmlWhat it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-029 | catalog | unknown |