This commit is contained in:
larssand
2026-09-23 13:32:09 +02:00
parent bf1109be81
commit a3f545f1b0
6 changed files with 159 additions and 5 deletions

View File

@@ -94,6 +94,21 @@ class DashboardTests(unittest.TestCase):
self.assertIn("openDetailIds", HTML)
self.assertIn("addEventListener('toggle'", HTML)
def test_dashboard_has_anomaly_bulk_bar(self):
self.assertIn('id="anomalyBulkBar"', HTML)
self.assertIn('anomaly-select', HTML)
self.assertIn('id="selectAllAnomalies"', HTML)
self.assertIn('id="anomalyBulkSubmit"', HTML)
def test_dashboard_anomaly_bulk_requires_expiry_and_only_ever_posts_entity_scope(self):
self.assertIn('at least 1 day', HTML)
start = HTML.index("getElementById('anomalyBulkSubmit')")
end = HTML.index('};', start)
submit_handler = HTML[start:end]
self.assertIn("scope: 'entity'", submit_handler)
self.assertIn('days <= 0', submit_handler)
self.assertIn('confirm(', submit_handler)
def test_dashboard_field_deviations_are_collapsible_and_open_by_default(self):
start = HTML.index("Field Baseline Deviations")
preceding = HTML[max(0, start - 80):start]