Add changelog viewer to runtime info
This commit is contained in:
+11
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user