def test_confirmation(page: Page): home_page = HomePage(page) home_page.open_main_page() home_page.add_thing_to_cart_by_name("Blouse") text = home_page.get_confirmation_text() assert "Product successfully added to your shopping cart" in text, "Wrong confirmation message"
def test_cart(page: Page): home_page = HomePage(page) home_page.open_main_page() home_page.add_thing_to_cart_by_name("Printed Dress") home_page.close_confirmation_modal() home_page.expand_cart() data = home_page.return_purchase_data() assert ("Printed Dressd", "$26.00") == data, f"Wrong item info: '{data}'"
def test_email_error(page: Page, login, password): home_page = HomePage(page) home_page.open_main_page() page.click(home_page.SIGN_IN_LOCATOR) sign_in_page = SignInPage(page) sign_in_page.populate_credentials(login, password) sign_in_page.click_sign_in_button() assert "Invalid email address." in sign_in_page.get_authentication_error_text(), "Wrong email validation message"