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

12 views
Skip to first unread message

Django

unread,
Jun 13, 2026, 11:15:09 PMJun 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 PMJun 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 PMJun 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 PMJun 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>

Django

unread,
Jun 15, 2026, 11:27:59 AM (13 days ago) Jun 15
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: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Jacob Walls):

* stage: Unreviewed => Accepted

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

Django

unread,
Jun 16, 2026, 11:02:27 AM (12 days ago) Jun 16
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: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

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

Django

unread,
Jun 16, 2026, 11:12:56 AM (12 days ago) Jun 16
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: closed
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"d0378e181e828dce90d865f38b8f10f260d88de3" d0378e1]:
{{{#!CommitTicketReference repository=""
revision="d0378e181e828dce90d865f38b8f10f260d88de3"
Fixed #37169, Refs #36437 -- Replaced text-based selector in a selenium
test.

After incorporating a translation for "Run" in Arabic, the RTL case
started failing.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37169#comment:5>

Django

unread,
Jun 16, 2026, 11:14:37 AM (12 days ago) Jun 16
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: closed
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"08585cd9aa2a8f3e98b276e21c248e5281ffcc74" 08585cd]:
{{{#!CommitTicketReference repository=""
revision="08585cd9aa2a8f3e98b276e21c248e5281ffcc74"
[6.1.x] Fixed #37169, Refs #36437 -- Replaced text-based selector in a
selenium test.

After incorporating a translation for "Run" in Arabic, the RTL case
started failing.

Backport of d0378e181e828dce90d865f38b8f10f260d88de3 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37169#comment:6>

Django

unread,
Jun 16, 2026, 11:15:41 AM (12 days ago) Jun 16
to django-...@googlegroups.com
#37169: Screenshot test is failing because the language has been translated.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: closed
Component: contrib.admin | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"9ab779e4948757e7b3b6581da71c6ada60de307a" 9ab779e4]:
{{{#!CommitTicketReference repository=""
revision="9ab779e4948757e7b3b6581da71c6ada60de307a"
[6.0.x] Fixed #37169, Refs #36437 -- Replaced text-based selector in a
selenium test.

After incorporating a translation for "Run" in Arabic, the RTL case
started failing.

Backport of d0378e181e828dce90d865f38b8f10f260d88de3 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37169#comment:7>
Reply all
Reply to author
Forward
0 new messages