diff --git a/automation-tests/browserid/conftest.py b/automation-tests/browserid/conftest.py index 048e3efc767ae0bf352ece75fefde1ebc9d8a265..1d7eda7aad3c89a0eaf4324ec95435b79b0cb618 100644 --- a/automation-tests/browserid/conftest.py +++ b/automation-tests/browserid/conftest.py @@ -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') diff --git a/automation-tests/browserid/tests/check_sign_in.py b/automation-tests/browserid/tests/check_sign_in.py index 224d3cc270fef34f888886bff30944c397d9e0d2..c273555cc7e0d027cc69be194cd1066eff55e9bd 100644 --- a/automation-tests/browserid/tests/check_sign_in.py +++ b/automation-tests/browserid/tests/check_sign_in.py @@ -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())