def test(self):
        main_page = MainPage(self.driver)
        form = main_page.reg_form
        open_reg_form(self, main_page, form)
        form.clear_inputs()

        # Cyrillic name
        set_input(self.driver, form.NAME, self.CYRILLIC_NAME)
        form.submit()
        form.check_error_msg_for(form.NAME_ERROR, self, None)
        form.clear_inputs()

        # Short name
        set_input(self.driver, form.NAME, self.SHORT_NAME)
        form.submit()
        form.check_error_msg_for(form.NAME_ERROR, self, None)
        form.clear_inputs()

        # BACKEND checks
        ## Long name
        form.set_correct_values()
        set_input(self.driver, form.NAME, self.LONG_NAME)
        form.submit()
        form.check_error_msg_for(form.BACKEND_ERROR, self, BACKEND_ERROR)
        form.clear_inputs()
    def test(self):
        main_page = MainPage(self.driver)
        reg_form = main_page.reg_form
        open_reg_form(self, main_page, reg_form)

        reg_form.click_on(reg_form.ACCOUNT_ALREADY)

        login_form = main_page.login_form
        login_form.check_for_self(self)
Exemple #3
0
    def test(self):
        main_page = MainPage(self.driver)
        form = main_page.reg_form
        open_reg_form(self, main_page, form)

        set_input(self.driver, form.PASSWORD, self.CORRECT_PASS)
        set_input(self.driver, form.PASSWORD2, self.INCORRECT_PASS)
        form.submit()
        form.check_error_msg_for(form.PASSWORD_ERROR, self,
                                 self.PASSWORD_ERROR)
Exemple #4
0
	def test(self):
		main_page = MainPage(self.driver)
		form = main_page.reg_form
		open_reg_form(self, main_page, form)

		bad_cases = [self.SHORT_NAME, self.DOMAIN_ONLY]
		good_cases = [self.CYRILLIC_NAME, self.LONG_NAME, self.NUMERIC_NAME, self.BAD_DOMAIN1, self.BAD_DOMAIN2, self.BAD_NAME1, self.BAD_NAME2]

		for case in bad_cases:
			set_input(self.driver, form.EMAIL, case)
			form.submit()
			form.check_error_msg_for(form.EMAIL_ERROR, self, self.EMAIL_ERROR)

		for case in good_cases:
			set_input(self.driver, form.EMAIL, case)
			form.submit()
			form.check_error_msg_for(form.EMAIL_ERROR, self, None)
Exemple #5
0
    def test(self):
        main_page = MainPage(self.driver)
        form = main_page.reg_form
        open_reg_form(self, main_page, form)

        # All fields empty
        form.submit()
        form.check_error_msg_for(form.NAME_ERROR, self, self.EMPTY_NAME_ERROR)
        form.check_error_msg_for(form.LOGIN_ERROR, self,
                                 self.EMPTY_LOGIN_ERROR)
        form.check_error_msg_for(form.EMAIL_ERROR, self,
                                 self.EMPTY_EMAIL_ERROR)
        form.check_error_msg_for(form.PASSWORD_ERROR, self,
                                 self.EMPTY_PASSWORD_ERROR)

        # Second password empty
        set_input(self.driver, form.PASSWORD, self.TMP_PASSWORD)
        form.submit()
        form.check_error_msg_for(form.PASSWORD_ERROR, self,
                                 self.EMPTY_PASSWORD2_ERROR)
Exemple #6
0
    def test(self):
        main_page = MainPage(self.driver)
        form = main_page.reg_form
        open_reg_form(self, main_page, form)

        inputs = [
            [form.NAME, self.NAME],
            [form.LOGIN, self.LOGIN],
            [form.EMAIL, self.EMAIL],
            [form.PASSWORD, self.PASSWORD],
            [form.PASSWORD2, self.PASSWORD],
        ]

        for i in inputs:
            set_input(self.driver, i[0], i[1])

        form.submit()
        form.check_if_dissappeared()

        main_page.check_for_self(self)
        main_page.check_for_login(self, self.LOGIN)
    def test(self):
        main_page = MainPage(self.driver)
        form = main_page.reg_form
        open_reg_form(self, main_page, form)
        form.clear_inputs()

        # Cyrillic name
        set_input(self.driver, form.LOGIN, self.CYRILLIC_NAME)
        form.submit()
        form.check_error_msg_for(form.LOGIN_ERROR, self, self.LOGIN_ERROR)
        form.clear_inputs()

        # Cyrillic with numbers name
        set_input(self.driver, form.LOGIN, self.CYRILLIC_WITH_NUMBERS_NAME)
        form.submit()
        form.check_error_msg_for(form.LOGIN_ERROR, self, self.LOGIN_ERROR)
        form.clear_inputs()

        # Short name
        set_input(self.driver, form.LOGIN, self.SHORT_NAME)
        form.submit()
        form.check_error_msg_for(form.LOGIN_ERROR, self, self.LOGIN_ERROR)
        form.clear_inputs()

        # Numeric name
        set_input(self.driver, form.LOGIN, self.NUMERIC_NAME)
        form.submit()
        form.check_error_msg_for(form.LOGIN_ERROR, self, None)
        form.clear_inputs()

        # Long name (BACKEND check)
        form.set_correct_values()
        set_input(self.driver, form.LOGIN, self.LONG_NAME)
        form.submit()
        form.check_error_msg_for(form.BACKEND_ERROR, self, BACKEND_ERROR)
        form.clear_inputs()
Exemple #8
0
 def test(self):
     main_page = MainPage(self.driver)
     form = main_page.reg_form
     open_reg_form(self, main_page, form)