Beispiel #1
0
        public void AddVendorWithLenderType()
        {
            {
                var lenderVendorName       = $"Lender{new Random().Next(1000, 50000)}";
                var underwrittenVendorName = $"Lender{new Random().Next(1000, 50000)}";
                HelperSet.HelperMethodAddVendors(lenderVendorName, underwrittenVendorName);
                var workFlownav = new WorkFlowPageNavigation(Driver);
                var vendors     = new VendorsPage(Driver);
                var closingRep  = new ClosingFilesRepository(DbConn);
                var closingFileVendorRepository = new ClosingFileVendorRepository(DbConn);
                var closinfFileId = closingRep.GetClosingFileIdByClosingNumber(ClosingFileNumber);

                workFlownav
                .GoToAppropriateClosingFile()
                .ClickVendorsMenuItem();

                vendors
                .ClickAddVendorButton()
                .ClickSelectVendorTypeDropDown()
                .ClickLenderType()
                .ClickVendorNameDropdown()
                .ClickFirstVendorNameInList();

                Assert.IsNotNull(closingFileVendorRepository.GetClosingFileVendorIdByClosingFileId(closinfFileId, lenderVendorName), "Vendor With Lender Type Is Added");
            }
        }
Beispiel #2
0
        public void AddSellerToClosingFile()
        {
            HelperSet.HelperMethodAddWorkflow();

            var workFlowPage  = new WorkFlowPageNavigation(Driver);
            var sellerPage    = new SellersPage(Driver);
            var appMembersRep = new AppMemberRepository(DbConn);
            var closingRep    = new ClosingFilesRepository(DbConn);

            var closinfFileName = closingRep.GetClosingNumberListWithoutBuyerSeller();

            workFlowPage
            .GoToWorkFlowPage()
            .GoToAppropriateClosingFile()
            .ClickSellerMenuItem();

            sellerPage
            .ClickAddSellersButton()
            .SelectSellerType()
            .TypeFirstName(Configuration.GetSection("SallerFirstName").Value)
            .TypeLastName(Configuration.GetSection("SellerLastName").Value)
            .TypeEmail(Configuration.GetSection("SellerEmail").Value)
            .SelectGender()
            .SelectMaritalStatus()
            .SelectExemptField(Configuration.GetSection("SallerFirstName").Value);

            Assert.AreEqual(Configuration.GetSection("SellerLastName").Value, appMembersRep.GetSellerLastName(Configuration.GetSection("SallerFirstName").Value));

            var appMemberRep = new AppMemberRepository(DbConn);

            appMemberRep.DeleteSellerBuyerByFirstName(Configuration.GetSection("SallerFirstName").Value);
        }
Beispiel #3
0
        public void AddBuyerToClosingFile()
        {
            var workFlowPage  = new WorkFlowPageNavigation(Driver);
            var buyerPage     = new BuyerPage(Driver);
            var appMembersRep = new AppMemberRepository(DbConn);

            HelperSet.HelperMethodAddWorkflow();

            var firstName = Configuration.GetSection("BuyerFirstName").Value;
            var lastName  = Configuration.GetSection("BuyerLastName").Value;

            workFlowPage
            .GoToAppropriateClosingFile()
            .ClickBuyerMenuItem();

            buyerPage
            .ClickAddBuyerButton()
            .SelectBuyerType()
            .TypeFirstName(firstName)
            .TypeLastName(lastName)
            .SelectGender()
            .SelectMaritalStatus()
            .SelectTenancy(Configuration.GetSection("BuyerFirstName").Value);

            Assert.AreEqual(lastName, appMembersRep.GetSellerLastName(firstName), "Buyer Was created");
        }
Beispiel #4
0
        public void AddWorkflowNotification()
        {
            HelperSet.HelperMethodAddWorkflow();

            var workFlownav      = new WorkFlowPageNavigation(Driver);
            var workflow         = new WorkflowPage(Driver);
            var notificationText = DateTime.Now.ToString();
            var closingFileWorkflowItemNotificationsRepository = new ClosingFileWorkflowRepository(DbConn);

            workFlownav
            .GoToAppropriateClosingFile()
            .ClicWorkflowMenuItem();

            workflow
            .ClickOpenButton()
            .ClickOnFirstTaskInList()
            .ClickOnAddNotificationButton()
            .ClickOnRemindersRadioButton()
            .ClickOnNextButonOnNotificationsPopup()
            .ClickOnAddRemindersButton()
            .ClickOnReminder1()
            .WriteReminderText(notificationText)
            .ClickOnTimeField()
            .SelectTimeValue()
            .ClickOnDoneButton()
            .WaitNotificationsCounter();

            Assert.IsNotNull(closingFileWorkflowItemNotificationsRepository.GetIdOfJustCreatedReminderNotification(notificationText), "Reminder Notification is sucsessfully added");
        }
Beispiel #5
0
 public void AfterAllTests()
 {
     _driver.Close();
     _driver.Quit();
     HelperSet.DeleteAllTestData(UserEmail);
     _dbConn.CloseConnection();
 }
Beispiel #6
0
        public void BeforeEachTests()
        {
            HelperSet.GetNeededData(UserEmail, ClosingFileNumber);
            var login = new LoginPage(Driver, Configuration);

            login
            .SuccessLogin(UserEmail, UserPassword);
        }
Beispiel #7
0
        public void AfterEachTests()
        {
            var            userRepository = new UserRepository(DbConn);
            LocalStorageJS localstorage   = new LocalStorageJS(Driver);

            localstorage.CleanSessionStorage();
            localstorage.ClearLocalStorage();
            userRepository.DeleteDataAfterEachTest(UserEmail);
            HelperSet.SignOut();
        }
Beispiel #8
0
        public void AddWorkflow()
        {
            HelperSet.AddHelperDataForWorkFlow();
            var workFlownav            = new WorkFlowPageNavigation(Driver);
            var workflow               = new WorkflowPage(Driver);
            var closingFileWorkflowRep = new ClosingFileWorkflowRepository(DbConn);

            workFlownav
            .GoToAppropriateClosingFile()
            .ClicWorkflowMenuItem();
            workflow
            .ClickOnSetTemplateButton()
            .ClickOnSetPlanButton()
            .ClickOnAcceptWorkflowButton();

            Assert.IsNotNull(closingFileWorkflowRep.GetIdOfJustCreatedWorkflowItems(ClosingFileNumber), "Workflow is sucsessfully added");
        }
Beispiel #9
0
        public void AddMoneyTest()
        {
            HelperSet.HelperMethodAddWorkflow();

            var workFlowPage            = new WorkFlowPageNavigation(Driver);
            var moneyPage               = new MoneyPage(Driver);
            var summarypage             = new SummaryPage(Driver);
            var closingRep              = new ClosingFilesRepository(DbConn);
            var closingFileEscrowDepRep = new ClosingFileEscrowDepositsRepository(DbConn);

            HelperSet.AddBankAndBankAccounts();

            Random  rand          = new Random();
            decimal purchasePrice = rand.Next(10000, 50000);
            decimal escrowDep     = rand.Next(1000, 5000);

            workFlowPage
            .GoToWorkFlowPage()
            .GoToAppropriateClosingFile()
            .ClickDetailsMenuItem();
            moneyPage
            .ClickMoneySideMenuItem()
            .CleanAndEnterPurchasePrice(purchasePrice)
            .ClearAndEnterEscrowDeposit(escrowDep)
            .ClearAndEnterLoanAmount("10")
            .ChooseEscrowAccount();

            decimal eRexpPrice      = purchasePrice;
            decimal erEscrowDeposit = escrowDep;
            var     wait            = new WebDriverWait(Driver, TimeSpan.FromSeconds(10));

            //wait.Until((Driver) => closingRep.GetPurchasePrice(ClosingFileNumber) == eRexpPrice);

            decimal expPurchPrice  = closingRep.GetPurchasePrice(ClosingFileNumber);
            decimal expEscrDeposit = closingFileEscrowDepRep.GetEscrowDeposit(ClosingFileNumber);

            Assert.Multiple(() =>
            {
                Assert.AreEqual(eRexpPrice, expPurchPrice, "Purchase Price is changed");
                Assert.AreEqual(erEscrowDeposit, expEscrDeposit, "Escrow Price is changed");
            });
        }
Beispiel #10
0
        public void AddNoteToNotes()
        {
            HelperSet.HelperMethodAddWorkflow();

            var workFlownav = new WorkFlowPageNavigation(Driver);
            var notes       = new NotesPage(Driver);
            var closingRep  = new ClosingFilesRepository(DbConn);
            var comment     = DateTime.Now.ToString();

            workFlownav
            .GoToWorkFlowPage()
            .GoToAppropriateClosingFile()
            .ClickNotesMenuItem();

            notes
            .WriteAComment(comment)
            .ClickOnSaveCommentButton();

            Assert.IsTrue(notes.CheckThatCommentIsCreated(comment));
        }
Beispiel #11
0
        public void AddCommentToWorkflow()
        {
            HelperSet.HelperMethodAddWorkflow();

            var workFlownav = new WorkFlowPageNavigation(Driver);
            var workflow    = new WorkflowPage(Driver);
            var comment     = DateTime.Now.ToString();

            workFlownav
            .GoToAppropriateClosingFile()
            .ClicWorkflowMenuItem();

            workflow
            .ClickOpenButton()
            .ClickOnFirstTaskInList()
            .WriteAComment(comment)
            .ClickOnSaveCommentButton();

            Assert.IsNotNull(workflow.CheckThatCommentIsCreated(comment));
        }
Beispiel #12
0
        public void BeforeAllTests()
        {
            _dbConn = new DataBaseConnection(Configuration.GetSection("DBConn").Value);
            Driver.Manage().Window.Maximize();
            var tempUser = new User()
            {
                Email             = $"email{new Random().Next(200, 500000)}@gmail.com",
                Password          = "******",
                ClosingFileNumber = $"CF{new Random().Next(200, 500000)}"
            };

            var id = HelperSet.CreateNewUser(tempUser.Email);

            ClosingFileNumber = tempUser.ClosingFileNumber;
            HelperSet.InsertClosingFileToDB(tempUser.Email, tempUser.ClosingFileNumber);
            UserPassword = tempUser.Password;
            UserEmail    = tempUser.Email;
            UserId       = id;
            HelperSet.SignOut();
        }
Beispiel #13
0
        public void AddBuyerAddressTest()
        {
            Console.WriteLine("AddBuyerAddressTest");

            var userRep        = new UserRepository(DbConn);
            var closingFileRep = new ClosingFilesRepository(DbConn);
            var workFlowPage   = new WorkFlowPageNavigation(Driver);
            var buyerPage      = new BuyerPage(Driver);
            var memberRep      = new UserRepository(DbConn);
            var appMemberRep   = new AppMemberRepository(DbConn);

            var fName = $"fname{new Random().Next(1000, 50000)}";
            var lName = $"lname{new Random().Next(1000, 50000)}";

            appMemberRep.AddNewAppMember(fName, lName);

            var closingFileId = closingFileRep.GetClosingFileId(ClosingFileNumber);

            HelperSet.HelperMethodAddWorkflow();

            closingFileRep.AddSellerBuyerToClosingFile(closingFileId, UserId);
            var closingFile       = closingFileRep.SelectClosingFileWithBuyer(ClosingFileNumber, UserId);
            var closingFileNumber = closingFile.ClosingNumber;
            var buyerFName        = closingFile.FirstName;
            var buyerLName        = closingFile.LastName;

            Driver.Manage().Window.Maximize();
            workFlowPage
            .GoToAppropriateClosingFile()
            .ClickBuyerMenuItem()
            .ClickOnBuyer($"{buyerFName}  {buyerLName}");
            buyerPage
            .ClickAddressMenuItem()
            .TypeAddress1Field("500 Southeast 8th Avenue, Portland, OR, US");
            Thread.Sleep(1000);

            Assert.IsTrue(closingFileRep.GetAddressId().Contains(closingFileRep.GetAddressIdForBuyer(buyerFName)));
        }
Beispiel #14
0
        public void AddClosingFile()
        {
            HelperSet.HelperMethodAddWorkflow();

            string closingFileNumber = $"CF{new Random().Next(200, 500000)}";
            var    headerMenu        = new HeaderManu(Driver);
            var    login             = new LoginPage(Driver, Configuration);
            var    closingFileRep    = new ClosingFilesRepository(DbConn);

            headerMenu
            .ClickAddCircleButton()
            .ClickClosingButton()
            .TypeFilenumberField(closingFileNumber)
            .ChooseTransactionTypeValue()
            .ChooseFinanceTypeValue()
            .ChooseUsageTypeValue()
            .ChoosePropertyTypeValue()
            .ClickNextButton();
            var dbFileNumber = closingFileRep.GetClosingNumberList(closingFileNumber);

            Assert.IsTrue(dbFileNumber.Contains(closingFileNumber), "New ClosingFile is created");

            closingFileRep.DeleteClosingFiles(UserEmail, closingFileNumber);
        }