test_landing_validate.py
python
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1
docs: MuseHub-first before ISR #74 — staging solidify NEXT
Human
12 hours ago
| 1 | """Integration tests — landing validator on kit tree.""" |
| 2 | |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | import re |
| 6 | from pathlib import Path |
| 7 | |
| 8 | from tools.landing.validate import validate_landing |
| 9 | |
| 10 | KIT_ROOT = Path(__file__).resolve().parents[2] |
| 11 | |
| 12 | |
| 13 | def test_validate_landing_on_kit_root_passes() -> None: |
| 14 | result = validate_landing(KIT_ROOT) |
| 15 | assert result.ok, result.errors |
| 16 | |
| 17 | |
| 18 | def test_relative_doc_links_exist() -> None: |
| 19 | index = (KIT_ROOT / "docs" / "landing" / "index.html").read_text(encoding="utf-8") |
| 20 | # Docs open as GitHub-rendered pages — not raw relative .md (file:// / Pages). |
| 21 | assert "https://github.com/aaronrene/overseer-kit/blob/main/docs/GIT-ONLY-QUICKSTART.md" in index |
| 22 | assert "https://github.com/aaronrene/overseer-kit/blob/main/docs/CONSUMER-ADAPTER-PATTERN.md" in index |
| 23 | assert "https://github.com/aaronrene/overseer-kit/blob/main/docs/TRACK-Q-DESKTOP-OPERATOR-RUNBOOK.md" in index |
| 24 | assert "K7-DOGFOOD-OPERATOR-RUNBOOK" not in index |
| 25 | assert (KIT_ROOT / "docs" / "GIT-ONLY-QUICKSTART.md").is_file() |
| 26 | assert (KIT_ROOT / "docs" / "CONSUMER-ADAPTER-PATTERN.md").is_file() |
| 27 | assert (KIT_ROOT / "docs" / "TRACK-Q-DESKTOP-OPERATOR-RUNBOOK.md").is_file() |
| 28 | |
| 29 | |
| 30 | def test_scenarios_share_main_nav_shape() -> None: |
| 31 | scenarios = (KIT_ROOT / "docs" / "landing" / "scenarios" / "index.html").read_text( |
| 32 | encoding="utf-8" |
| 33 | ) |
| 34 | assert 'href="../index.html"' in scenarios |
| 35 | assert 'href="../index.html#structure"' in scenarios |
| 36 | assert 'href="../index.html#console-access"' in scenarios |
| 37 | assert 'href="index.html"' in scenarios or 'href="./index.html"' in scenarios |
| 38 | assert 'aria-current="page"' in scenarios |
| 39 | assert "../index.html#scenarios" not in scenarios |
| 40 | assert 'href="../docs.html">Docs</a>' in scenarios |
| 41 | assert "https://github.com/aaronrene/overseer-kit#readme" not in scenarios |
| 42 | assert 'id="theme-toggle"' in scenarios |
| 43 | assert ">Landing<" not in scenarios # no alternate "Landing" chrome swap |
| 44 | assert scenarios.count("flow-diagram") == 5 |
| 45 | assert "flow-linear" in scenarios |
| 46 | assert "flow-converge" in scenarios |
| 47 | assert "flow-loop" in scenarios |
| 48 | assert "flow-dual" in scenarios |
| 49 | assert "flow-handoff" in scenarios |
| 50 | assert "fail = no advance" not in scenarios |
| 51 | assert "Software engineering" in scenarios |
| 52 | assert scenarios.index("Software engineering") < scenarios.index("Video studio") |
| 53 | assert "gallery-intro" in scenarios |
| 54 | |
| 55 | |
| 56 | def test_main_nav_scenarios_goes_to_gallery() -> None: |
| 57 | index = (KIT_ROOT / "docs" / "landing" / "index.html").read_text(encoding="utf-8") |
| 58 | assert 'href="scenarios/index.html">Scenarios</a>' in index |
| 59 | # Nav must not use the mid-page teaser anchor as the Scenarios destination. |
| 60 | assert re.search(r'nav-links[\s\S]*?href="#scenarios">Scenarios', index) is None |
| 61 | assert 'src="assets/diagrams/honesty-loop.svg"' in index |
| 62 | assert (KIT_ROOT / "docs" / "landing" / "assets" / "diagrams" / "honesty-loop.svg").is_file() |
| 63 | assert 'src="assets/diagrams/mechanical-check.svg"' in index |
| 64 | assert ( |
| 65 | KIT_ROOT / "docs" / "landing" / "assets" / "diagrams" / "mechanical-check.svg" |
| 66 | ).is_file() |
| 67 | assert "ok check-ok" in index |
| 68 | assert "hero-terminal" in index |
File History
2 commits
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1
docs: MuseHub-first before ISR #74 — staging solidify NEXT
Human
12 hours ago
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439
feat: K1-P1 complete — agent provenance, build-verification…
Sonnet 4.6
patch
52 days ago