[Django] #37169: Screenshot test is failing because the language has been translated.

0 views
Skip to first unread message

Django

unread,
Jun 13, 2026, 11:15:09 PM (6 hours ago) Jun 13
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
--------------------------+-----------------------------------------
Reporter: Antoliny | Type: Bug
Status: new | Component: contrib.admin
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------+-----------------------------------------
It seems that a translation was added for the "Run" button in the admin
select. The test was looking for the previous "Run" text and clicking it,
but due to the translated text, it can only find the element in RTL mode,
causing the failure.

[[Image(rtl-select.png)]]

{{{#!diff
--git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index b6c4e88a43..7f6283a1e5 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -7489,7 +7489,7 @@ class SeleniumTests(AdminSeleniumTestCase):
Select(self.selenium.find_element(By.NAME,
"action")).select_by_value(
f"message_{level}"
)
- self.selenium.find_element(By.XPATH,
'//button[text()="Run"]').click()
+ self.selenium.find_element(By.CSS_SELECTOR,
'button[name="index"]').click()
message = self.selenium.find_element(
By.CSS_SELECTOR, "ul.messagelist li"
)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37169>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 13, 2026, 11:15:16 PM (6 hours ago) Jun 13
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------+--------------------------------------
Reporter: Antoliny | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Antoliny):

* Attachment "rtl-select.png" added.

Django

unread,
Jun 13, 2026, 11:15:28 PM (6 hours ago) Jun 13
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: assigned
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Antoliny):

* owner: (none) => Antoliny
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37169#comment:1>

Django

unread,
Jun 13, 2026, 11:19:12 PM (6 hours ago) Jun 13
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: assigned
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Antoliny):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/21479 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/37169#comment:2>
Reply all
Reply to author
Forward
0 new messages