Files
periscope/tests/test_periscope_frontend_site_rewrite.py
michele 5b2d3cd613 iPad top-bar shell, light theme default, Markdown report export (2.85.0).
Replace the left sidebar with a thin top toolbar and tab/sheet navigation.
Light is default; dark mode lives in Settings and persists. Report export
is Save as Markdown (.md) with the findings-tree hierarchy — not Excel.
2026-09-23 07:03:16 +02:00

52 lines
1.5 KiB
Python

"""Native frontend site/version/export modules live under periscope/src."""
from __future__ import annotations
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SRC = ROOT / "periscope" / "src" / "frontend"
def test_site_version_export_are_src():
for rel in (
"src/lib/site.ts",
"src/lib/version.ts",
"src/lib/report-export.ts",
"scripts/sync-version.mjs",
):
path = SRC / rel
assert path.is_file(), rel
assert "Native Periscope overlay" not in path.read_text(encoding="utf-8")[:400]
def test_site_exports():
text = (SRC / "src/lib/site.ts").read_text(encoding="utf-8")
for name in (
"SITE_URL",
"SITE_NAME",
"SITE_DESCRIPTION",
"SITE_TAGLINE",
"OPERATOR_NAME",
"CONTACT_EMAIL",
"TWITTER_HANDLE",
"pageMetadata",
):
assert name in text
def test_report_export_entry():
text = (SRC / "src/lib/report-export.ts").read_text(encoding="utf-8")
assert "export function exportReportToMarkdown" in text
assert "export function buildReportMarkdown" in text
assert "Save as Markdown" not in text # UI copy lives on the report page
assert ".md" in text
assert "xlsx" not in text.lower()
assert "spreadsheet" in text.lower() or "Markdown" in text
def test_version_constants():
text = (SRC / "src/lib/version.ts").read_text(encoding="utf-8")
assert "export const APP_VERSION" in text
assert "export const APP_VERSION_DATE" in text