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)
Example #2
0
    def test_click_button_logged_in_stub_trainers(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Тренажёр"):
            url_get.go_physics_7_grade_trainers()
        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_trainers(self):
        driver = self.driver
        step_user = PaidLesson(driver)
        url_get = URLPaidLesson(driver)

        with allure.step("Перейти на страницу урока во вкалдку Тренажёры"):
            url_get.go_physics_7_grade_trainers()
        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'