Skip to content
Snippets Groups Projects
Commit 1c40039e authored by jared hirsch's avatar jared hirsch
Browse files

Merge pull request #2365 from klrmn/bidpom_credentials

remove need for --email and --password in bidpom tests
parents 7a75c598 d305b26f
No related branches found
No related tags found
No related merge requests found
......@@ -9,21 +9,6 @@ import py
def pytest_runtest_setup(item):
pytest_mozwebqa = py.test.config.pluginmanager.getplugin('mozwebqa')
pytest_mozwebqa.TestSetup.email = item.config.option.email
pytest_mozwebqa.TestSetup.password = item.config.option.password
def pytest_addoption(parser):
group = parser.getgroup('persona', 'persona')
group._addoption('--email',
action='store',
metavar='str',
help='email address for persona account')
group._addoption('--password',
action='store',
metavar='str',
help='password for persona account')
def pytest_funcarg__mozwebqa(request):
return request.getfuncargvalue('mozwebqa')
......@@ -17,23 +17,23 @@ import restmail
@pytest.mark.nondestructive
class TestSignIn(BaseTest):
@pytest.mark.travis
def test_sign_in_helper(self, mozwebqa):
if mozwebqa.email == None:
pytest.skip("no --email supplied")
credentials = mozwebqa.credentials['default']
browser_id = BrowserID(mozwebqa.selenium, mozwebqa.timeout)
browser_id.sign_in(mozwebqa.email, mozwebqa.password)
browser_id.sign_in(credentials['email'], credentials['password'])
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
lambda s: s.find_element_by_id('loggedin').is_displayed())
@pytest.mark.travis
def test_sign_in(self, mozwebqa):
if mozwebqa.email == None:
pytest.skip("no --email supplied")
credentials = mozwebqa.credentials['default']
from .. pages.sign_in import SignIn
signin = SignIn(mozwebqa.selenium, mozwebqa.timeout, expect='new')
signin.email = mozwebqa.email
signin.email = credentials['email']
signin.click_next(expect='password')
signin.password = mozwebqa.password
signin.password = credentials['password']
signin.click_sign_in()
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
......@@ -74,9 +74,11 @@ class TestSignIn(BaseTest):
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
lambda s: s.find_element_by_id('loggedin').is_displayed())
@pytest.mark.travis
def test_sign_in_is_this_your_computer(self, mozwebqa):
credentials = mozwebqa.credentials['default']
browser_id = BrowserID(mozwebqa.selenium, mozwebqa.timeout)
browser_id.sign_in(mozwebqa.email, mozwebqa.password)
browser_id.sign_in(credentials['email'], credentials['password'])
WebDriverWait(mozwebqa.selenium, mozwebqa.timeout).until(
lambda s: s.find_element_by_id('loggedin').is_displayed())
......
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