Story 5.3 (Suite gruen 182/182): - README.md: Pflichtabschnitte Datenschutz de+en (FR-6.5) + at-rest/Backup (FR-6.4) + LLM-Restrisiko (AD-16), Inventar-Loeschwarnung (FR-2.4), YAML-Mode-Schritt (AD-12), Blueprint-Import-Badges (FR-7.4), Custom-Repository-Install (S-3). - CHANGELOG.md, docs/beta/PROTOCOL.md, manifest.version=1.0.0. - tests/test_e2e_golden_path.py: End-to-End im echten HA-Core (phcc) — Install -> Beispiel-Set -> Sensor-Outfit -> Karten-Ressource -> Service; NFR-1 (keine Netzlast im Default) + C-2/NFR-2 (keine Blocking-Warnung) asserted. - Alle 23 Stories (5 Epics) implementiert, getestet, per-Story-reviewed, committet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39 lines
1.5 KiB
Python
39 lines
1.5 KiB
Python
"""Story 5.3 — README mandatory sections, changelog, version consistency."""
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import pathlib
|
|
|
|
ROOT = pathlib.Path(__file__).parent.parent
|
|
|
|
|
|
def test_readme_has_mandatory_sections() -> None:
|
|
text = (ROOT / "README.md").read_text(encoding="utf-8")
|
|
low = text.lower()
|
|
# privacy in both languages (FR-6.5) + at-rest/backup caveat (FR-6.4)
|
|
assert "## privacy" in low and "## datenschutz" in low
|
|
assert "backup" in low and ("unencrypted" in low or "unverschlüsselt" in low)
|
|
# LLM residual risk (AD-16)
|
|
assert "residual risk" in low or "restrisiko" in low
|
|
# inventory delete warning (FR-2.4)
|
|
assert "removing the integration deletes your wardrobe" in low
|
|
# YAML-mode manual step (AD-12)
|
|
assert "yaml-mode" in low and "/what_to_wear/what-to-wear-card.js" in text
|
|
# blueprint import badges (FR-7.4)
|
|
assert "blueprint_import" in text
|
|
# custom repository install path (S-3 interim)
|
|
assert "custom repositor" in low
|
|
|
|
|
|
def test_changelog_and_version_consistent() -> None:
|
|
changelog = (ROOT / "CHANGELOG.md").read_text(encoding="utf-8")
|
|
assert "1.0.0" in changelog
|
|
manifest = json.loads(
|
|
(ROOT / "custom_components" / "what_to_wear" / "manifest.json").read_text(encoding="utf-8")
|
|
)
|
|
assert manifest["version"] == "1.0.0"
|
|
|
|
|
|
def test_beta_protocol_present() -> None:
|
|
protocol = (ROOT / "docs" / "beta" / "PROTOCOL.md").read_text(encoding="utf-8")
|
|
assert "15" in protocol and "S-2" in protocol # the <15min timing metric
|