test_flows_export_as_mermaid_and_plantuml

Tests › tests/test_wiki_exports.py

passed Passed in the packaged run.

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

  1. html = _html(site)
  2. mmd = (html / "exports/flows/flow-load.mmd").read_text()
2 more
  1. puml = (html / "exports/flows/flow-load.puml").read_text()
  2. page = site["flow-load.html"]
→

When

  1. —
→

Then

  1. ✓ mmd.startswith("sequenceDiagram") holds
  2. ✓ mmd contains "autonumber"
  3. ✓ mmd contains "->>"
  4. ✓ mmd contains ": parse"
  5. ✓ mmd contains "loop"
  6. ✓ mmd contains "\n end"
  7. ✓ mmd.index("loop") < mmd.index(": parse") < mmd.index("end") holds
  8. ✓ puml.startswith("@startuml") holds
  9. ✓ puml.rstrip().endswith("@enduml") holds
  10. ✓ puml contains "loop"
  11. ✓ page contains 'href="exports/flows/flow-load.mmd"'
  12. ✓ page contains 'href="exports/flows/flow-load.puml"'

tests/test_wiki_exports.py:29 · its file's page

What it checks (5)

  1. assert mmd.startswith("sequenceDiagram") and "autonumber" in mmd not attributed
  2. assert "->>" in mmd and ": parse" in mmd and "loop" in mmd and "\n end" in mmd not attributed
  3. assert mmd.index("loop") < mmd.index(": parse") < mmd.index("end") not attributed
  4. assert puml.startswith("@startuml") and puml.rstrip().endswith("@enduml") and "loop" in puml not attributed
  5. assert ( '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→_html

What 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)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-029catalogunknown