"""Documentation snapshot tests for the team profile matching feature. These tests assert that the user-facing documentation files contain the keywords that pin the team-search surface (Profile_Type, find_matching_teams, team_search, top_competency_weight). They guard against accidental removal during future doc rewrites. Validates: Requirements 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9 """ from __future__ import annotations from pathlib import Path import pytest REPO_ROOT = Path(__file__).resolve().parent.parent DOC_FILES = ( "docs/architecture.md", "README.md", ".kiro/agents/teamlandkarte.md", ".github/agents/teamlandkarte_agent.md", ) REQUIRED_KEYWORDS = ( "Profile_Type", "find_matching_teams", "team_search", "top_competency_weight", ) @pytest.mark.parametrize("doc_path", DOC_FILES) @pytest.mark.parametrize("keyword", REQUIRED_KEYWORDS) def test_doc_contains_team_keyword(doc_path: str, keyword: str) -> None: """Each documentation file must mention the team-search keywords verbatim.""" full_path = REPO_ROOT / doc_path assert full_path.exists(), f"Documentation file missing: {doc_path}" content = full_path.read_text(encoding="utf-8") assert keyword in content, ( f"Keyword '{keyword}' missing from documentation file '{doc_path}'." )