Delay manual snapshot refresh

This commit is contained in:
2026-08-03 01:40:15 +02:00
parent 6b2bc3853a
commit 15ec93f82e
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -1,4 +1,5 @@
import unittest
from pathlib import Path
from frigate_camera_control_bridge.ui import camera_stream_url, render_page
@@ -114,6 +115,12 @@ class UiRenderTest(unittest.TestCase):
self.assertIn("<h2>Camera Friendly</h2>", html)
self.assertNotIn("<h2>camera_key</h2>", html)
def test_manual_snapshot_refresh_waits_before_fetch(self):
script = Path("frigate_camera_control_bridge/static/app.js").read_text(encoding="utf-8")
self.assertIn("SNAPSHOT_REFRESH_DELAY_MS = 2000", script)
self.assertIn("window.setTimeout", script)
if __name__ == "__main__":
unittest.main()