Updated tests for new version of selenium
All checks were successful
Run tests / Execute tox to run the test suite (push) Successful in 2m2s
Run tests every night at 05:05 / Execute tox to run the test suite (push) Successful in 2m46s

This commit is contained in:
2024-08-29 14:09:44 +02:00
parent af838d8fb6
commit 8a766c760d
4 changed files with 128 additions and 128 deletions

View File

@@ -40,7 +40,7 @@ class TestCase(SeleniumAuthMixin, SeleniumTestCase):
c = self.selenium
c.get(self.complete_url('/'))
try:
c.find_element_by_css_selector('#login-widget a')
c.find_element(By.CSS_SELECTOR, '#login-widget a')
except NoSuchElementException as e: # pragma: no cover
self.fail(str(e))
@@ -50,9 +50,9 @@ class TestCase(SeleniumAuthMixin, SeleniumTestCase):
location = reverse('dav_auth:login')
c.get(self.complete_url(location))
field = c.find_element_by_id('id_username')
field = c.find_element(By.ID, 'id_username')
self.assertEqual(field.get_attribute('required'), 'true')
field = c.find_element_by_id('id_password')
field = c.find_element(By.ID, 'id_password')
self.assertEqual(field.get_attribute('required'), 'true')
def test_required_fields_in_set_password_form(self):
@@ -61,7 +61,7 @@ class TestCase(SeleniumAuthMixin, SeleniumTestCase):
c.get(self.complete_url(reverse('dav_auth:set_password')))
field = self.wait_on_presence(c, (By.ID, 'id_new_password'))
self.assertEqual(field.get_attribute('required'), 'true')
field = c.find_element_by_id('id_new_password_repeat')
field = c.find_element(By.ID, 'id_new_password_repeat')
self.assertEqual(field.get_attribute('required'), 'true')
field = c.find_element_by_id('id_send_password_mail')
field = c.find_element(By.ID, 'id_send_password_mail')
self.assertEqual(field.get_attribute('required'), None)