Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
After verifying users are now automatically logged into the original …
Browse files Browse the repository at this point in the history
…site.
  • Loading branch information
davehunt committed Jun 20, 2012
1 parent fb99eb6 commit 54152c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 53 deletions.
27 changes: 1 addition & 26 deletions tests/rc/check_sign_in.py
Expand Up @@ -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)
Expand Down
28 changes: 1 addition & 27 deletions tests/webdriver/check_sign_in.py
Expand Up @@ -64,35 +64,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.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())

Expand Down

0 comments on commit 54152c7

Please sign in to comment.