Add changelog viewer to runtime info

This commit is contained in:
Dymas
2026-05-26 20:06:03 +02:00
parent c757a58f69
commit 541cbe83bb
8 changed files with 111 additions and 4 deletions
+11
View File
@@ -2685,6 +2685,13 @@ class HandlerRouteTests(unittest.TestCase):
self.assertEqual(handler.json_payload["version"], APP.VERSION)
self.assertIn("ani_cli_version", handler.json_payload)
def test_changelog_route_returns_project_changelog_content(self):
handler = DummyHandler("/api/changelog")
APP.Handler.do_GET(handler)
self.assertEqual(handler.json_status, HTTPStatus.OK)
self.assertIn("content", handler.json_payload)
self.assertIn("# Changelog", handler.json_payload["content"])
def test_loaded_runtime_version_matches_version_file(self):
expected_version = (ROOT / "VERSION").read_text(encoding="utf-8").strip()
self.assertEqual(APP.VERSION, expected_version)
@@ -3191,6 +3198,10 @@ class TemplateHelperTests(unittest.TestCase):
self.assertIn("justify-items: stretch;", APP.CONFIG_HTML)
self.assertIn('id="aniCliVersionLine"', APP.CONFIG_HTML)
self.assertIn('ani-cli ${data.ani_cli_version || "Unavailable"}', APP.CONFIG_HTML)
self.assertIn('id="openChangelogBtn"', APP.CONFIG_HTML)
self.assertIn('id="changelogOverlay"', APP.CONFIG_HTML)
self.assertIn('const data = await api("/api/changelog");', APP.CONFIG_HTML)
self.assertIn('changelogContent.textContent = data.content || "Changelog unavailable.";', APP.CONFIG_HTML)
def test_config_page_includes_host_path_browser_controls(self):
self.assertIn('class="ghost browse-path-btn"', APP.CONFIG_HTML)