osint-dashboard/tests/test_camera_popup_contract.py
Sirius DevOps 700f56ef51 fix: hydrate camera popup from GET /api/cameras/{id}
List payload is slim (no URLs). YouTube thumbs need source_url from the
detail endpoint, so the popup fetches the full row before rendering.
2026-08-28 20:04:53 -04:00

15 lines
469 B
Python

"""Camera list is slim (no URLs). Popup must fetch GET /api/cameras/{id}."""
from pathlib import Path
HTML = Path(__file__).resolve().parents[1] / "app/static/index.html"
def test_popupopen_fetches_camera_detail_row():
html = HTML.read_text()
start = html.index("map.on('popupopen'")
end = html.index("map.on('popupclose'")
block = html[start:end]
assert "fetch(" in block
assert "/api/cameras/" in block
assert "camPopupHtml(" in block