Exemplo n.º 1
0
    def test_message_disappeared_after_adding_product_to_basket(self, browser):
        page = ProductPage(browser, ProductPage.LINK)
        page.open()

        page.add_to_basket()

        page.check_success_message_disappeared()
Exemplo n.º 2
0
    def test_guest_cant_see_success_message_after_adding_product_to_basket(self, browser):
        page = ProductPage(browser, link)
        page.open()

        page.add_to_basket()

        page.should_not_be_success_message()
Exemplo n.º 3
0
    def test_user_can_add_product_to_basket(self, browser):
        page = ProductPage(browser, ProductPage.LINK)
        page.open()

        page.add_to_basket()

        page.check_specific_product_was_added_to_basket()
        page.check_basket_and_product_costs_are_equal()
Exemplo n.º 4
0
    def test_guest_can_add_product_to_basket(self, browser, promo_offer):
        product_link = f"{link}/?promo={promo_offer}"
        page = ProductPage(browser, product_link)
        page.open()

        page.add_to_basket()
        page.solve_quiz_and_get_code()

        page.should_be_correct_product_in_basket()
Exemplo n.º 5
0
    def test_guest_can_add_product_to_basket(self, browser, promo_offer):
        full_promo_link = ProductPage.LINK + '?promo=' + promo_offer
        page = ProductPage(browser, full_promo_link)
        page.open()

        page.add_to_basket()
        page.solve_quiz_and_get_code()

        page.check_specific_product_was_added_to_basket()
        page.check_basket_and_product_costs_are_equal()