summaryrefslogtreecommitdiff
path: root/tests/admin_views/test_password_form.py
diff options
context:
space:
mode:
authorusman <muhammad.usman11914@gmail.com>2026-02-20 01:19:53 +0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-20 15:31:03 -0500
commit5b2c4a049e9bbe9a6caaab993a2eedd5702ea36c (patch)
tree27a66d029afe98a6ce4852d2f827aa3c9c2eb301 /tests/admin_views/test_password_form.py
parentf9b820f8ac50aad025949087e660a551691832e4 (diff)
[6.0.x] Fixed #36920 -- Fixed alignment of fieldset legends in wide admin forms.
Visual regression in 4187da258fe212d494cb578a0bc2b52c4979ab95. Backport of 8d251b512bafd7b7f736cfcabeba0ae76106f2db from main.
Diffstat (limited to 'tests/admin_views/test_password_form.py')
-rw-r--r--tests/admin_views/test_password_form.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/admin_views/test_password_form.py b/tests/admin_views/test_password_form.py
index d448943b04..15f6037d07 100644
--- a/tests/admin_views/test_password_form.py
+++ b/tests/admin_views/test_password_form.py
@@ -1,6 +1,7 @@
from django.contrib.admin.tests import AdminSeleniumTestCase
from django.contrib.auth.models import User
from django.test import override_settings
+from django.test.selenium import screenshot_cases
from django.urls import reverse
@@ -142,3 +143,12 @@ class SeleniumAuthTests(AdminSeleniumTestCase):
# Only the set password submit button is visible.
self.assertIs(submit_set.is_displayed(), True)
self.assertIs(submit_unset.is_displayed(), False)
+
+ @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
+ def test_fieldset_legend_wide_alignment(self):
+ user_add_url = reverse("auth_test_admin:auth_user_add")
+ self.admin_login(username="super", password="secret")
+ self.selenium.get(self.live_server_url + user_add_url)
+
+ # The fieldset legend is aligned with other fields.
+ self.take_screenshot("fieldset_legend_wide")