Skip to content

Commit

Permalink
Enabled the admin selenium tests to run on Chrome.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jphalip committed Feb 22, 2012
1 parent 354c84d commit a65eed3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tests/regressiontests/admin_inlines/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ def test_inline_change_fk_all_perms(self):
self.assertContains(response, '<input type="hidden" name="inner2_set-0-id" value="%i"' % self.inner2_id)
self.assertContains(response, 'id="id_inner2_set-0-DELETE"')


class SeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
fixtures = ['admin-views-users.xml']
Expand Down Expand Up @@ -487,3 +488,7 @@ def test_delete_inlines(self):
'form#profilecollection_form tr.dynamic-profile_set#profile_set-1')), 1)
self.failUnlessEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-2')), 1)


class SeleniumChromeTests(SeleniumFirefoxTests):
webdriver_class = 'selenium.webdriver.chrome.webdriver.WebDriver'
8 changes: 7 additions & 1 deletion tests/regressiontests/admin_views/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2894,7 +2894,8 @@ def test_prepopulated_maxlength_localized(self):
self.assertContains(response, "maxLength: 1000") # instead of 1,000


class SeleniumPrePopulatedTests(AdminSeleniumWebDriverTestCase):
class SeleniumPrePopulatedFirefoxTests(AdminSeleniumWebDriverTestCase):
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
urls = "regressiontests.admin_views.urls"
fixtures = ['admin-views-users.xml']

Expand Down Expand Up @@ -2997,6 +2998,11 @@ def test_basic(self):
slug2='option-one-tabular-inline-ignored-characters',
)


class SeleniumPrePopulatedChromeTests(SeleniumPrePopulatedFirefoxTests):
webdriver_class = 'selenium.webdriver.chrome.webdriver.WebDriver'


class ReadonlyTest(TestCase):
urls = "regressiontests.admin_views.urls"
fixtures = ['admin-views-users.xml']
Expand Down
7 changes: 5 additions & 2 deletions tests/regressiontests/admin_widgets/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def test_show_hide_date_time_picker_widgets(self):
self.assertEqual(
self.get_css_value('#calendarbox0', 'display'), 'block')
# Press the ESC key
self.selenium.find_element_by_tag_name('html').send_keys([Keys.ESCAPE])
self.selenium.find_element_by_tag_name('body').send_keys([Keys.ESCAPE])
# Check that the date picker is hidden again
self.assertEqual(
self.get_css_value('#calendarbox0', 'display'), 'none')
Expand All @@ -453,7 +453,10 @@ def test_show_hide_date_time_picker_widgets(self):
self.assertEqual(
self.get_css_value('#clockbox0', 'display'), 'block')
# Press the ESC key
self.selenium.find_element_by_tag_name('html').send_keys([Keys.ESCAPE])
self.selenium.find_element_by_tag_name('body').send_keys([Keys.ESCAPE])
# Check that the time picker is hidden again
self.assertEqual(
self.get_css_value('#clockbox0', 'display'), 'none')

class SeleniumChromeTests(SeleniumFirefoxTests):
webdriver_class = 'selenium.webdriver.chrome.webdriver.WebDriver'

0 comments on commit a65eed3

Please sign in to comment.