Esempio n. 1
0
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()
Esempio n. 2
0
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()
Esempio n. 3
0
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()
Esempio n. 4
0
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()
Esempio n. 6
0
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()
Esempio n. 7
0
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()
Esempio n. 8
0
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()
Esempio n. 10
0
 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()
Esempio n. 11
0
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()
Esempio n. 12
0
def test_guest_cant_see_success_message(browser):
    page = ProductPage(browser, link)
    page.open()
    page.should_not_be_success_message()
Esempio n. 13
0
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()
Esempio n. 14
0
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)
Esempio n. 15
0
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()