def test_user_login(self, browser): # Data test_user_email = "*****@*****.**" test_user_password = "******" # Act login_page = LoginPage(browser) login_page.open() # Assert login_page.should_be_login_form() login_page.user_login(test_user_email, test_user_password) login_page.should_be_authorized_user() login_page.user_should_see_message_login()
def setup(self, browser): # Data test_user_email = "*****@*****.**" test_user_password = "******" # Arrange login_page = LoginPage(browser) login_page.open() login_page.user_login(test_user_email, test_user_password) basket_page = BasketPage(browser) basket_page.open() basket_page.user_clear_basket() product_page = ProductPage(browser, self.test_product_link) product_page.open() product_page.click_button_add_to_basket() product_page.click_button_view_basket()