def test_guest_cant_see_success_message_after_adding_product_to_basket( browser): link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/' page = ProductPage(browser, link) page.open() page.add_to_cart_click() page.should_not_be_success_message()
def test_guest_can_add_product_to_basket(browser, link): page = ProductPage(browser, link) page.open() page.add_to_cart_click() page.solve_quiz_and_get_code() page.should_be_message_added_to_cart() page.should_be_same_product_name() page.should_be_same_cart_and_product_price()
def test_user_can_add_product_to_basket(self, browser): link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/' page = ProductPage(browser, link) page.open() page.add_to_cart_click() page.should_be_message_added_to_cart() page.should_be_same_product_name() page.should_be_same_cart_and_product_price()
def test_message_disappeared_after_adding_product_to_basket(browser): link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/' page = ProductPage(browser, link) page.open() page.add_to_cart_click() page.success_message_disappeared()