Пример #1
0
 def test_user_reg_and_go_profile(self):
     driver = self.driver
     main_steps = MainPage(driver)
     popup_auth = PopupSignIn(driver)
     popup_reg = PopupRegistration(driver)
     user_steps = IuUseryopmail(driver)
     get_url = PageProfile(driver)
     with allure.step("Нажать на кнопку Войти"):
         main_steps.go_to_sgnIn()
     with allure.step("Перейти в поп-ап Регистрации"):
         popup_auth.go_to_popup_registration()
     with allure.step("Ввожу [email protected]/password=123456"):
         user_steps.reg_enter_email()
         user_steps.reg_enter_password()
     with allure.step("Нажать на кнопку Зарегистрироваться"):
         popup_reg.click_sign_up()
     with allure.step("Перейти в ЛК во вкладку /edit"):
         get_url.go_to_my_profile_edit()
     with allure.step(
             "В поле email отображается (почта[email protected]) зарегистрировшего пользователя"
     ):
         self.assertEqual(
             u"*****@*****.**",
             self.driver.find_element_by_css_selector(
                 "input.profile-input").get_attribute("value"))
 def test_user_auth_and_go_profile(self):
     driver = self.driver
     main_steps = MainPage(driver)
     popup_steps = PopupSignIn(driver)
     user_steps = AutopaymentMailRu(driver)
     get_url = PageProfile(driver)
     with allure.step("Нажать на кнопку Войти"):
         main_steps.go_to_sgnIn()
     with allure.step("Ввожу [email protected]/password=123456"):
         user_steps.enter_email()
         user_steps.enter_password()
     with allure.step("Нажать на кнопку Авторизоваться"):
         popup_steps.click_button_login()
     with allure.step("Перейти в ЛК во вкладку /edit"):
         get_url.go_to_my_profile_edit()
     with allure.step(
             "В поле email отображается (почта[email protected]) зарегистрировшего пользователя"
     ):
         self.assertEqual(
             u"*****@*****.**",
             self.driver.find_element_by_css_selector(
                 "input.profile-input").get_attribute("value"))
    def test_user_off_auto_payment(self):
        driver = self.driver
        main_steps = MainPage(driver)
        popup_steps = PopupSignIn(driver)
        user_steps = VratchGlavYandexRu(driver)
        profile_steps = PageProfile(driver)
        refresh_page = RefreshPage(driver)

        with allure.step("Нажать на кнопку Войти"):
            main_steps.go_to_sgnIn()
        with allure.step("Ввожу [email protected]/password=123456"):
            user_steps.enter_email()
            user_steps.enter_password()
        with allure.step("Нажать на кнопку Авторизоваться"):
            popup_steps.click_button_login()
        with allure.step("Перейти в ЛК"):
            profile_steps.go_to_my_profile()
        with allure.step(
                "В виджете абонемент нажать на кнопку Выкл автоплатёж"):
            profile_steps.click_button_off_autopayment()
        with allure.step(
                "В появившемся тултипе нажать на кнопку Отключить автопродление"
        ):
            profile_steps.click_in_popup1_off_autopayment()
        with allure.step(
                "В появившемся поп-апе нажать на кнопку Отключить автопродление"
        ):
            profile_steps.click_in_popup2_off_autopayment()
        with allure.step("Обновить страницу"):
            refresh_page.refresh()
        with allure.step(
                "В ЛК, в виджете абонемента статус автоплатежа поменялся на ВЫКЛ"
        ):
            self.assertEquals(
                u"Выкл.",
                self.driver.find_element_by_css_selector("a.link_dotted").text)
Пример #4
0
    def test_000_logged_user(self):
        StartInterneturokClassMethod = self.driver
        steps_main = MainPage(StartInterneturokClassMethod)
        steps_user = AutopaymentMailRu(StartInterneturokClassMethod)
        steps_popup = PopupSignIn(StartInterneturokClassMethod)
        go_profile = PageProfile(StartInterneturokClassMethod)

        steps_main.go_to_sgnIn()
        steps_user.enter_email()
        steps_user.enter_password()
        steps_popup.click_button_login()

        with allure.step("Перейти в мой профиль"):
            go_profile.go_to_my_profile()
        with allure.step("Нажать на кнопку Оплатить абонемент"):
            go_profile.click_button_buy_subscription()
Пример #5
0
    def test_buy_ticket_per_900_rubles(self):
        driver = self.driver
        steps_main = MainPage(driver)
        steps_user = PaymentnotMailRu(driver)
        steps_popup = PopupRegistration(driver)
        steps_in_profile = PageProfile(driver)
        refresh_page = RefreshPage(driver)

        with allure.step("Нажать на кнопку Войти"):
            steps_main.go_to_sgnIn()
        with allure.step("В поп-апе регистрации нажать Зарегистрироваться"):
            steps_popup.go_to_popup_registration()
        with allure.step("Ввожу [email protected]/password=123456"):
            steps_user.reg_enter_email()
            steps_user.reg_enter_password()
        with allure.step("Нажать на кнопку Зарегистрироваться"):
            steps_popup.click_sign_up()
        with allure.step("Перейти в мой профиль"):
            steps_in_profile.go_to_my_profile()
        with allure.step(
                "В ЛК, в виджете абонемент нажать на кнопку оплатить абонемент"
        ):
            steps_in_profile.click_button_buy_subscription()
        with allure.step("В поп-апе оплаты выбрать тариф 365 дней"):
            steps_in_profile.choose_subscription_365_day()
        with allure.step(
                "В поп-апе оплаты нажать на кнопку Оплатить абонемент"):
            steps_in_profile.popup_click_buy_subscription()
        with allure.step("На сайте ЯК ввести данные карты"):
            steps_in_profile.enter_data_card()
        with allure.step("Вернулся в Мой профиль"):
            steps_in_profile.go_to_my_profile()
        with allure.step("Обновить страницу"):
            refresh_page.refresh()
            assert (self.driver.find_element_by_css_selector(
                ".profile-abonement__row:nth-child(1)"))
        with allure.step(
                "В виджете отображается купленный абонемент с вкл автопродлением и тарифом 366 дней"
        ):
            self.assertIn(
                "Осталось:\n366 дней\nАвтопродление:\n\nВкл.\nПодробнее об абонементе Продлить абонемент",
                driver.find_element_by_css_selector(
                    "div.profile-abonement__body").text)
    def test_buy_ticket_per_100_rubles(self):
        driver = self.driver
        steps_main_page = MainPage(driver)
        steps_popup = PopupRegistration(driver)
        steps_user = PaymNotYandexRu(driver)
        steps_in_profile = PageProfile(driver)
        refresh_page = RefreshPage(driver)

        with allure.step("Нажать на кнопку Войти"):
            steps_main_page.go_to_sgnIn()
        with allure.step("В поп-апе регистрации нажать Зарегистрироваться"):
            steps_popup.go_to_popup_registration()
        with allure.step("Ввожу email/password = [email protected]"):
            steps_user.reg_enter_email()
            steps_user.reg_enter_password()
        with allure.step("Нажать на кнопку Зарегистрироваться"):
            steps_popup.click_sign_up()
        with allure.step("Перейти в мой профиль"):
            steps_in_profile.go_to_my_profile()
        with allure.step(
                "В ЛК, в виджете абонемент нажать на кнопку оплатить абонемент"
        ):
            steps_in_profile.click_button_buy_subscription()
        with allure.step("В поп-апе оплаты отключить автоплатеж"):
            steps_in_profile.popup_click_enable_autopayment()
        with allure.step(
                "В поп-апе оплаты нажать на кнопку Оплатить абонемент"):
            steps_in_profile.popup_click_buy_subscription()
        with allure.step("На сайте ЯК ввести данные карты"):
            steps_in_profile.enter_data_card()
        with allure.step("Вернулся в Мой профиль"):
            steps_in_profile.go_to_my_profile()
        with allure.step("Обновить страницу"):
            refresh_page.refresh()
            assert (self.driver.find_element_by_css_selector(
                ".profile-abonement__row:nth-child(1)"))
        with allure.step(
                "В виджете отображается купленный абонемент без автоплатежа с тарифом 31 день"
        ):
            self.assertIn(
                "Осталось:\n31 день\nАвтопродление:\nВыкл.\nПодробнее об абонементе Продлить абонемент",
                driver.find_element_by_css_selector(
                    "div.profile-abonement__body").text)
    def test_user_extend_subscription(self):
        driver = self.driver
        main_steps = MainPage(driver)
        popup_steps = PopupSignIn(driver)
        user_steps = PaymNotYandexRu(driver)
        profile_steps = PageProfile(driver)
        refresh_page = RefreshPage(driver)

        with allure.step("Нажать на кнопку Войти"):
            main_steps.go_to_sgnIn()
        with allure.step("Ввожу [email protected]/password=123456"):
            user_steps.enter_email()
            user_steps.enter_password()
        with allure.step("Нажать на кнопку Авторизоваться"):
            popup_steps.click_button_login()
        with allure.step("Перейти в ЛК"):
            profile_steps.go_to_my_profile()
        with allure.step(
                "В ЛК, в виджете абонемент нажать на кнопку продлить абонемент"
        ):
            profile_steps.click_extend_subscription()
        with allure.step("В поп-апе оплаты нажать на кнопку Оплатить"):
            profile_steps.popup_click_buy_subscription()
        with allure.step("На сайте ЯК ввести данные карты"):
            profile_steps.enter_data_card()
        with allure.step("Вернуться в ЛК"):
            profile_steps.go_to_my_profile()
        with allure.step("Обновить страницу"):
            refresh_page.refresh()
            assert (self.driver.find_element_by_css_selector(
                ".profile-abonement__row:nth-child(1)"))
        with allure.step(
                "После продления абонемента в виджете отображается дата 62 дня"
        ):
            self.assertIn(
                "Осталось:\n62 дня\nАвтопродление:\n\nВкл.\nПодробнее об абонементе Продлить абонемент",
                driver.find_element_by_css_selector(
                    "div.profile-abonement__body").text)