test_a_step_opens_a_dialog_with_the_data_it_carries¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
W18: per-step data (call text, callee signature, call-site link) and controls.
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-020 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
page = _flow_page(site)blob = re.search(r'<script type="application/json"[^>]*>(.*?)</script>', page, re.S)
2 more
steps = json.loads( blob.group(1).replace("<", "<").replace(">", ">").replace("&", "&") )parse = next(s for s in steps if s["callee"] == "parse")
When
- —
Then
- ✓ page contains "<dialog"
- ✓ page contains 'data-flow-control="play"'
- ✓ page contains 'data-flow-control="pause"'
- ✓ page contains 'data-flow-control="step"'
- ✓ parse["call"] contains 'parse(item, "SECRET_CALL_ARG")'
- ✓ parse["signature"] contains "raw, tag"
- ✓ parse["site"].startswith("src/data.py:") holds
- ✓ parse["link"] contains "example.invalid"
tests/test_wiki_site.py:401 · its file's page
What it checks (5)
assert "<dialog" in page and 'data-flow-control="play"' in pageobserves_flow_pageviapageassert 'data-flow-control="pause"' in page and 'data-flow-control="step"' in pageobserves_flow_pageviapageassert 'parse(item, "SECRET_CALL_ARG")' in parse["call"]not attributedassert "raw, tag" in parse["signature"]not attributedassert parse["site"].startswith("src/data.py:") and "example.invalid" in parse["link"]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_a_step_opens_a_dialog_with_the_data_it_carries→_flow_pageWhat 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 (15)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | unknown |
| REQ-DDB-WIKI-012 | catalog | unknown |
| REQ-DDB-WIKI-013 | catalog | unknown |
| REQ-DDB-WIKI-014 | catalog | unknown |
| REQ-DDB-WIKI-015 | catalog | unknown |
| REQ-DDB-WIKI-018 | catalog | unknown |
| REQ-DDB-WIKI-020 | catalog | unknown |
| REQ-DDB-WIKI-021 | catalog | unknown |
| REQ-DDB-WIKI-022 | catalog | unknown |
| REQ-DDB-WIKI-023 | catalog | unknown |
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-031 | catalog | unknown |
| REQ-DDB-WIKI-044 | catalog | unknown |
| REQ-DDB-WIKI-050 | catalog | unknown |
| REQ-DDB-WIKI-052 | catalog | unknown |