Files
esp32-web/tests/test_dashboard/test_views.py
user dfbd2a2196 feat: v0.1.4 — device intelligence dashboard
Add tabbed dashboard at /dashboard/ with three D3.js visualizations:
- Vendor treemap (devices grouped by type and vendor)
- SSID social graph (force-directed, shared probed SSIDs as edges)
- Fingerprint clusters (packed circles by device behavior)

Intelligence API endpoints at /api/v1/intelligence/ with param
validation. Dashboard built on htmx + Pico CSS dark theme + D3 v7,
all vendored locally (make vendor). 13 new tests (59 total).
2026-02-06 18:59:53 +01:00

30 lines
959 B
Python

"""Dashboard view tests."""
def test_dashboard_index(client):
"""Test main dashboard page loads."""
response = client.get('/dashboard/')
assert response.status_code == 200
assert b'Device Intelligence' in response.data
def test_dashboard_tab_vendor_treemap(client):
"""Test vendor treemap partial loads."""
response = client.get('/dashboard/tab/vendor-treemap')
assert response.status_code == 200
assert b'vendor-treemap' in response.data
def test_dashboard_tab_ssid_graph(client):
"""Test SSID graph partial loads."""
response = client.get('/dashboard/tab/ssid-graph')
assert response.status_code == 200
assert b'ssid-graph' in response.data
def test_dashboard_tab_fingerprint_clusters(client):
"""Test fingerprint clusters partial loads."""
response = client.get('/dashboard/tab/fingerprint-clusters')
assert response.status_code == 200
assert b'fingerprint-clusters' in response.data