Exemplo n.º 1
0
def mozwebqa_logged_in(request):
    from pages.login_page import MozTrapLoginPage
    mozwebqa = request.getfuncargvalue('mozwebqa')
    login_pg = MozTrapLoginPage(mozwebqa)
    login_pg.go_to_login_page()
    login_pg.login()

    return mozwebqa
Exemplo n.º 2
0
def mozwebqa_logged_in(request):
    from pages.login_page import MozTrapLoginPage
    mozwebqa = request.getfuncargvalue('mozwebqa')
    login_pg = MozTrapLoginPage(mozwebqa)
    login_pg.go_to_login_page()
    login_pg.login()

    return mozwebqa
 def test_that_new_user_can_be_added(self,mozwebqa):
     from pages.login_page import MozTrapLoginPage
     login_pg = MozTrapLoginPage(mozwebqa)
     login_pg.go_to_login_page()
     login_pg.login()
             
     user_pg = MozTrapManageUserPage(mozwebqa)
     user_pg.create_user('user2','*****@*****.**','Tester',0)
     user_pg.delete_user('user2')
     user_pg.create_user('user2','*****@*****.**','Tester',1)
     user_pg.activate_user('user2')
     user_pg.deactivate_user('user2')
Exemplo n.º 4
0
    def test_that_user_can_login_and_logout(self, mozwebqa, existing_user):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(mozwebqa)
        home_pg = MozTrapHomePage(mozwebqa)

        home_pg.get_relative_path('/')
        Assert.false(home_pg.header.is_user_logged_in)

        login_pg.go_to_login_page()
        login_pg.login(existing_user['email'], existing_user['password'])
        Assert.true(home_pg.header.is_user_logged_in)
        Assert.equal(home_pg.header.username_text, existing_user['name'])

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')
        Assert.false(home_pg.header.is_user_logged_in)
Exemplo n.º 5
0
    def test_that_user_can_login_and_logout(self, mozwebqa, existing_user):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(mozwebqa)
        home_pg = MozTrapHomePage(mozwebqa)

        home_pg.get_relative_path('/')
        Assert.false(home_pg.header.is_user_logged_in)

        login_pg.go_to_login_page()
        login_pg.login(existing_user['email'], existing_user['password'])
        Assert.true(home_pg.header.is_user_logged_in)
        Assert.equal(home_pg.header.username_text, existing_user['name'])

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')
        Assert.false(home_pg.header.is_user_logged_in)
Exemplo n.º 6
0
    def test_that_user_can_login_and_logout(self, base_url, selenium, existing_user):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(base_url, selenium)
        home_pg = MozTrapHomePage(base_url, selenium)

        home_pg.get_relative_path('/')
        assert not home_pg.header.is_user_logged_in

        login_pg.go_to_login_page()
        login_pg.login(existing_user['email'], existing_user['password'])
        assert home_pg.header.is_user_logged_in
        assert existing_user['name'] == home_pg.header.username_text

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')
        assert not home_pg.header.is_user_logged_in
Exemplo n.º 7
0
    def test_that_user_can_login_and_logout(self, base_url, selenium,
                                            existing_user):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(base_url, selenium)
        home_pg = MozTrapHomePage(base_url, selenium)

        home_pg.get_relative_path('/')
        assert not home_pg.header.is_user_logged_in

        login_pg.go_to_login_page()
        login_pg.login(existing_user['email'], existing_user['password'])
        assert home_pg.header.is_user_logged_in
        assert existing_user['name'] == home_pg.header.username_text

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')
        assert not home_pg.header.is_user_logged_in
Exemplo n.º 8
0
    def test_that_user_can_login_and_logout(self, mozwebqa):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(mozwebqa)
        home_pg = MozTrapHomePage(mozwebqa)

        home_pg.get_relative_path('/')

        Assert.false(home_pg.header.is_user_logged_in)

        login_pg.go_to_login_page()
        login_pg.login()

        user = home_pg.testsetup.credentials['default']
        users_name = user['name']

        Assert.true(home_pg.header.is_user_logged_in)
        Assert.equal(home_pg.header.username_text, users_name)

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')

        Assert.false(home_pg.header.is_user_logged_in)
Exemplo n.º 9
0
    def test_that_user_can_login_and_logout(self, mozwebqa):
        from pages.login_page import MozTrapLoginPage
        login_pg = MozTrapLoginPage(mozwebqa)
        home_pg = MozTrapHomePage(mozwebqa)

        home_pg.get_relative_path('/')

        Assert.false(home_pg.header.is_user_logged_in)

        login_pg.go_to_login_page()
        login_pg.login()

        user = home_pg.testsetup.credentials['default']
        users_name = user['name']

        Assert.true(home_pg.header.is_user_logged_in)
        Assert.equal(home_pg.header.username_text, users_name)

        home_pg.header.click_logout()
        home_pg.get_relative_path('/')

        Assert.false(home_pg.header.is_user_logged_in)
Exemplo n.º 10
0
def login(request, mozwebqa, existing_user):
    from pages.login_page import MozTrapLoginPage
    login_pg = MozTrapLoginPage(mozwebqa)
    login_pg.go_to_login_page()
    login_pg.login(existing_user['email'], existing_user['password'])
Exemplo n.º 11
0
def login(request, base_url, selenium, existing_user):
    from pages.login_page import MozTrapLoginPage
    login_pg = MozTrapLoginPage(base_url, selenium)
    login_pg.go_to_login_page()
    login_pg.login(existing_user['email'], existing_user['password'])
Exemplo n.º 12
0
def login(request, mozwebqa, existing_user):
    from pages.login_page import MozTrapLoginPage
    login_pg = MozTrapLoginPage(mozwebqa)
    login_pg.go_to_login_page()
    login_pg.login(existing_user['email'], existing_user['password'])