public void TestIniti()
        {
            this.TestInitialize();
            this.applicationMainPage   = new ApplicationMainPage(this.Driver);
            this.loginPage             = new LoginPage(this.Driver);
            this.loanParamPage         = new LoanParametersPage(this.Driver);
            this.personalDataPage      = new PersonalDataPage(this.Driver);
            this.addressPage           = new AddressPage(this.Driver);
            this.contactsPage          = new ContactsPage(this.Driver);
            this.additionalInfoPage    = new AdditionalInfoPage(this.Driver);
            this.creditsPage           = new OtherCreditsPage(this.Driver);
            this.incomePage            = new IncomePage(this.Driver);
            this.otherIncomePage       = new OtherIncomePage(this.Driver);
            this.homePage              = new HomePage(this.Driver);
            this.loanPaymentPage       = new LoanPaymentPage(this.Driver);
            this.printingDocumentsPage = new PrintingDocumentsPage(this.Driver);
            this.uploadDocumentsPage   = new UploadDocumentsPage(this.Driver);
            this.clientOpinionPage     = new ClientOpinionPage(this.Driver);
            this.fraudSuspicionsPage   = new FraudSuspicionPage(this.Driver);

            var user = AccessExcelData.GetTestData <User>("TestName", "TestUser", "Users", BaseConstants.UsersXlsxFilename);

            this.loginPage.AnotherUserLogin(user, BaseConstants.TestCRMUrl);
            pid = HelpMethods.GeneratePID(18, 0);
            Thread.Sleep(1500);
            personalDataPage.FillPreviousData(homePage, applicationMainPage, loanParamPage, pid);
        }
Exemple #2
0
        public void FillPreviousData(
            HomePage homePage,
            ApplicationMainPage applicationMainPage,
            LoanParametersPage loanParamPage,
            PersonalDataPage personalDataPage,
            string pid)
        {
            personalDataPage.FillPreviousData(homePage, applicationMainPage, loanParamPage, pid);
            var personalData = AccessExcelData.GetTestData <PersonalData>("TestName", "valid", "PersonalData", CRMConstants.ApplicationXlsxFilename);

            personalData.Pid       = pid;
            personalData.BirthDate = HelpMethods.GetBirthDayByPid(pid);
            personalDataPage.FillPersonalData(personalData);
            applicationMainPage.SaveAndContinueButton.Click();
        }
        public void PersonalData_WithoutParameters_InactiveSaveButton()
        {
            var testNames = new string[] { "WithoutFirstName", "WithoutSecondName", "WithoutLastName", "WithoutPersonType", "WithoutIdCardNumber", "WithoutIdCardCreationDate", "WithoutIdCardExpirationDate", "WithoutIdCardIssuer" };

            foreach (var name in testNames)
            {
                var personalData = AccessExcelData.GetTestData <PersonalData>("TestName", name, "PersonalData", CRMConstants.ApplicationXlsxFilename);
                personalData.Pid       = pid;
                personalData.BirthDate = HelpMethods.GetBirthDayByPid(pid);
                this.personalDataPage.FillPersonalData(personalData);
                personalDataPage.AssertDisabledElement(personalDataPage.SaveAndContinueButton);
                personalDataPage.AssertMissingData();
                if (name != "WithoutIdCardIssuer")
                {
                    personalDataPage.FillPreviousData(homePage, applicationMainPage, loanParamPage, pid);
                }
            }
        }