mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34834 -- Added role="search" to the admin changelist search form.
This commit is contained in:
committed by
Mariusz Felisiak
parent
e2a3a896cf
commit
969ecb8236
@@ -1585,6 +1585,16 @@ class ChangeListTests(TestCase):
|
||||
'aria-describedby="searchbar_helptext">',
|
||||
)
|
||||
|
||||
def test_search_role(self):
|
||||
m = BandAdmin(Band, custom_site)
|
||||
m.search_fields = ["name"]
|
||||
request = self._mocked_authenticated_request("/band/", self.superuser)
|
||||
response = m.changelist_view(request)
|
||||
self.assertContains(
|
||||
response,
|
||||
'<form id="changelist-search" method="get" role="search">',
|
||||
)
|
||||
|
||||
def test_search_bar_total_link_preserves_options(self):
|
||||
self.client.force_login(self.superuser)
|
||||
url = reverse("admin:auth_user_changelist")
|
||||
|
||||
Reference in New Issue
Block a user