Files
Pulse/scripts/tests/test_map_stale_help_docs.py
pulse-triage[bot] 95b08f2add Document Map stale-reading banners and false-green prevention in Help
Align docs/MAP.md and its in-app Help copy with PR #5693 (75c08c64e6):
- Explain that tiles whose monitoring source stopped reporting switch to
  not reporting rather than showing a green healthy dot, while keeping
  stronger critical and attention verdicts ahead of staleness.
- Document the filter-aware stale-reading warning banner above the map
  across By host and By role layouts, Hide names redaction, and automatic
  clearing on live recovery.
- Add scripts/tests/test_map_stale_help_docs.py to keep both copies
  identical and preserve the stale-reading guidance.

Contract-Neutral: Documentation and in-app Help text alignment with already merged PR #5693 plus a static docs parity test; no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-12-02 19:47:42 +00:00

27 lines
979 B
Python

import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
class MapStaleHelpDocsTest(unittest.TestCase):
def test_map_doc_and_public_copy_stay_identical(self) -> None:
doc = (ROOT / "docs/MAP.md").read_text(encoding="utf-8")
public_doc = (ROOT / "frontend-modern/public/docs/MAP.md").read_text(
encoding="utf-8"
)
self.assertEqual(doc, public_doc)
def test_map_doc_explains_stale_readings_and_false_green_prevention(self) -> None:
doc = (ROOT / "docs/MAP.md").read_text(encoding="utf-8")
self.assertIn("Some map readings are stale.", doc)
self.assertIn("Map readings are stale.", doc)
self.assertIn("never shows a\ngreen healthy dot", doc)
self.assertIn("last received report", doc)
self.assertIn("**Hide names**", doc)
self.assertIn("clears automatically once fresh telemetry arrives", doc)
if __name__ == "__main__":
unittest.main()