TorbatYar/backend/services/experience/app/tests/test_docs.py
Mortezakoohjani 203671a7bf feat(experience): ship Experience Platform phases 11.0-11.10
Add the experience service with sites through analytics/AI hooks, migrations through 0011, and phase docs/manifests marking the track complete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 11:43:10 +03:30

57 lines
1.6 KiB
Python

"""Documentation validation for Experience Phase 11.10."""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[5]
def _read(rel: str) -> str:
return (ROOT / rel).read_text(encoding="utf-8")
def test_phase_docs_exist_and_mention_db():
text = _read("docs/experience-phase-11-10.md")
assert "experience_db" in text
assert "11.10" in text
assert "Torbat Pages" in text
assert "analytics" in text.lower()
assert "ai content" in text.lower() or "ai_content" in text.lower()
def test_handover_exists():
text = _read("docs/phase-handover/phase-11-10.md")
assert "experience" in text.lower()
assert "experience_db" in text
assert "11.10" in text
def test_audit_report_exists():
text = _read("docs/experience-phase-11-10-audit.md")
assert "11.10" in text
assert "Pass" in text
def test_module_registry_updated():
text = _read("docs/module-registry.md")
assert "experience" in text.lower()
assert "experience_db" in text
assert "0.11.10.0" in text or "11.10" in text
def test_service_readme():
text = _read("backend/services/experience/README.md")
assert "experience_db" in text
assert "8008" in text
assert "analytics" in text.lower()
def test_adr_016_exists():
text = _read("docs/architecture/adr/ADR-016.md")
assert "Experience" in text
assert "experience_db" in text
def test_previous_phase_docs_still_present():
text = _read("docs/experience-phase-11-9.md")
assert "11.9" in text
assert "widget" in text.lower()