Opened 59 minutes ago

Last modified 55 minutes ago

#37169 assigned Bug

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: Unreviewed
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 59 minutes ago.

Download all attachments as: .zip

Change History (3)

by Antoliny, 59 minutes ago

Attachment: rtl-select.png added

comment:1 by Antoliny, 59 minutes ago

Owner: set to Antoliny
Status: newassigned

comment:2 by Antoliny, 55 minutes ago

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