Ejemplo n.º 1
0
 public void addMinimalInfo(Employee employee)
 {
     //заполнение минимальных полей
     pages.personalInfoPage.ensurePageLoaded();
     pages.personalInfoPage.setLastnameField(employee.lastname);
     pages.personalInfoPage.setNameField(employee.name);
     pages.personalInfoPage.setStatusField(employee.status);
 }
 public void Edit_Employee_Relatives_Validation(Employee invalidEmployee)
 {
     //Очистка основной информации
     app.employeeHelper.clearRelatives();
     //Редактирование
     app.employeeHelper.editRelatives(invalidEmployee);
     //проверка текста валидации
     Assert.AreEqual(app.userHelper.EMPTYINPUTMSG, app.userHelper.getValidationMessage());
 }
 public void Edit_AddressRegistration(Employee employee)
 {
     app.employeeHelper.clearAddressRegistration();
     //Редактирование
     app.employeeHelper.editAddressRegistration(employee);
     //создание тестового юзера для сравнения
     Employee testEmployee = app.employeeHelper.getAddressRegistration();
     //Проверка соответствия двух пользователей.
     Assert.IsTrue(app.employeeHelper.CompareAddressRegistration(employee, testEmployee));
 }
 public void Create_Employee_Documents(Employee employee)
 {
     //клик по кнопке добавления
     app.userHelper.clickAddButton();
     //Добавление пользователя
     app.employeeHelper.createEmployeeDocuments(employee);
     //создание тестового юзера для сравнения
     Employee testEmployee = app.employeeHelper.getDocumentPopup(employee.typeDoc);
     //Проверка соответствия двух пользователей.
     Assert.IsTrue(app.employeeHelper.CompareDocuments(employee, testEmployee));
 }
Ejemplo n.º 5
0
 public void Edit_Employee_Skills_Validation()
 {
     //Очистка основной информации
     app.employeeHelper.clearSkills();
     Employee invalidEmployee = new Employee();
     invalidEmployee.skillDescription = "abrakadabra";
     //Редактирование
     app.employeeHelper.editSkills(invalidEmployee);
     //проверка текста валидации
     Assert.AreEqual(app.userHelper.EMPTYINPUTMSG, app.userHelper.getValidationMessage());
 }
 public void Edit_Employee_Contacts_Validation_Sudjest()
 {
     //Очистка основной информации
     app.employeeHelper.clearContacts();
     Employee test = new Employee();
     test.conType = "abrakadabra";
     //Редактирование
     app.employeeHelper.editContacts(test);
     //проверка текста валидации
     Assert.AreEqual(app.userHelper.EMPTYSUDJESTMSG, app.userHelper.getValidationMessage());
 }
        public void Create_Employee_AddressRegistration(Employee employee)
        {
            //клик по кнопке добавления
            app.userHelper.clickAddButton();
            //Добавление пользователя
            app.employeeHelper.createEmployeeAddressRegistration(employee);

            //создание тестового юзера для сравнения
            Employee testEmployee = app.employeeHelper.getAddressRegistration();

            //Проверка соответствия двух пользователей.
            Assert.IsTrue(app.employeeHelper.CompareAddressRegistration(employee, testEmployee));
        }
Ejemplo n.º 8
0
        public void Edit_Skills(Employee employee)
        {
            app.employeeHelper.clearSkills();
            //Редактирование
            app.employeeHelper.editSkills(employee);

            //создание тестового юзера для сравнения
            Employee testEmployee = app.employeeHelper.getSkills();

            //Проверка соответствия двух пользователей.

            Assert.IsTrue(app.employeeHelper.CompareSkills(employee, testEmployee));
        }
        public void Edit_GeneralInfo(Employee employee)
        {
            //Очистка основной информации
            app.employeeHelper.clearGeneralInfo();
            //Редактирование
            app.employeeHelper.editGeneralInfo(employee);

            //создание тестового юзера для сравнения
            Employee testEmployee = app.employeeHelper.getGeneralInfo();

            //Проверка соответствия двух пользователей.

            Assert.IsTrue(app.employeeHelper.CompareGeneralInfo(employee, testEmployee));
        }
        public void Edit_Relatives(Employee employee)
        {
            app.employeeHelper.clearRelatives();
            //Редактирование
            app.employeeHelper.editRelatives(employee);

            //создание тестового юзера для сравнения
            Employee testEmployee = app.employeeHelper.getRelatives();

            //Проверка соответствия двух пользователей.

            Assert.IsTrue(app.employeeHelper.CompareRelatives(employee, testEmployee));
            employee.WriteToConsole();
            testEmployee.WriteToConsole();
        }
        public void Compare_Image_OffUser()
        {
            //клик по кнопке добавления
            app.userHelper.clickAddButton();

            Employee employee = new Employee();
            employee.lastname = "Попап";
            employee.name = "Увольнения";
            //Добавление пользователя
            app.employeeHelper.createEmployee(employee);

            //клик по кнопке удалить карточку сотрудника
            app.employeeHelper.openPersonalPopup("Уволить сотрудника");
            //Проверка скриншота удалить карточку сотрудника
            Assert.IsTrue(app.screenHelper.OffEmployeePopupScreen());
        }
Ejemplo n.º 12
0
        public void editContacts(Employee employee)
        {
            //заполнение полей контакты

            pages.contactsPage.ensurePageLoaded();
            pages.contactsPage.setContactField(employee.conType);
            pages.contactsPage.setValueField(employee.conValue);
            pages.contactsPage.setDescriptionField(employee.conDescription);
            pages.contactsPage.saveClick();
        }
Ejemplo n.º 13
0
        public void editAddressRegistration(Employee employee)
        {
            //заполнение полей адрес регистрации
            pages.addressRegistrationPage.ensurePageLoaded();
            pages.addressRegistrationPage.setCountryField(employee.arcountry);
            pages.addressRegistrationPage.setPostalCodeField(employee.arpostcode);
            pages.addressRegistrationPage.setRegionField(employee.arregion);
            pages.addressRegistrationPage.setCityField(employee.arcity);
            pages.addressRegistrationPage.setStreetField(employee.arstreet);
            pages.addressRegistrationPage.setHouseField(employee.arhouse);
            pages.addressRegistrationPage.setBlockField(employee.arblock);
            pages.addressRegistrationPage.setBuildingField(employee.arbuilding);
            pages.addressRegistrationPage.setFlatField(employee.arflat);
            pages.addressRegistrationPage.setRegistrationDateField(employee.arregistrationdate);
            pages.addressRegistrationPage.saveClick();

            refreshpage();
        }
Ejemplo n.º 14
0
        public void editEducation(Employee employee)
        {
            //заполнение основных полей
            pages.educationPopup.setTypeField(employee.typeEdu);
            pages.educationPopup.setUniversityField(employee.universityEdu);
            pages.educationPopup.setYearField(employee.yearEdu);
            pages.educationPopup.setSpecialityField(employee.specialityEdu);
            pages.educationPopup.setDiplomaField(employee.diplomaNumberEdu);
            pages.educationPopup.setQualificationField(employee.qualificationEdu);
            pages.educationPopup.setDescriptionField(employee.descriptionEdu);
            pages.educationPopup.saveClick();

            pages.educationPage.saveClick();

            refreshpage();
        }
Ejemplo n.º 15
0
        public void editDocuments(Employee employee)
        {
            //заполнение полей документы
            pages.passportPopup.ensurePageLoaded();
            pages.passportPopup.setSeriesField(employee.seriesDoc);

            if (employee.typeDoc != "ИНН" || employee.typeDoc != "СНИЛС")
            {
                pages.passportPopup.setAuthorField(employee.authorDoc);
            }
            if (employee.typeDoc == "Паспорт")
            {
                pages.passportPopup.setCodeField(employee.codeDoc);
            }

            pages.passportPopup.setDescriptionField(employee.descriptionDoc);
            pages.passportPopup.setDateField(employee.dateDoc);
            pages.passportPopup.saveClick();

            pages.documentsPage.ensurePageLoaded();
            pages.documentsPage.saveClick();

            refreshpage();
        }
Ejemplo n.º 16
0
 public void editSkills(Employee employee)
 {
     //заполнение полей навыки
     pages.skillsPage.ensurePageLoaded();
     pages.skillsPage.setNameField(employee.skillName);
     pages.skillsPage.setLevelField(employee.skillLevel);
     pages.skillsPage.setDescriptionField(employee.skillDescription);
     pages.skillsPage.saveClick();
 }
Ejemplo n.º 17
0
 public bool CompareAddressRegistration(Employee E1, Employee E2)
 {
     E1.WriteToConsole();
     E2.WriteToConsole();
     return E1.arblock == E2.arblock
          && E1.arbuilding == E2.arbuilding
          && E1.arcity == E2.arcity
          && E1.arcountry == E2.arcountry
          && E1.arflat == E2.arflat
          && E1.arhouse == E2.arhouse
          && E1.arpostcode == E2.arpostcode
          && E1.arregion == E2.arregion
          && E1.arregistrationdate == E2.arregistrationdate
          && E1.arstreet == E2.arstreet;
 }
Ejemplo n.º 18
0
        public Employee getGeneralInfo()
        {
            refreshpage();
            //получение всей основной информации
            pages.personalInfoPage.ensurePageLoaded();
            Employee employee = new Employee();
            employee.lastname = pages.personalInfoPage.getLastnameField();
            employee.name = pages.personalInfoPage.getNameField();
            employee.patronymic = pages.personalInfoPage.getPatronymicField();
            employee.birthday = pages.personalInfoPage.getBirthdayField();
            employee.sex = pages.personalInfoPage.getSexField();
            employee.status = pages.personalInfoPage.getStatusField();
            employee.employeeNumber = pages.personalInfoPage.getEmployeeNumberField();
            employee.nationality = pages.personalInfoPage.getNationalityField();
            employee.bornplace = pages.personalInfoPage.getBornPlaceField();
            employee.maritalstatus = pages.personalInfoPage.getMaritalField();

            return employee;
        }
Ejemplo n.º 19
0
 public void createEmployeeEducation(Employee employee)
 {
     //заполнение минимальных полей
     addMinimalInfo(employee);
     //открытие попапа образование
     openNewEducationPopup();
     //редактирование полей образование
     editEducation(employee);
 }
Ejemplo n.º 20
0
        public Employee getEducation()
        {
            //получение всей информации о документах
            pages.educationPage.ensurePageLoaded();
            //переход к первой записи.
            pages.educationPage.openEducationPopup();
            pages.educationPopup.ensurePageLoaded();

            Employee employee = new Employee();
            employee.specialityEdu = pages.educationPopup.getSpecialityEdu();
            employee.typeEdu = pages.educationPopup.getTypeEdu();
            employee.universityEdu = pages.educationPopup.getUniversityEdu();
            employee.yearEdu = pages.educationPopup.getYearEdu();
            employee.diplomaNumberEdu = pages.educationPopup.getDiplomaNumber();
            employee.qualificationEdu = pages.educationPopup.getQualification();
            employee.descriptionEdu = pages.educationPopup.getDescription();

            pages.educationPopup.closePopup();
            return employee;
        }
Ejemplo n.º 21
0
        //пока идет проверка только рабочего статуса
        public Employee getEmployeefromTable()
        {
            pages.employeesPage.ensurePageLoaded();
            Employee employee = new Employee();
            employee.status = pages.employeesPage.getStatus();
            employee.maritalstatus = pages.employeesPage.getMaritalStatus();
            employee.sex = pages.employeesPage.getSex();
            employee.department = pages.employeesPage.getDepartment();

            return employee;
        }
Ejemplo n.º 22
0
 public void editGeneralInfo(Employee employee)
 {
     //заполнение полей основной информации
     pages.personalInfoPage.ensurePageLoaded();
     pages.personalInfoPage.setLastnameField(employee.lastname);
     pages.personalInfoPage.setNameField(employee.name);
     pages.personalInfoPage.setPatronymicField(employee.patronymic);
     pages.personalInfoPage.setBirthdayField(employee.birthday);
     pages.personalInfoPage.setStatusField(employee.status);
     pages.personalInfoPage.setSexField(employee.sex);
     pages.personalInfoPage.setEmployeeNumberField(employee.employeeNumber);
     pages.personalInfoPage.setNationalityField(employee.nationality);
     pages.personalInfoPage.setBornPlaceField(employee.bornplace);
     pages.personalInfoPage.setMaritalField(employee.maritalstatus);
     pages.personalInfoPage.saveClick();
 }
Ejemplo n.º 23
0
 public Employee getContacts()
 {
     refreshpage();
     //получение всей информации о контактах
     pages.contactsPage.ensurePageLoaded();
     Employee employee = new Employee();
     employee.conType = pages.contactsPage.getContactField();
     employee.conValue = pages.contactsPage.getValueField();
     employee.conDescription = pages.contactsPage.getDescriptionField();
     return employee;
 }
Ejemplo n.º 24
0
        public Employee getAddressRegistration()
        {
            //получение всей информации об адресе регистрации
            pages.addressRegistrationPage.ensurePageLoaded();
            Employee employee = new Employee();
            employee.arblock = pages.addressRegistrationPage.getBlockField();
            employee.arbuilding = pages.addressRegistrationPage.getBuildingField();
            employee.arcity = pages.addressRegistrationPage.getCityField();
            employee.arcountry = pages.addressRegistrationPage.getCountryField();
            employee.arflat = pages.addressRegistrationPage.getFlatField();
            employee.arhouse = pages.addressRegistrationPage.getHouseField();
            employee.arpostcode = pages.addressRegistrationPage.getPostalCodeField();
            employee.arregion = pages.addressRegistrationPage.getRegionField();
            employee.arregistrationdate = pages.addressRegistrationPage.getregistrationDateField();
            employee.arstreet = pages.addressRegistrationPage.getStreetField();

            return employee;
        }
Ejemplo n.º 25
0
        public void createEmployeeSkills(Employee employee)
        {
            //заполнение минимальных полей
            addMinimalInfo(employee);

            //редактирование полей образование
            editSkills(employee);
        }
Ejemplo n.º 26
0
 public Employee getRelatives()
 {
     refreshpage();
     //получение всей информации о родственниках
     pages.relativesPage.ensurePageLoaded();
     Employee employee = new Employee();
     employee.relation = pages.relativesPage.getRelationField();
     employee.relLastName = pages.relativesPage.getLastnameField();
     employee.relName = pages.relativesPage.getNameField();
     employee.relPatronymic = pages.relativesPage.getPatronymicField();
     employee.relBirthday = pages.relativesPage.getBirthdayField();
     //employee.relSex = pages.relativesPage.getSexField();
     return employee;
 }
Ejemplo n.º 27
0
        public void createEmployeeRelatives(Employee employee)
        {
            //заполнение минимальных полей
            addMinimalInfo(employee);

            //редактирование полей родственников
            editRelatives(employee);
        }
Ejemplo n.º 28
0
        public Employee getSkills()
        {
            refreshpage();
            //получение всей информации о навыках
            pages.skillsPage.ensurePageLoaded();

            Employee employee = new Employee();
            employee.skillDescription = pages.skillsPage.getDescriptionField();
            employee.skillLevel = pages.skillsPage.getLevelField();
            employee.skillName = pages.skillsPage.getNameField();
            return employee;
        }
Ejemplo n.º 29
0
        /*
        public Employee getDocumentsTable()
        {
           //получение всей информации о документах
            pages.documentsPage.ensurePageLoaded();
            Employee employee = new Employee();
            employee.typeDoc = pages.documentsPage.getTypeField();
            employee.seriesDoc = pages.documentsPage.getDataField();
            employee.dateDoc = pages.documentsPage.getDateField();

            return employee;
        }*/
        public Employee getDocumentPopup(string docType)
        {
            //получение всей информации о документах
            pages.documentsPage.ensurePageLoaded();
            pages.documentsPage.openDocumentPopup(docType);

            //переход к первой записи.
            pages.passportPopup.ensurePageLoaded();
            Employee employee = new Employee();
            employee.dateDoc = pages.passportPopup.getDateField();
            employee.seriesDoc = pages.passportPopup.getSeriesField();

            if (docType == "Паспорт")
            {
                employee.codeDoc = pages.passportPopup.getCodeField();
            }

            if (docType != "ИНН" || docType != "СНИЛС")
            {
                employee.authorDoc = pages.passportPopup.getAuthorField();
            }

            employee.descriptionDoc = pages.passportPopup.getDescriptionField();
            employee.typeDoc = pages.passportPopup.getHeaderField();

            pages.passportPopup.closePopup();
            return employee;
        }
Ejemplo n.º 30
0
 public void editRelatives(Employee employee)
 {
     //заполнение полей родство
     pages.relativesPage.ensurePageLoaded();
     pages.relativesPage.setRelationField(employee.relation);
     pages.relativesPage.setLastnameField(employee.relLastName);
     pages.relativesPage.setNameField(employee.relName);
     pages.relativesPage.setPatronymicField(employee.relPatronymic);
     pages.relativesPage.setBirthdayField(employee.relBirthday);
     //pages.relativesPage.setSexField(employee.relSex);
     pages.relativesPage.saveClick();
 }