test_each_requirement_group_has_its_own_page¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
OWNER (round 5, P5.4): requirement groups get pages, and the group cards link to them. A group page is a URL a reader can share: its tier bar, its counts, and ONLY its own requirements, each linking to the requirement's page.
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
w, x = site["reqgroup-REQ-W.html"], site["reqgroup-REQ-X.html"]
When
- —
Then
- ✓ w contains "REQ-W-001"
- ✓ w contains "REQ-W-002"
- ✓ w does not contain "REQ-X-001"
- ✓ x contains "REQ-X-001"
- ✓ x does not contain "REQ-W-001"
- ✓ w contains 'href="req-REQ-W-001.html"'
- ✓ w contains 'class="seg c-PASS"'
- ✓ w contains "2 requirements"
- ✓ w contains 'href="requirements.html"'
tests/test_wiki_site.py:702 · its file's page
What it checks (5)
assert "REQ-W-001" in w and "REQ-W-002" in w and "REQ-X-001" not in wnot attributedassert "REQ-X-001" in x and "REQ-W-001" not in xnot attributedassert 'href="req-REQ-W-001.html"' in wnot attributedassert 'class="seg c-PASS"' in w and "2 requirements" in wnot attributedassert 'href="requirements.html"' in w, "a group page leads back to the index"not attributed
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 (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 |