test_a_modal_trigger_carries_its_content_inert_and_escaped

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

What this test is for

Why it exists

REPOSITORY TEXT NEVER BECOMES MARKUP: a trigger names a `<template>` whose content was escaped by Python; the script clones it, it does not parse strings.

Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-021 REQ-DDB-WIKI-022 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052

Given

  1. —
→

When

  1. html = modal("req-R-1", "R-1", "R-1 <b>", "<p>body</p>")
  2. modal("bad key", "x", "x", "")
→

Then

  1. ✓ html contains 'data-modal="req-R-1"'
  2. ✓ html contains '<template id="modal-req-R-1"'
  3. ✓ html contains 'data-title="R-1 &lt;b&gt;"'
  4. ✓ html contains "<p>body</p>"
  5. ✓ raises ValueError

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 · 1 of 400 steps

… 361 earlier steps

callercallercallercallerclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyother filesother filesother filesother filesloop (line 193)looploop (line 195)loopbuild_wiki362. write_quick_views → anchor362anchor363. write_quick_views → modal363modal364. modal → modal_template364modal_template▶ test enters365–366. write_quick_views → quick_view365quick_view +1 more

… 34 later steps

tests/test_wiki_site.py:557 · its file's page

What it checks (2)

  1. assert 'data-modal="req-R-1"' in html and '<template id="modal-req-R-1"' in html observes modal via html
  2. assert 'data-title="R-1 &lt;b&gt;"' in html and "<p>body</p>" in html observes modal via html

Where the product reaches it

  • build_wiki → _build_site → write_quick_views → modal (flow)

Call flow

test_a_modal_trigger_carries_its_content_inert_and_escaped→modal

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_a_modal_trigger_carries_its_content_inert_and_escaped · 2 checksmodalREQ-DDB-WIKI-020 · measured

Requirements it verifies (14)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-011catalogunknown
REQ-DDB-WIKI-012catalogunknown
REQ-DDB-WIKI-013catalogunknown
REQ-DDB-WIKI-014catalogunknown
REQ-DDB-WIKI-015catalogunknown
REQ-DDB-WIKI-018catalogunknown
REQ-DDB-WIKI-021catalogunknown
REQ-DDB-WIKI-022catalogunknown
REQ-DDB-WIKI-023catalogunknown
REQ-DDB-WIKI-025catalogunknown
REQ-DDB-WIKI-031catalogunknown
REQ-DDB-WIKI-044catalogunknown
REQ-DDB-WIKI-050catalogunknown
REQ-DDB-WIKI-052catalogunknown
Also reaches 1 requirement

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