test_the_change_lens_exists_only_with_an_impact_report¶
Tests › tests/test_wiki_web.py
What this test is for
Why it exists
NO IMPACT REPORT, NO CHANGE LENS (ported from the box map, which the web replaced): with a report the lens exists and a changed function carries `changed`.
Given
- —
When
plain = build_graph(db, [], None, _DECLARED, exclude_tests=True)web_html(web_data(db, plain))web_data(db, plain)
4 more
impact = [{"req_id": "R-1", "functions": [{"name": "save", "file": "pkg/core/store.py"}]}]measured = build_graph(db, [], impact, _DECLARED, exclude_tests=True)data = web_data(db, measured)web_html(data)
Then
- ✓ web_html(web_data(db, plain)) does not contain "Change</option>"
- ✓ web_html(data) contains "Change</option>"
- ✓ {n["name"]: n.get("changed") for n in data["nodes"]}["save"] is True
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 · 21 of 400 steps
… 140 earlier steps
… 234 later steps
tests/test_wiki_web.py:130 · its file's page
What it checks (3)
assert "Change</option>" not in web_html(web_data(db, plain))observesweb_htmlassert "Change</option>" in web_html(data)observesweb_htmlassert {n["name"]: n.get("changed") for n in data["nodes"]}["save"] is Trueobservesweb_dataviadata
Where the product reaches it
build_wiki→_build_site→build_graph(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.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-WIKI-019 measured
- REQ-DDB-WIKI-021 measured
- REQ-DDB-WIKI-022 measured