diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2014-01-03 11:25:24 +0100 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2014-01-03 11:29:37 +0100 |
| commit | 3bc6b18cb92462ff5ae54efd0fce5340e9149b0f (patch) | |
| tree | 86fc02c185b388d288c044c36339fdcee3feb1e8 /tests/admin_widgets/tests.py | |
| parent | 4e6142ee84e966418799fed1fc5d8594a9e08c02 (diff) | |
Fixed selenium failure.
This fixes (at least according to tests on the ci itself)
admin_widgets.tests.RelatedFieldWidgetSeleniumFirefoxTests.test_foreign_key_using_to_field
(http://ci.djangoproject.com/job/Django/database=mysql_gis,python=python2.7/3792/testReport/junit/admin_widgets.tests/RelatedFieldWidgetSeleniumFirefoxTests/test_foreign_key_using_to_field/)
The cause for this issue seems to be that wait_page_loaded was executed before click fired
and as such no profile got saved (again just an educated guess, but with this fix I can no
longer reproduce it -- fingers crossed).
Diffstat (limited to 'tests/admin_widgets/tests.py')
| -rw-r--r-- | tests/admin_widgets/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 794cd7924c..29dd5750ae 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -993,7 +993,7 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase): # The field now contains the selected band's id self.selenium.switch_to_window(main_window) - self.wait_for_text('#id_main_band', '42') + self.wait_for_value('#id_main_band', '42') # Reopen the popup window and click on another band self.selenium.find_element_by_id('lookup_id_main_band').click() @@ -1005,7 +1005,7 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase): # The field now contains the other selected band's id self.selenium.switch_to_window(main_window) - self.wait_for_text('#id_main_band', '98') + self.wait_for_value('#id_main_band', '98') def test_many_to_many(self): self.admin_login(username='super', password='secret', login_url='/') @@ -1028,7 +1028,7 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase): # The field now contains the selected band's id self.selenium.switch_to_window(main_window) - self.wait_for_text('#id_supporting_bands', '42') + self.wait_for_value('#id_supporting_bands', '42') # Reopen the popup window and click on another band self.selenium.find_element_by_id('lookup_id_supporting_bands').click() @@ -1040,7 +1040,7 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase): # The field now contains the two selected bands' ids self.selenium.switch_to_window(main_window) - self.wait_for_text('#id_supporting_bands', '42,98') + self.wait_for_value('#id_supporting_bands', '42,98') class AdminRawIdWidgetSeleniumChromeTests(AdminRawIdWidgetSeleniumFirefoxTests): @@ -1084,7 +1084,7 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase): # Go ahead and submit the form to make sure it works self.selenium.find_element_by_css_selector(save_button_css_selector).click() - self.wait_page_loaded() + self.wait_for_text('li.success', 'The profile "newuser" was added successfully.') profiles = models.Profile.objects.all() self.assertEqual(len(profiles), 1) self.assertEqual(profiles[0].user.username, username_value) |
