def test_step1_login_as_admin(self, browser, baseurl): page_object = LoginPage(browser, baseurl) page_object.go_to_url() page_object.go_to_login_form() page_object.log_in("admin", "admin123") page_object = LoggedInPage(browser, baseurl) assert page_object.is_logged()
def test_step1_login_as_user(self, browser, baseurl): page_object = LoginPage(browser, baseurl) page_object.go_to_url() page_object.go_to_login_form() page_object.log_in("developer", "passw0rd") page_object = LoggedInPage(browser, baseurl) assert page_object.is_logged()
def test_step3_login(self, browser, baseurl, admin_login, admin_password): page_object = LoginPage(browser, baseurl) page_object.go_to_url() page_object.go_to_login_form() page_object.log_in(admin_login, admin_password) page_object = LoggedInPage(browser, baseurl) assert page_object.is_logged()
def login(self, browser, baseurl, username, password): page_object = LoginPage(browser, baseurl) page_object.go_to_url() page_object.go_to_login_form() page_object.log_in(username, password) page_object = LoggedInPage(browser, baseurl) assert page_object.is_logged()
def test_step3_go_to_administration(self, browser, baseurl): page_object = LoggedInPage(browser, baseurl) page_object.go_to_site_admin() assert page_object.get_section_heading().text == "Administrator's Toolbox :: Preferences"
def test_step2_has_admin_privileges(self, browser, baseurl): page_object = LoggedInPage(browser, baseurl) assert page_object.has_admin_privileges()
def test_step5_logout(self, browser, baseurl): page_object = LoggedInPage(browser, baseurl) page_object.logout()
def test_step2_user_has_not_admin_privileges(self, browser, baseurl): with pytest.raises(NoSuchElementException): page_object = LoggedInPage(browser, baseurl) page_object.has_admin_privileges()