diff options
author | Marcelo Galigniana <marcelogaligniana@gmail.com> | 2022-10-20 23:25:33 -0300 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-24 11:54:00 +0200 |
commit | 1d6948096f6fe7aa887d651e01e9af8e4ef349a2 (patch) | |
tree | ffbabfc59a4ea6c37be0df9a1e2339028a29ec87 /tests/admin_widgets | |
parent | 83cdcac35535ef122f687f5dcc5f8272dae7b3f0 (diff) | |
download | django-1d6948096f6fe7aa887d651e01e9af8e4ef349a2.tar.gz |
Fixed flaky test_ForeignKey_using_to_field test.
Diffstat (limited to 'tests/admin_widgets')
-rw-r--r-- | tests/admin_widgets/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 5f8584a435..2b35546341 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -1735,7 +1735,12 @@ class RelatedFieldWidgetSeleniumTests(AdminWidgetSeleniumTestCase): self.wait_for_value("#id_username", "newuser") self.selenium.back() + # Chrome and Safari don't update related object links when selecting + # the same option as previously submitted. As a consequence, the + # "pencil" and "eye" buttons remain disable, so select "---------" + # first. select = Select(self.selenium.find_element(By.ID, "id_user")) + select.select_by_index(0) select.select_by_value("newuser") # Click the Change User button to change it self.selenium.find_element(By.ID, "change_id_user").click() |