def test_simulator_passed_in_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     user_steps = PaymNotYandexRu(driver)
     popup_steps = PopupSignIn(driver)
     steps_exercise = Exercise(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_physics_7_grade_trainers()
     with allure.step("Нажать на кнопку Пройти"):
         steps_exercise.go_exercise()
     with allure.step("Начать отвечать на ответы в Тренажере"):
         steps_exercise.test()
     with allure.step("Нажать на кнопку Завершить"):
         steps_exercise.click_button_finish()
     with allure.step("Пройденный Тренажёр помечается как Пройден"):
         self.assertEquals(
             u"Пройден",
             self.driver.find_element_by_css_selector(
                 "span.result-mark.good").text)
     with allure.step(
             "После пройденного Тренажёра название кнопки Пройти поменялась на Повторить"
     ):
         self.assertEquals(
             u"Повторить",
             self.driver.find_element_by_xpath("//li/div[2]/span/a").text)
Esempio n. 2
0
 def test_user_ask_question_In_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     popup_steps = PopupSignIn(driver)
     user_steps = PaymNotYandexRu(driver)
     user = PagePaidLessonQuestion(driver)
     get_url = URLPaidLesson(driver)
     delete_steps = Cycles(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_questions()
     with allure.step("Удалить существующие вопросы в списке"):
         delete_steps.delete_all_question()
     with allure.step("Ввести текст в поле ввода Привет Rich"):
         user.ask_question()
     with allure.step("Нажать на кнопку Отправить"):
         user.post_question()
     with allure.step("Проверяю отображение опубликованного в списке Вопроса"):
         # self.assertEqual(u"Привет Rich", self.driver.find_element_by_css_selector("p.comment__text").text)
         self.assertEquals(u"Привет Rich", self.driver.find_element_by_css_selector("p.comment__text").text)
 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)
Esempio n. 4
0
 def test_user_write_comment_in_pay_lesson(self):
     driver = self.driver
     main_steps = MainPage(driver)
     user_steps = PaymNotYandexRu(driver)
     popup_steps = PopupSignIn(driver)
     user = PagePaidLessonComment(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(
             "Перейти на урок =Урок 17. Вопрос 3. Выполняйте проверку в уравнениях и неравенствах."
     ):
         get_url.go_algebra_11_grade_comment()
     with allure.step("На странице урока нажать на кнопку Комментарии"):
         user.click_link_comments()
     with allure.step("Ввести текст в поле ввода Привет Rich"):
         user.write_comment()
     with allure.step("Нажать на кнопку Отправить"):
         user.post_comment()
     with allure.step(
             "Проверяю отображение опубликованного в списке комментария"):
         self.assertEquals(
             u"Привет Rich",
             self.driver.find_element_by_css_selector(
                 "p.comment__text").text)
     with allure.step("Удалить опубликованный комментарий"):
         user.delete_comment()
    def test_click_button_value_lesson(self):
        driver = self.driver
        step_user = Value(driver)
        url_get = URLPaidLesson(driver)

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

        with allure.step("Перейти на страницу урока во вкалдку Вопросы к уроку"):
            url_get.go_chemistry_8_grade_questions()
        with allure.step("Нажать на кнопку Комментировать"):
            step_user.click_button_comment()
        with allure.step("Поп-ап Регистрации появился"):
            self.assertEquals(u"Зарегистрируйтесь",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").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)
Esempio n. 8
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_test(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Тесты"):
            url_get.go_algebra_8_grade_test()
        with allure.step("Нажать на кнопку Оплатить абонемент"):
            step_user.click_button_buy_ticket_in_stubs()
        with allure.step("П редиректнуло на страницу оплаты"):
            self.driver.switch_to_window(driver.window_handles[3])
            assert self.driver.current_url == 'https://staging.interneturok.ru/payment'
    def test_click_button_send_in_tab_comment(self):
        driver = self.driver
        step_user = PagePaidLessonComment(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока"):
            url_get.go_algebra_8_grade_test()
        with allure.step("Нажать на кнопку Комментарии"):
            step_user.click_link_comments()
        with allure.step("Нажать на кнопку Отправить"):
            step_user.click_button_send()
        with allure.step("Поп-ап Авторизации появился"):
            self.assertEquals(u"Войдите в профиль",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
    def test_click_input_field_in_note(self):
        driver = self.driver
        step_user = Notes(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока"):
            url_get.go_algebra_8_grade_test()
        with allure.step("Нажать на кнопку Заметки"):
            step_user.open_notes()
        with allure.step("Кликнуть мышкой в поле ввода текста"):
            step_user.click_textarea()
        with allure.step("Поп-ап Авторизации появился"):
            self.assertEquals(u"Войдите в профиль",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
    def test_click_button_save_in_note(self):
        driver = self.driver
        step_user = Notes(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока"):
            url_get.go_algebra_8_grade_test()
        with allure.step("Нажать на кнопку Заметки"):
            step_user.open_notes()
        with allure.step("Нажать на кнопку Сохранить"):
            step_user.save_note()
        with allure.step("Поп-ап Авторизации появился"):
            self.assertEquals(u"Войдите в профиль",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
    def test_click_button_comment_in_tab_comments(self):
        driver = self.driver
        url_get = URLPaidLesson(driver)
        step_user = PagePaidLessonComment(driver)

        with allure.step("Перейти на страницу урока"):
            url_get.go_algebra_8_grade_test()
        with allure.step("Нажать на кнопку Комментарии"):
            step_user.click_link_comments()
        with allure.step("Нажать на кнопку Комментировать"):
            step_user.click_button_comment()
        with allure.step("Поп-ап Регистрации появился"):
            self.assertEquals(u"Зарегистрируйтесь",
                              self.driver.find_element_by_css_selector("h5.popup-header__title").text)
 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'