1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] Fixed #25323 -- Fixed selenium test failures with chromedriver 2.18.

Backport of 7ac0cd445e from master
This commit is contained in:
Tim Graham
2015-08-19 20:43:27 -04:00
parent 3cc67a637a
commit 0d368bfb47
3 changed files with 23 additions and 15 deletions

View File

@@ -3979,8 +3979,11 @@ class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
self.admin_login(username='super', password='secret', login_url=reverse('admin:index'))
self.selenium.get(full_url)
self.selenium.find_element_by_class_name('deletelink').click()
# Wait until we're on the delete page.
self.wait_for('.cancel-link')
self.selenium.find_element_by_class_name('cancel-link').click()
self.wait_page_loaded()
# Wait until we're back on the change page.
self.wait_for_text('#content h1', 'Change pizza')
self.assertEqual(self.selenium.current_url, full_url)
self.assertEqual(Pizza.objects.count(), 1)
@@ -3998,8 +4001,11 @@ class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
self.admin_login(username='super', password='secret', login_url=reverse('admin:index'))
self.selenium.get(full_url)
self.selenium.find_element_by_class_name('deletelink').click()
# Wait until we're on the delete page.
self.wait_for('.cancel-link')
self.selenium.find_element_by_class_name('cancel-link').click()
self.wait_page_loaded()
# Wait until we're back on the change page.
self.wait_for_text('#content h1', 'Change pizza')
self.assertEqual(self.selenium.current_url, full_url)
self.assertEqual(Pizza.objects.count(), 1)
self.assertEqual(Topping.objects.count(), 2)