test_the_top_bar_holds_sections_and_search¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
THE TOP BAR NAMES SECTIONS, not every page: flows sit under one Flows page and prose under Docs. Search is a field in the top bar; the sidebar carries the page's contents only.
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
index = site["index.html"]nav = index[index.index('<nav class="nav"') : index.index("</nav>")]
2 more
for section in ("Docs", "Flows", "Requirements"): assert f">{section}<" in nav, sectionfor name, text in site.items(): if name.endswith(".html") and name not in ("search.html", "genindex.html"): assert '<form class="search"' in text and 'id="searchbox"' not in text, name
When
- —
Then
- ✓ nav does not contain "load"
- ✓ nav does not contain "Demo"
- ✓ site["flows.html"] contains "flow-load"
- ✓ site["docs.html"] contains "prose/README"
tests/test_wiki_site.py:353 · its file's page
What it checks (4)
assert f">{section}<" in nav, sectionnot attributedassert "load" not in nav and "Demo" not in navnot attributedassert '<form class="search"' in text and 'id="searchbox"' not in text, namenot attributedassert "flow-load" in site["flows.html"] and "prose/README" in site["docs.html"]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 |