diff options
| author | Nina Menezes <77671865+nmenezes0@users.noreply.github.com> | 2023-06-02 11:32:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-02 12:32:18 +0200 |
| commit | 27fed08e5ff597c813de25b6e89dc300a1f4231b (patch) | |
| tree | e434cfb119ef92ea3d965992413337da0a39f832 /tests/admin_views/tests.py | |
| parent | 2cf76f2d5d1aa16acfadaf53db3d30128a34b088 (diff) | |
Fixed #34618 -- Added icon descriptions in "Recent Actions" on the admin index.
Diffstat (limited to 'tests/admin_views/tests.py')
| -rw-r--r-- | tests/admin_views/tests.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 4db06ca84a..bbc6f731f7 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -3704,6 +3704,22 @@ class AdminViewStringPrimaryKeyTest(TestCase): 2, change_message="Changed something", ) + LogEntry.objects.log_action( + user_pk, + content_type_pk, + cls.pk, + cls.pk, + 1, + change_message="Added something", + ) + LogEntry.objects.log_action( + user_pk, + content_type_pk, + cls.pk, + cls.pk, + 3, + change_message="Deleted something", + ) def setUp(self): self.client.force_login(self.superuser) @@ -3762,6 +3778,14 @@ class AdminViewStringPrimaryKeyTest(TestCase): should_contain = """<a href="%s">%s</a>""" % (escape(link), escape(self.pk)) self.assertContains(response, should_contain) + def test_recentactions_description(self): + response = self.client.get(reverse("admin:index")) + for operation in ["Added", "Changed", "Deleted"]: + with self.subTest(operation): + self.assertContains( + response, f'<span class="visually-hidden">{operation}:' + ) + def test_deleteconfirmation_link(self): """ " The link from the delete confirmation page referring back to the |
