Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#37169 closed Bug (fixed)

Screenshot test is failing because the language has been translated.

Reported by: Antoliny Owned by: Antoliny
Component: contrib.admin Version: 6.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.


  • tests/admin_views/tests.py

    --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
    index b6c4e88a43..7f6283a1e5 100644
    a b class SeleniumTests(AdminSeleniumTestCase):  
    74897489                Select(self.selenium.find_element(By.NAME, "action")).select_by_value(
    74907490                    f"message_{level}"
    74917491                )
    7492                 self.selenium.find_element(By.XPATH, '//button[text()="Run"]').click()
     7492                self.selenium.find_element(By.CSS_SELECTOR, 'button[name="index"]').click()
    74937493                message = self.selenium.find_element(
    74947494                    By.CSS_SELECTOR, "ul.messagelist li"
    74957495                )

Attachments (1)

rtl-select.png (55.6 KB ) - added by Antoliny 3 weeks ago.

Download all attachments as: .zip

Change History (8)

by Antoliny, 3 weeks ago

Attachment: rtl-select.png added

comment:1 by Antoliny, 3 weeks ago

Owner: set to Antoliny
Status: newassigned

comment:2 by Antoliny, 3 weeks ago

Has patch: set

comment:3 by Jacob Walls, 3 weeks ago

Triage Stage: UnreviewedAccepted

comment:4 by Jacob Walls, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:5 by GitHub <noreply@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In d0378e1:

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.

comment:6 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

In 08585cd:

[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.

comment:7 by Jacob Walls <jacobtylerwalls@…>, 3 weeks ago

In 9ab779e4:

[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.

Note: See TracTickets for help on using tickets.
Back to Top