test_gherkin_renders_rules_examples_and_doc_strings¶
Tests › tests/test_wiki_symbols.py
What this test is for
Why it exists
P2a: a Rule heading, an Examples table and a doc string, as Gherkin.
Verifies REQ-DDB-WIKI-025 REQ-DDB-WIKI-027
Given
text = ( "@area\nFeature: Cart\n Rule: Totals\n @REQ-C-1\n Scenario Outline: Add <n>\n" ' Given a cart\n When I add <n> items\n Then the body is\n """\n' ' total <n>\n """\n Examples:\n | n |\n | 2 |\n' " Scenario: Other\n Given nothing\n" )html = render_scenario(text, 5)
When
- —
Then
- ✓ html contains '<span class="gk">Rule:</span> Totals'
- ✓ html contains '<span class="gk">Scenario Outline:</span> Add <n>'
- ✓ html contains "<table"
- ✓ html contains "<td>2</td>"
- ✓ html contains '<pre class="docstring">total <n></pre>'
- ✓ html does not contain "Other"
- ✓ html contains '<span class="gtag">@area</span>'
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Build this wiki from the index · 5 of 400 steps
… 314 earlier steps
… 77 later steps
tests/test_wiki_symbols.py:211 · its file's page
What it checks (5)
assert '<span class="gk">Rule:</span> Totals' in htmlobservesrender_scenarioviahtmlassert '<span class="gk">Scenario Outline:</span> Add <n>' in htmlobservesrender_scenarioviahtmlassert "<table" in html and "<td>2</td>" in htmlobservesrender_scenarioviahtmlassert '<pre class="docstring">total <n></pre>' in htmlobservesrender_scenarioviahtmlassert "Other" not in html and '<span class="gtag">@area</span>' in htmlobservesrender_scenarioviahtml
Where the product reaches it
build_wiki→_build_site→feature_pages→render_scenario(flow)
Call flow
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 (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-027 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-026 measured