Skip to content
Snippets Groups Projects
Commit f7c4f67c authored by Leah Klearman's avatar Leah Klearman
Browse files

Merge remote-tracking branch '6a68/issue_2364_upstream_selenium_changes' into...

Merge remote-tracking branch '6a68/issue_2364_upstream_selenium_changes' into issue_2364_upstream_selenium_changes
parents 1da88b7b 4d218001
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,12 @@ Documentation
-------------
See the project's [wiki](https://github.com/mozilla/bidpom/wiki).
Running BIDPOM's Tests
----------------------
* two tests in check_sign_in.py require --email and --password flags. they can be skipped by using the "-m travis" flag
* if running against a remote selenium server, add --capabilities={"avoid-proxy":true} to the command line
* if experiencing TimeoutErrors from WebDriverWait, add the --webqatimeout=90 to the command line
License
-------
This software is licensed under the [MPL](http://www.mozilla.org/MPL/2.0/) 2.0:
......
......@@ -43,7 +43,7 @@ class AccountManager(Base):
@property
def old_password(self):
"""Get the value of the old password field."""
return self.selenium.find_element(*self._old_password_field_locator).text
return self.selenium.find_element(*self._old_password_field_locator).get_attribute('value')
@old_password.setter
def old_password(self, value):
......@@ -55,7 +55,7 @@ class AccountManager(Base):
@property
def new_password(self):
"""Get the value of the new password field."""
return self.selenium.find_element(*self._new_password_field_locator).text
return self.selenium.find_element(*self._new_password_field_locator).get_attribute('value')
@new_password.setter
def new_password(self, value):
......
......@@ -62,7 +62,7 @@ class SignIn(Base):
@property
def signed_in_email(self):
"""Get the value of the email that is currently signed in."""
return self.selenium.find_element(*self._signed_in_email_locator).text
return self.selenium.find_element(*self._signed_in_email_locator).get_attribute('value')
def click_this_is_not_me(self):
"""Clicks the 'This is not me' button."""
......@@ -79,7 +79,7 @@ class SignIn(Base):
@property
def email(self):
"""Get the value of the email field."""
return self.selenium.find_element(*self._email_locator).text
return self.selenium.find_element(*self._email_locator).get_attribute('value')
@email.setter
def email(self, value):
......@@ -91,7 +91,7 @@ class SignIn(Base):
@property
def new_email(self):
"""Get the value of the new email field."""
return self.selenium.find_element(*self._new_email_locator).text
return self.selenium.find_element(*self._new_email_locator).get_attribute('value')
@new_email.setter
def new_email(self, value):
......@@ -119,7 +119,7 @@ class SignIn(Base):
@property
def password(self):
"""Get the value of the password field."""
return self.selenium.find_element(*self._password_locator).text
return self.selenium.find_element(*self._password_locator).get_attribute('value')
@password.setter
def password(self, value):
......@@ -131,7 +131,7 @@ class SignIn(Base):
@property
def verify_password(self):
"""Get the value of the verify password field."""
return self.selenium.find_element(*self._verify_password_locator).text
return self.selenium.find_element(*self._verify_password_locator).get_attribute('value')
@verify_password.setter
def verify_password(self, value):
......
......@@ -14,7 +14,7 @@ import restmail
@pytest.mark.nondestructive
class TestSignIn(BaseTest):
class TestAddEmail(BaseTest):
@pytest.mark.travis
def test_add_email(self, mozwebqa):
......@@ -32,6 +32,7 @@ class TestSignIn(BaseTest):
signin.click_add_another_email_address()
signin.new_email = user.additional_emails[0]
assert signin.new_email == user.additional_emails[0], "new email getter failed"
signin.click_add_new_email()
signin.close_window()
signin.switch_to_main_window()
......
......@@ -12,7 +12,7 @@ from base import BaseTest
@pytest.mark.nondestructive
class TestSignIn(BaseTest):
class TestChangePassword(BaseTest):
@pytest.mark.travis
def test_change_password(self, mozwebqa):
......@@ -26,8 +26,10 @@ class TestSignIn(BaseTest):
account_manager.click_edit_password()
account_manager.old_password = user.password
assert account_manager.old_password == user.password, "old password getter failed"
user.password += '_new'
account_manager.new_password = user.password
assert account_manager.new_password == user.password, "new password getter failed"
account_manager.click_password_done()
account_manager.click_sign_out()
......
......@@ -14,7 +14,7 @@ import restmail
@pytest.mark.nondestructive
class TestSignIn(BaseTest):
class TestResetPassword(BaseTest):
@pytest.mark.travis
def test_reset_password(self, mozwebqa):
......
......@@ -32,8 +32,10 @@ class TestSignIn(BaseTest):
from .. pages.sign_in import SignIn
signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='new')
signin.email = credentials['email']
assert signin.email == credentials['email'], "email getter failed"
signin.click_next(expect='password')
signin.password = credentials['password']
assert signin.password == credentials['password'], "password getter failed"
signin.click_sign_in()
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
......@@ -59,6 +61,7 @@ class TestSignIn(BaseTest):
signin.click_next(expect='verify')
signin.password = user.password
signin.verify_password = user.password
assert signin.verify_password == user.password, 'verify password getter failed'
signin.click_verify_email()
assert signin.check_email_at_address == user.primary_email
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment