test_each_requirement_group_has_its_own_page

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

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

  1. w, x = site["reqgroup-REQ-W.html"], site["reqgroup-REQ-X.html"]
→

When

  1. —
→

Then

  1. ✓ w contains "REQ-W-001"
  2. ✓ w contains "REQ-W-002"
  3. ✓ w does not contain "REQ-X-001"
  4. ✓ x contains "REQ-X-001"
  5. ✓ x does not contain "REQ-W-001"
  6. ✓ w contains 'href="req-REQ-W-001.html"'
  7. ✓ w contains 'class="seg c-PASS"'
  8. ✓ w contains "2 requirements"
  9. ✓ w contains 'href="requirements.html"'

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

What it checks (5)

  1. assert "REQ-W-001" in w and "REQ-W-002" in w and "REQ-X-001" not in w not attributed
  2. assert "REQ-X-001" in x and "REQ-W-001" not in x not attributed
  3. assert 'href="req-REQ-W-001.html"' in w not attributed
  4. assert 'class="seg c-PASS"' in w and "2 requirements" in w not attributed
  5. assert '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)

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-020catalogunknown
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