Esempio n. 1
0
 def test_creating_a_test_from_a_profile(self, browser):
     link = "http://cedravium.ru/#/"
     self.page = LoginPage(browser, link)
     self.create = CreateTestsPage(browser, link)
     self.page.open()
     self.page.go_to_profile_page()
     self.create.button_create_tests()
def test_login(browser):
    link = 'http://cedravium.ru/#/'
    login = LoginPage(browser, link)
    login.open()
    login.go_to_sign_up_page()
    login.should_be_login_form()
    login.should_be_register_form()
 def test_log_out(self, browser):
     link = "http://cedravium.ru/#/"
     self.login_page = LoginPage(browser, link)
     self.login_page.open()
     self.login_page.should_be_login_page()
     self.login_page.go_to_home_page()
     self.login_page.go_to_profile()
     self.login_page.log_out()
Esempio n. 4
0
 def test_delete_test(self, browser):
     link = "http://cedravium.ru/#/"
     self.page = LoginPage(browser, link)
     self.edit = CreateTestsPage(browser, link)
     self.page.open()
     self.page.go_to_profile_page()
     self.edit.edit_test()
     self.edit.delete_test()
     self.page.go_to_home_page()
 def test_incorrect_email_sign_in_user(self, browser):
     link = "http://cedravium.ru/#/"
     self.login_page = LoginPage(browser, link)
     self.login_page.open()
     self.login_page.should_be_login_url()
     fake = faker.Faker()
     email = fake.email()
     self.login_page.user_authorization(email)
     self.login_page.failed_authorization()
 def test_incorrect_password_sign_in_user(self, browser):
     link = "http://cedravium.ru/#/"
     self.login_page = LoginPage(browser, link)
     self.login_page.open()
     self.login_page.should_be_login_url()
     fake = faker.Faker()
     password = fake.password()
     email = '*****@*****.**'
     self.login_page.user_authorization(email, password)
     self.login_page.failed_authorization()
 def test_registration_new_user(self, browser):
     link = "http://cedravium.ru/#/auth"
     self.login_page = LoginPage(browser, link)
     self.base_page = BasePage(browser, link)
     self.login_page.open()
     self.login_page.should_be_register_form()
     fake = faker.Faker()
     email = fake.email()
     login = "******"
     password = self.login_page.random_password_generator()
     self.login_page.register_new_user(login, email, password)
     self.login_page.go_to_home_page()
     self.base_page.should_be_authorized_user()
Esempio n. 8
0
class TestCreateTests:
    def test_creating_a_test_from_a_profile(self, browser):
        link = "http://cedravium.ru/#/"
        self.page = LoginPage(browser, link)
        self.create = CreateTestsPage(browser, link)
        self.page.open()
        self.page.go_to_profile_page()
        self.create.button_create_tests()

    '''
    Пример с заполнение всех полей случайнымы значениями
    '''

    def test_filling_in_the_test_with_random_data(self, browser):
        self.test_creating_a_test_from_a_profile(browser)
        self.create = CreateTestsPage(browser, '')
        self.create.filling_in_data_tests(length=10)
        self.create.adding_description(length=1000)
        self.create.adding_one_of_the_list_test()
        self.create.filling_questions(length=10)
        self.create.filling_answers_all_random(length=20)
        self.create.response_selecting()
        self.create.create_test()

    def test_filling_test_with__data(self, browser):
        pass

    def test_delete_test(self, browser):
        link = "http://cedravium.ru/#/"
        self.page = LoginPage(browser, link)
        self.edit = CreateTestsPage(browser, link)
        self.page.open()
        self.page.go_to_profile_page()
        self.edit.edit_test()
        self.edit.delete_test()
        self.page.go_to_home_page()
 def test_sign_in_user(self, browser):
     link = "http://cedravium.ru/#/"
     self.login_page = LoginPage(browser, link)
     self.login_page.open()
     self.login_page.should_be_login_page()
     self.login_page.go_to_home_page()
class TestAuthorization:
    def test_sign_in_user(self, browser):
        link = "http://cedravium.ru/#/"
        self.login_page = LoginPage(browser, link)
        self.login_page.open()
        self.login_page.should_be_login_page()
        self.login_page.go_to_home_page()

    def test_log_out(self, browser):
        link = "http://cedravium.ru/#/"
        self.login_page = LoginPage(browser, link)
        self.login_page.open()
        self.login_page.should_be_login_page()
        self.login_page.go_to_home_page()
        self.login_page.go_to_profile()
        self.login_page.log_out()

    def test_incorrect_email_sign_in_user(self, browser):
        link = "http://cedravium.ru/#/"
        self.login_page = LoginPage(browser, link)
        self.login_page.open()
        self.login_page.should_be_login_url()
        fake = faker.Faker()
        email = fake.email()
        self.login_page.user_authorization(email)
        self.login_page.failed_authorization()

    def test_incorrect_password_sign_in_user(self, browser):
        link = "http://cedravium.ru/#/"
        self.login_page = LoginPage(browser, link)
        self.login_page.open()
        self.login_page.should_be_login_url()
        fake = faker.Faker()
        password = fake.password()
        email = '*****@*****.**'
        self.login_page.user_authorization(email, password)
        self.login_page.failed_authorization()