fix anon
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user