Files
periscope/tests/test_periscope_frontend_content_overlay.py
T
michele 3a666ea8ae Stamp 2.57.0 native package.json, requirements, and unused Docker copies.
Frontend periscope-web manifests, pip requirements, and EDA logos/examples
overlay from src. Docker installs from those files. Unused PinScope public
blobs are dockerignored. Landing png/gif stay in dependency until native
captures exist.
2026-09-20 21:00:21 +02:00

44 lines
1.7 KiB
Python

"""Live-served markdown overlays from periscope/src/frontend/content."""
from __future__ import annotations
from pathlib import Path
from backend.repo_paths import changelog_paths
ROOT = Path(__file__).resolve().parents[1]
SRC = ROOT / "periscope" / "src" / "frontend" / "content"
def test_content_markdown_is_src():
for name in ("changelog.md", "privacy.md", "terms.md", "file-guide.md"):
path = SRC / name
assert path.is_file(), name
text = path.read_text(encoding="utf-8")
assert "Native Periscope overlay" not in text[:400]
assert "Periscope" in text
def test_legal_pages_are_operator_not_faradworks_controller():
privacy = (SRC / "privacy.md").read_text(encoding="utf-8")
terms = (SRC / "terms.md").read_text(encoding="utf-8")
assert "Michele Bigi" in privacy
assert "Michele Bigi" in terms
assert "Faradworks, Inc. does **not** operate this instance" in privacy
assert "This Service is **not** operated by Faradworks, Inc." in terms
def test_changelog_stamp_is_2_57_0_and_src_wins():
text = (SRC / "changelog.md").read_text(encoding="utf-8")
assert "## 2.57.0 — 2026-09-20" in text
first = changelog_paths()[0]
assert first.parts[-3:] == ("src", "frontend", "content") or first.name == "changelog.md"
assert first == SRC / "changelog.md"
def test_docker_copies_src_changelog_last():
docker = (ROOT / "periscope" / "src" / "backend" / "Dockerfile").read_text(encoding="utf-8")
assert "COPY periscope/src/frontend/content/changelog.md /app/changelog.md" in docker
fe = (ROOT / "periscope" / "src" / "frontend" / "dockerfile").read_text(encoding="utf-8")
assert "COPY --from=builder /app/content ./content" in fe