-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_product_page1.py
34 lines (28 loc) · 1.34 KB
/
test_product_page1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from pages.product_page import ProductPage
import pytest
import time
@pytest.mark.xfail(reason="fixing this bug right now")
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_product_to_basket()
page.guest_cant_see_success_message_after_adding_product_to_basket()
def test_guest_cant_see_success_message(browser):
link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
page = ProductPage(browser, link)
page.open()
page.guest_cant_see_success_message()
@pytest.mark.xfail(reason="fixing this bug right now")
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_product_to_basket()
time.sleep(1)
page.message_disappeared_after_adding_product_to_basket()
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()