fix e2e tests
This commit is contained in:
parent
7cb5404588
commit
dee572c40f
@ -24,11 +24,11 @@ class TestLogin:
|
|||||||
assert button.get_attribute('type') == 'submit'
|
assert button.get_attribute('type') == 'submit'
|
||||||
assert 'Log in' in button.text
|
assert 'Log in' in button.text
|
||||||
|
|
||||||
forgot_password_link = selenium.find_element_by_class_name(
|
links = selenium.find_elements_by_class_name('links')
|
||||||
'password-forgotten'
|
assert links[0].tag_name == 'a'
|
||||||
)
|
assert 'Register' in links[0].text
|
||||||
assert forgot_password_link.tag_name == 'a'
|
assert links[1].tag_name == 'a'
|
||||||
assert 'Forgot password?' in forgot_password_link.text
|
assert 'Forgot password?' in links[1].text
|
||||||
|
|
||||||
def test_user_can_log_in(self, selenium):
|
def test_user_can_log_in(self, selenium):
|
||||||
user = {
|
user = {
|
||||||
|
@ -29,6 +29,10 @@ class TestRegistration:
|
|||||||
assert button.get_attribute('type') == 'submit'
|
assert button.get_attribute('type') == 'submit'
|
||||||
assert 'Register' in button.text
|
assert 'Register' in button.text
|
||||||
|
|
||||||
|
link = selenium.find_element_by_class_name('links')
|
||||||
|
assert link.tag_name == 'a'
|
||||||
|
assert 'Login' in link.text
|
||||||
|
|
||||||
def test_user_can_register(self, selenium):
|
def test_user_can_register(self, selenium):
|
||||||
user = register_valid_user(selenium)
|
user = register_valid_user(selenium)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user