Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

After verifying users are now automatically logged into the original …

…site.
  • Loading branch information...
commit 54152c7680881500b4b3e54ebacb102a9824f1ec 1 parent fb99eb6
@davehunt authored
Showing with 2 additions and 53 deletions.
  1. +1 −26 tests/rc/check_sign_in.py
  2. +1 −27 tests/webdriver/check_sign_in.py
View
27 tests/rc/check_sign_in.py
@@ -66,34 +66,9 @@ def test_sign_in_new_user(self, mozwebqa):
mail = restmail.get_mail(restmail_username)
assert 'Thanks for verifying' in mail[0]['text']
- def test_sign_in_returning_user_helper(self, mozwebqa):
- self.create_verified_user(mozwebqa.selenium, mozwebqa.timeout)
- mozwebqa.selenium.open('%s/' % mozwebqa.base_url)
- login_locator = 'css=#loggedout button'
- mozwebqa.wait_for_element_visible(mozwebqa, login_locator)
- mozwebqa.selenium.click(login_locator)
-
- from ...pages.rc.sign_in import SignIn
- signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='returning')
- signin.sign_in_returning_user()
- logout_locator = 'css=#loggedin a'
- mozwebqa.wait_for_element_visible(mozwebqa, logout_locator)
- assert mozwebqa.selenium.is_visible(logout_locator)
-
def test_sign_in_returning_user(self, mozwebqa):
- (email, password) = self.create_verified_user(mozwebqa.selenium,
- mozwebqa.timeout)
+ self.create_verified_user(mozwebqa.selenium, mozwebqa.timeout)
mozwebqa.selenium.open('%s/' % mozwebqa.base_url)
- login_locator = 'css=#loggedout button'
- mozwebqa.wait_for_element_visible(mozwebqa, login_locator)
- mozwebqa.selenium.click(login_locator)
-
- from ...pages.rc.sign_in import SignIn
- signin = SignIn(mozwebqa.selenium,
- mozwebqa.timeout,
- expect='returning')
- assert signin.signed_in_email == email
- signin.click_sign_in_returning_user()
logout_locator = 'css=#loggedin a'
mozwebqa.wait_for_element_visible(mozwebqa, logout_locator)
assert mozwebqa.selenium.is_visible(logout_locator)
View
28 tests/webdriver/check_sign_in.py
@@ -64,36 +64,10 @@ def test_sign_in_new_user(self, mozwebqa):
mail = restmail.get_mail(restmail_username)
assert 'Thanks for verifying' in mail[0]['text']
- def test_sign_in_returning_user_helper(self, mozwebqa):
- self.create_verified_user(mozwebqa.selenium, mozwebqa.timeout)
- mozwebqa.selenium.get('%s/' % mozwebqa.base_url)
- WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
- lambda s: s.find_element_by_id('loggedout').is_displayed())
- mozwebqa.selenium.find_element_by_id('loggedout'). \
- find_element_by_tag_name('button').click()
-
- from ...pages.webdriver.sign_in import SignIn
- signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='returning')
- signin.sign_in_returning_user()
- WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
- lambda s: s.find_element_by_id('loggedin').is_displayed())
-
def test_sign_in_returning_user(self, mozwebqa):
- (email, password) = self.create_verified_user(mozwebqa.selenium,
- mozwebqa.timeout)
+ self.create_verified_user(mozwebqa.selenium, mozwebqa.timeout)
mozwebqa.selenium.get('%s/' % mozwebqa.base_url)
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
- lambda s: s.find_element_by_id('loggedout').is_displayed())
- mozwebqa.selenium.find_element_by_id('loggedout'). \
- find_element_by_tag_name('button').click()
-
- from ...pages.webdriver.sign_in import SignIn
- signin = SignIn(mozwebqa.selenium,
- mozwebqa.timeout,
- expect='returning')
- assert signin.signed_in_email == email
- signin.click_sign_in_returning_user()
- WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
lambda s: s.find_element_by_id('loggedin').is_displayed())
def create_verified_user(self, selenium, timeout):
Please sign in to comment.
Something went wrong with that request. Please try again.