(ui) Add consistent page headers to key views
Introduce a shared page-header pattern with kicker, title, subtitle, and actions, then apply it to the dashboard, host detail, run detail, snapshot detail, and retention plan pages. Scope the global app header styles to avoid leaking sticky navigation styles onto page-level headers, and add view assertions for the new page context. Refs #28
This commit is contained in:
@@ -101,6 +101,8 @@ class ViewTests(TestCase):
|
||||
response = self.client.get(reverse("dashboard"))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Control panel")
|
||||
self.assertContains(response, "Backup health, required action, storage pressure, and recent activity in one place.")
|
||||
self.assertContains(response, "Dashboard")
|
||||
self.assertContains(response, "web-01")
|
||||
self.assertContains(response, "20260519-021500Z__ABCDEFGH")
|
||||
@@ -869,6 +871,8 @@ class ViewTests(TestCase):
|
||||
response = self.client.get(reverse("host_detail", args=[host.host]))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Host")
|
||||
self.assertContains(response, "web-01.example.test")
|
||||
self.assertContains(response, "Effective Config")
|
||||
self.assertContains(response, "Backup source:")
|
||||
self.assertNotContains(response, "Source root:")
|
||||
@@ -1425,6 +1429,8 @@ class ViewTests(TestCase):
|
||||
response = self.client.get(reverse("run_detail", args=[run.id]))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Backup run")
|
||||
self.assertContains(response, "web-01")
|
||||
self.assertContains(response, "Failure")
|
||||
self.assertContains(response, "transport")
|
||||
self.assertContains(response, "Check network connectivity.")
|
||||
@@ -1615,6 +1621,7 @@ class ViewTests(TestCase):
|
||||
response = self.client.get(reverse("snapshot_detail", args=[base.id]))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Snapshot")
|
||||
self.assertContains(response, base.dirname)
|
||||
self.assertContains(response, "BASESNAP")
|
||||
self.assertContains(response, "Stats")
|
||||
@@ -1697,7 +1704,9 @@ class ViewTests(TestCase):
|
||||
response = self.client.get(reverse("host_retention_plan", args=[host.host]))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Retention Plan: web-01")
|
||||
self.assertContains(response, "Retention")
|
||||
self.assertContains(response, "Preview which snapshots stay")
|
||||
self.assertContains(response, "web-01")
|
||||
self.assertContains(response, old_snapshot.dirname)
|
||||
self.assertContains(response, new_snapshot.dirname)
|
||||
self.assertContains(response, "newest")
|
||||
|
||||
Reference in New Issue
Block a user