test_gherkin_renders_rules_examples_and_doc_strings

Tests › tests/test_wiki_symbols.py

passed Passed in the packaged run.

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

  1. 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" )
  2. html = render_scenario(text, 5)
→

When

  1. —
→

Then

  1. ✓ html contains '<span class="gk">Rule:</span> Totals'
  2. ✓ html contains '<span class="gk">Scenario Outline:</span> Add &lt;n&gt;'
  3. ✓ html contains "<table"
  4. ✓ html contains "<td>2</td>"
  5. ✓ html contains '<pre class="docstring">total &lt;n&gt;</pre>'
  6. ✓ html does not contain "Other"
  7. ✓ 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

callercallercallercallerclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyother filesother filesother filesother filesloop (line 296)looploop (line 302)looploop (line 149)loopopt (line 152)optloop (line 135)loopbuild_wiki315. feature_pages → anchor315anchor316. feature_pages → render_scenario316render_scenario317. render_scenario → _context317_context▶ test enters318–320. _context → _is_rule318_is_rule +2 more321. render_scenario → _scenario_end321_scenario_end322. feature_pages → verifies_block322verifies_block323. feature_pages → symbol_href323symbol_href

… 77 later steps

tests/test_wiki_symbols.py:211 · its file's page

What it checks (5)

  1. assert '<span class="gk">Rule:</span> Totals' in html observes render_scenario via html
  2. assert '<span class="gk">Scenario Outline:</span> Add &lt;n&gt;' in html observes render_scenario via html
  3. assert "<table" in html and "<td>2</td>" in html observes render_scenario via html
  4. assert '<pre class="docstring">total &lt;n&gt;</pre>' in html observes render_scenario via html
  5. assert "Other" not in html and '<span class="gtag">@area</span>' in html observes render_scenario via html

Where the product reaches it

  • build_wiki → _build_site → feature_pages → render_scenario (flow)

Call flow

test_gherkin_renders_rules_examples_and_doc_strings→render_scenario

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.

test_gherkin_renders_rules_examples_and_doc_strings · 5 checksrender_scenarioREQ-DDB-WIKI-026 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-025catalogunknown
REQ-DDB-WIKI-027catalogunknown
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.