diff --git a/wagtail/admin/templates/wagtailadmin/generic/form.html b/wagtail/admin/templates/wagtailadmin/generic/form.html index e32e178887..7885925d81 100644 --- a/wagtail/admin/templates/wagtailadmin/generic/form.html +++ b/wagtail/admin/templates/wagtailadmin/generic/form.html @@ -4,9 +4,9 @@ {% block main_header %} {% if breadcrumbs_items %} -
-

- {% icon classname="w-header__glyph" name=header_icon %} +
+

+ {% icon classname="w-absolute w-top-1 -w-left-11 w-max-w-[1em] w-max-h-[1em]" name=header_icon %} {{ page_subtitle }}

diff --git a/wagtail/snippets/tests/test_snippets.py b/wagtail/snippets/tests/test_snippets.py index 5c76aede47..80006517b2 100644 --- a/wagtail/snippets/tests/test_snippets.py +++ b/wagtail/snippets/tests/test_snippets.py @@ -2407,19 +2407,13 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): ) self.assertContains(response, "Unpublish") - # Should use the latest draft content for the title - self.assertContains( - response, - """ -

- - Draft-enabled Bar, In Draft -

- """, - html=True, - ) + soup = self.get_soup(response.content) + h2 = soup.select_one("#header-title") + self.assertIsNotNone(h2) + icon = h2.select_one("svg use") + self.assertIsNotNone(icon) + self.assertEqual(icon["href"], "#icon-snippet") + self.assertEqual(h2.text.strip(), "Draft-enabled Bar, In Draft") # Should use the latest draft content for the form self.assertTagInHTML(