def test_user_note_in_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     user_steps = PaymNotYandexRu(driver)
     popup_steps = PopupSignIn(driver)
     notes_steps = Notes(driver)
     get_url = URLPaidLesson(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(
             "Перейти на урок =Химические элементы. Символы химических элементов"
     ):
         get_url.go_chemistry_8_grade_video()
     with allure.step("На странице урока нажать на виджет Заметка"):
         notes_steps.open_notes()
     with allure.step("В поле ввода ввести текст Hello"):
         notes_steps.write_note()
     with allure.step("Нажать на кнопку Сохранить"):
         notes_steps.save_note()
     with allure.step("Перейти в ЛК во вкладку Заметка"):
         notes_steps.go_to_profile()
     with allure.step("В ЛК отображается сохранённая Заметка"):
         self.assertEquals(
             "Hello",
             self.driver.find_element_by_css_selector(
                 "p.profile-content__note").text)
    def test_click_button_play_in_stub_video(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        get_url = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Видеоурок"):
            get_url.go_chemistry_8_grade_video()
        with allure.step("Нажать на кнопку Плей"):
            step_user.click_button_play_video()
        with allure.step("Поп-ап Регистрации Появился"):
            self.assertEquals(u"Зарегистрируйтесь",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
示例#3
0
    def test_click_button_logged_in_stub_video(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Видеоурок"):
            url_get.go_chemistry_8_grade_video()
        with allure.step("В заглушке нажать на кнопку Войти"):
            step_user.click_button_sign_in_stubs()
        with allure.step("Поп-ап Авторизации появился"):
            self.assertEquals(u"Войдите в профиль",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
    def test_click_button_buy_ticket_in_stub_video(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Видеоурок"):
            url_get.go_chemistry_8_grade_video()
        with allure.step("Нажать на кнопку Оплатить абонемент"):
            step_user.click_button_buy_ticket_in_stubs()
        with allure.step("П редиректнуло на страницу оплаты"):
            self.driver.switch_to_window(driver.window_handles[4])
            assert self.driver.current_url == 'https://staging.interneturok.ru/payment'
 def test_no_stub_in_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     popup_steps = PopupSignIn(driver)
     user_steps = PaymNotYandexRu(driver)
     get_url = URLPaidLesson(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(
             "Перейти на урок= Химические элементы. Символы химических элементов"
     ):
         get_url.go_chemistry_8_grade_video()
     with allure.step("Проверить отсуствия заглушки видеоурока"):
         self.assertFalse(
             self.is_element_present(By.CLASS_NAME, "video-blocker__body"))
 def test_yes_stub_in_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     popup_steps = PopupSignIn(driver)
     user_steps = AutopaymentMailRu(driver)
     get_url = URLPaidLesson(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(
             "Перейти на урок= Химические элементы. Символы химических элементов"
     ):
         get_url.go_chemistry_8_grade_video()
     with allure.step("Проверить присутствие заглушки видеоурока"):
         self.assertTrue(
             self.is_element_present(By.CSS_SELECTOR, "div.video-blocker"))
    def test_000_click_button_buy_ticket_in_stub_video(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)
        data_user = AutopaymentMailRu(driver)
        open_popup = MainPage(driver)
        click_enter = PopupSignIn(driver)

        with allure.step("Нажать на кнопку Войти"):
            open_popup.go_to_sgnIn()
        with allure.step("В поп-апе авторизации ввести email/password"):
            data_user.enter_email()
            data_user.enter_password()
        with allure.step("В поп-апе авторизации Нажать на кнопку Войти"):
            click_enter.click_button_login()
        with allure.step("Перейти на страницу урока во вкалдку Видеоурок"):
            url_get.go_chemistry_8_grade_video()
        with allure.step("Нажать на кнопку Оплатить абонемент"):
            step_user.click_button_buy_ticket_in_stubs()
        with allure.step("П редиректнуло на страницу оплаты"):
            self.driver.switch_to_window(driver.window_handles[1])
            assert self.driver.current_url == 'https://staging.interneturok.ru/payment'