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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ec42030e1-8e22045d-cae7-419c-a1ed-4ed893aaae75-000000%40eu-central-1.amazonses.com.

Reply via email to