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_basket() time.sleep(1) page.should_disappear_success_message()
def test_message_disappeared_after_adding_product_to_basket(browser): page = ProductPage( browser, "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/") page.open() page.add_item_to_basket() page.the_message_should_disappeare()
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_basket() page.should_not_be_success_message()
def test_guest_can_add_product_to_basket(browser, link): page = ProductPage(browser, link) page.open() page.add_item_to_basket() page.solve_quiz_and_get_code() time.sleep(2) page.item_was_added() page.correct_item_was_added()
def test_guest_can_add_product_to_basket(browser): page = ProductPage(browser, link) page.open() page.add_to_the_cart() page.solve_quiz_and_get_code() page.should_be_success_of_addition_message() page.should_be_the_right_price_of_the_cart()
def test_guest_cant_see_success_message(browser): page = ProductPage( browser, "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/") page.open() page.should_not_be_success_message()
def test_guest_can_go_to_login_page_from_product_page(browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/" page = ProductPage(browser, link) page.open() page.go_to_login_page()
def test_guest_should_see_login_link_on_product_page(browser): link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/" page = ProductPage(browser, link) page.open() page.should_be_login_link()
def test_user_cant_see_success_message(self): page = ProductPage(self.browser, link) page.open() page.should_not_be_success_message()
def test_user_can_add_product_to_basket(self): page = ProductPage(self.browser, link) page.open() page.add_to_the_cart() page.should_be_success_of_addition_message() page.should_be_the_right_price_of_the_cart()
def test_message_disappeared_after_adding_product_to_basket(browser): page = ProductPage(browser, link) page.open() page.add_to_the_cart() time.sleep(1) page.should_be_dissapeared()
def test_guest_cant_see_success_message(browser): page = ProductPage(browser, link) page.open() page.should_not_be_success_message()
def test_guest_cant_see_success_message_after_adding_product_to_basket( browser): page = ProductPage(browser, link) page.open() page.add_to_the_cart() page.should_not_be_success_message()
def test_guest_can_go_to_login_page_from_product_page(browser): link = "http://selenium1py.pythonanywhere.com/en-gb/accounts/login/" page = ProductPage(browser, link) page.open() page.should_be_login_link(browser, link)
def test_guest_can_add_product_to_basket(browser, link): page = ProductPage(browser, link) page.open() page.should_be_add_to_cart_button() page.solve_quiz_and_get_code() page.should_be_success_message()