diff options
| author | antoliny0919 <antoliny0919@gmail.com> | 2025-05-22 15:56:51 +0900 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-14 08:10:43 -0400 |
| commit | bc03f1064e10fa247a46d4e8a98ba9b26aa4790d (patch) | |
| tree | fe2ba060988bc4d7e124e0dce536009fbea0e21f /tests | |
| parent | 407ab793573ce82c93cfdc86e5a0a7fa804f60f5 (diff) | |
Fixed #34041 -- Added aria-current attribute to admin breadcrumbs.
Co-authored by: farita1699 <uwanjerry25@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/admin_views/test_nav_sidebar.py | 1 | ||||
| -rw-r--r-- | tests/admin_views/tests.py | 2 | ||||
| -rw-r--r-- | tests/auth_tests/test_views.py | 8 |
3 files changed, 7 insertions, 4 deletions
diff --git a/tests/admin_views/test_nav_sidebar.py b/tests/admin_views/test_nav_sidebar.py index 1875a2f7a1..74fd648ab0 100644 --- a/tests/admin_views/test_nav_sidebar.py +++ b/tests/admin_views/test_nav_sidebar.py @@ -93,7 +93,6 @@ class AdminSidebarTests(TestCase): ) # Does not include aria-current attribute. self.assertContains(response, '<a href="%s">Users</a>' % url) - self.assertNotContains(response, "aria-current") @override_settings(DEBUG=True) def test_included_app_list_template_context_fully_set(self): diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index ad37416cbf..868b616d76 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -2579,7 +2579,7 @@ class AdminViewPermissionsTest(TestCase): # Add user may login and POST to add view, then redirect to admin root self.client.force_login(self.adduser) addpage = self.client.get(reverse("admin:admin_views_article_add")) - change_list_link = '› <a href="%s">Articles</a>' % reverse( + change_list_link = '<a href="%s">Articles</a>' % reverse( "admin:admin_views_article_changelist" ) self.assertNotContains( diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py index 23dc858ddd..a3863b6233 100644 --- a/tests/auth_tests/test_views.py +++ b/tests/auth_tests/test_views.py @@ -1548,7 +1548,9 @@ class ChangelistTests(MessagesTestMixin, AuthViewsTestCase): ) # Breadcrumb. self.assertContains( - response, f"{self.admin.username}</a>\n› Change password" + response, + f'{self.admin.username}</a></li>\n<li aria-current="page">' + "Change password</li>", ) # Usable password field. self.assertContains( @@ -1648,7 +1650,9 @@ class ChangelistTests(MessagesTestMixin, AuthViewsTestCase): self.assertContains(response, f"<h1>Set password: {test_user.username}</h1>") # Breadcrumb. self.assertContains( - response, f"{test_user.username}</a>\n› Set password" + response, + f'{test_user.username}</a></li>\n<li aria-current="page">' + "Set password</li>", ) # Submit buttons self.assertContains(response, '<input type="submit" name="set-password"') |
