Ejemplo n.º 1
0
def test_guest_cant_see_success_message_after_adding_product_to_basket(
        browser):
    link = f"http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
    pages = AddInBasket(browser, link)
    pages.open()
    pages.add_in_basket()
    pages.AssertIsNotElementPresent()
Ejemplo n.º 2
0
 def test_user_can_add_product_to_basket(self, browser):
     link = f"http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     pages = AddInBasket(browser, link)
     pages.open()
     pages.add_in_basket()
     base_page = BasePage(browser, link)
     base_page.solve_quiz_and_get_code()
     pages.AssertFinishText()
Ejemplo n.º 3
0
def test_guest_can_add_product_to_basket(browser, offers):
    link = f"http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=offer{offers}"
    pages = AddInBasket(browser, link)
    pages.open()
    pages.add_in_basket()
    base_page = BasePage(browser, link)
    base_page.solve_quiz_and_get_code()
    pages.AssertFinishText()
Ejemplo n.º 4
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = f"http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
    pages = AddInBasket(browser, link)
    pages.open()
    pages.add_in_basket()
    pages.IsDisappeared()
Ejemplo n.º 5
0
 def test_user_cant_see_success_message(self, browser):
     link = f"http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     pages = AddInBasket(browser, link)
     pages.open()
     pages.AssertIsNotElementPresent()