Exemple #1
0
 def login_nonexistent_email(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     login = LoginPage(chrome)
     login.open(device)
     login.fill_credentials("*****@*****.**", self.password)
     login.press_login_button()
     assert not AccountPage(chrome).loaded()
Exemple #2
0
 def login_nonexistent_password(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     login = LoginPage(chrome)
     login.open(device)
     login.fill_credentials(self.email, "12345789")
     login.press_login_button()
     assert not AccountPage(chrome).loaded()
Exemple #3
0
 def test_forgot_password(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     forgot_password = ForgotPasswordPage(chrome)
     forgot_password.open(device)
     forgot_password.fill_email(self.email)
     forgot_password.press_continue_button()
     assert ConfirmationMessage(chrome).loaded()
Exemple #4
0
 def test_adding_to_cart(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     product_page = ProductPage(chrome, "41", "iMac")
     product_page.open(device)
     product_page.loaded()
     product_page.information_block().add_to_cart()
     assert product_page.messages().has_cart_message()
Exemple #5
0
 def test_forgot_password_with_not_existing_email(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     forgot_password = ForgotPasswordPage(chrome)
     forgot_password.load(device)
     forgot_password.fill_email("*****@*****.**")
     forgot_password.press_continue_button()
     assert not ConfirmationMessage(chrome).available()
Exemple #6
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     product_page = ProductPage(chrome, "34", "iPod Shuffle")
     product_page.load(device)
     product_page.information_block().open_share_link()
     share_page = ShareWindow(chrome)
     assert share_page.is_open_popup_share()
Exemple #7
0
 def login_exists_credentials(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     login = LoginPage(chrome)
     login.load(device)
     login.fill_credentials(self.email, self.password)
     login.press_login_button()
     assert AccountPage(chrome).available()
Exemple #8
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     contact_us = ContactUsPage(chrome)
     contact_us.open(device)
     contact_us.fill_contact_details("Alex", "*****@*****.**",
                                     "Test data test data")
     contact_us.press_submit()
     assert ContactUsSuccessPage(chrome).loaded()
Exemple #9
0
 def purchase_gift_certificate(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     gift = GiftCertificate(chrome)
     gift.load(device)
     gift.fill_certificate_data("green235", "*****@*****.**",
                                "green657", "*****@*****.**")
     gift.chose_certificate_theme()
     gift.click_gift_checkbox()
     gift.click_continue()
     assert PurchaseSuccessful(chrome).available()
Exemple #10
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     registration = RegisterAccountPage(chrome)
     registration.load(device)
     person = Person()
     registration.fill_personal_details(person.name(), person.last_name(),
                                        person.email(), person.telephone())
     registration.fill_password(person.password())
     registration.press_continue()
     assert RegistrationSuccessPage(chrome).available()
Exemple #11
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     product_page = ProductPage(chrome, "33", "Samsung SyncMaster 941BW")
     product_page.open(device)
     product_page.open_review_link()
     review_tab = Review(chrome)
     review_tab.type_name("AutoTestBot")
     review_tab.type_review("This review has been wrote by auto test bot!")
     review_tab.choose_rating(Rating.THREE)
     review_tab.press_continue()
     assert review_tab.successfully_added()
Exemple #12
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     registration = RegisterAccountPage(chrome)
     random_email = EmailsGeneration()
     registration.open(device)
     registration.fill_personal_details(
         "Jon", "Doe", random_email.creating_full_email(), "123456"
     )
     registration.fill_password("supersecret")
     registration.press_continue()
     assert RegistrationSuccessPage(chrome).loaded()
Exemple #13
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     returns = ReturnsPage(chrome)
     returns.load(device)
     returns.fill_personal_details("Alex", "Alekseev",
                                   "*****@*****.**", "123456")
     returns.fill_order_details("214", "12-03-2019")
     returns.fill_product_details("iMac", "892123", "1",
                                  "New item has some scratches")
     returns.choose_reason_and_condition(Reason.FAULTY, Condition.NEW)
     returns.press_submit()
     assert ReturnsSuccessPage(chrome).available()
Exemple #14
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     registration = RegisterAffiliatePage(chrome)
     registration.open(device)
     registration.fill_personal_details("Jon", "Doe", "*****@*****.**",
                                        "123456112")
     registration.press_pay_method()
     registration.fill_information("one company", "www.website.com",
                                   "2332153467", "*****@*****.**")
     registration.fill_password("54321qwertyui")
     registration.press_continue()
     assert RegAffiliateSuccessPage(chrome).loaded()
Exemple #15
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     registration = RegisterAffiliatePage(chrome)
     person = Person()
     registration.load(device)
     registration.fill_personal_details(person.name(), person.last_name(),
                                        person.email(), person.telephone())
     registration.press_pay_method()
     registration.fill_information(person.full_name(),
                                   f"www.{person.username()}.com",
                                   "2332153467", person.email())
     registration.fill_password(person.password())
     registration.press_continue()
     assert RegAffiliateSuccessPage(chrome).available()
Exemple #16
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     brands_page = BrandsPage(chrome)
     brands_page.load(device)
     brands_page.click_brand_name(BrandList.APPLE)
     assert BrandPage(chrome, "8", "Apple").available()
Exemple #17
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     product_page = ProductPage(chrome, "41", "IMac")
     product_page.open(device)
     product_page.information_block().open_brand_page()
     assert BrandPage(chrome, "8", "Apple").loaded()
Exemple #18
0
 def test(self, grid: str, device: Device) -> None:
     chrome: Remote = Chrome(grid)
     product_page = ProductPage(chrome, "41", "iMac")
     product_page.load(device)
     product_page.open_product_image()
     assert product_page.is_open_image()