Exemplo n.º 1
0
 def test_add_product_that_is_no_stock(self):
     searchPage = SearchPage(self.driver)
     searchPage.set_search_text(Product.search_product_no_stock)
     searchPage.press_enter()
     assert Product.title_product_no_stock, searchPage.check_product_search(Product.title_product_no_stock)
     assert Product.message_no_stock, searchPage.check_message_no_stock()
     searchPage.click_product_search(Product.title_product_no_stock)
     assert Product.category_no_stock, searchPage.check_category_no_stock()
Exemplo n.º 2
0
    def test_add_product_to_cart_successfully(self):
        searchPage = SearchPage(self.driver)
        searchPage.set_search_text(Product.search_valid_product)
        searchPage.press_enter()
        assert Product.title_valid_product, searchPage.check_product_search(Product.title_valid_product)
        searchPage.click_product_search(Product.title_valid_product)

        cartPage = CartPage(self.driver)
        assert Product.title_valid_product, cartPage.check_product_title()

        cartPage.click_buy()
        assert Product.title_valid_product, cartPage.check_product_cart()
Exemplo n.º 3
0
    def test_add_product_to_to_cart_with_extended_warranty(self):
        searchPage = SearchPage(self.driver)
        searchPage.set_search_text(Product.search_product_warranty)
        searchPage.press_enter()
        assert Product.title_product_warranty, searchPage.check_product_search(Product.title_product_warranty)
        searchPage.click_product_search(Product.title_product_warranty)

        cartPage = CartPage(self.driver)
        assert Product.title_product_warranty, cartPage.check_product_title()
        cartPage.click_buy()
        cartPage.click_radio_warranty()
        cartPage.click_continue()
        assert Product.title_product_warranty, cartPage.check_product_cart()
Exemplo n.º 4
0
    def test_add_product_with_details_to_cart(self):
        searchPage = SearchPage(self.driver)
        searchPage.set_search_text(Product.search_product_with_details)
        searchPage.press_enter()
        assert Product.title_product_with_details, searchPage.check_product_search(Product.title_product_with_details)
        searchPage.click_product_search(Product.title_product_with_details)

        cartPage = CartPage(self.driver)
        assert Product.title_product_with_details, cartPage.check_product_title()
        cartPage.click_buy()
        assert Product.title_product_features, cartPage.check_confirm_product()
        cartPage.click_confirm_product()

        assert Product.title_valid_product, cartPage.check_product_cart()
        assert Product.features_product, cartPage.check_product_features()
Exemplo n.º 5
0
 def test_search_suggested_product(self):
     searchPage = SearchPage(self.driver)
     searchPage.set_search_text(Product.search_product_suggested)
     assert Product.title_product_suggested1, searchPage.check_product_search(Product.title_product_suggested1)
     assert Product.title_product_suggested2, searchPage.check_product_search(Product.title_product_suggested2)
     assert Product.title_product_suggested3, searchPage.check_product_search(Product.title_product_suggested3)
Exemplo n.º 6
0
 def test_search_product_with_wrong_name(self):
     searchPage = SearchPage(self.driver)
     searchPage.set_search_text(Product.search_product_wrong)
     searchPage.press_enter()
     assert Product.message_alternative_results, searchPage.check_message_alternative_results()
     assert Product.title_alternative_product, searchPage.check_product_search(Product.title_alternative_product)
Exemplo n.º 7
0
 def test_search_product_successfully(self):
     searchPage = SearchPage(self.driver)
     searchPage.set_search_text(Product.search_valid_product)
     searchPage.press_enter()
     assert Product.title_valid_product in searchPage.check_product_search(Product.title_valid_product)