Ejemplo n.º 1
0
        public void ThenIMNavigatedToTheFinaceDetailsSection()
        {
            try
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.CreateTest("Add New Property -- fill out property details form and go to Finance Details Section ");
                test.AssignCategory("Add New Property Testing");

                // Create an class and object to call the method
                AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

                if (addNewProperty.IsFianceFormHeaderDisplayed())
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go to Fiance Details Section successfull");
                }

                else
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Fiance Details Section unsuccessfull");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Fiance Details Section unsuccessfull" + e.Message);
            }
        }
Ejemplo n.º 2
0
        public void WhenIClickPreviousButtonOnTheTenantDetailsSection()
        {
            Thread.Sleep(3000);
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.GoBackToFianceForm();
        }
Ejemplo n.º 3
0
        public void WhenIFillAllTheFormsOfPropertyDetailsPageFinanceDetailsPageAndTenantDetailsPageAndClickSaveButton()
        {
            AddNewPropertyPage addNewPropertyPage = new AddNewPropertyPage();

            //Fill details of AddNewProperty Page.
            addNewPropertyPage.FillAllFieldsWithoutTickOwnerOccupied();
            //Verify addNewPropertyPage
            addNewPropertyPage.VerifyPropertyDetailsPage();

            //Click Next button and move to financedetailsPage
            FinancedetailsPage financedetailsPage = addNewPropertyPage.ClickNext();

            //Fill the detail
            financedetailsPage.FillFinanceDetailsPage();
            //Add repayment
            financedetailsPage.FillAddRepayment();
            //Verify Finance Detail Page
            financedetailsPage.VerifyFinanceDetailsPage();

            //Goto to Tenant Detail Page
            TenantDetailsPage tenantDetailsPage = financedetailsPage.ClickNext();

            // fill the data of tenantDetailsPage
            tenantDetailsPage.FillTheDetails();
            // verify tenantDetailsPage
            tenantDetailsPage.VerifyTenantDetailsPage();
            // Click save button
            PropertyOwnerPage propertyOwnerPageSavedNewPro = tenantDetailsPage.ClickSave();
        }
Ejemplo n.º 4
0
        public void GivenIMAlreadyOnTheFinanceDetailsSection()
        {
            //Go to Finance Section
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.AddPropertyDetails();
            addNewProperty.GotoFinanceForm();
        }
Ejemplo n.º 5
0
        public void GivenIHaveAddedANewProperty()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.AddPropertyDetails();
            addNewProperty.GotoFinanceForm();
            addNewProperty.AddFinanceDetails();
            addNewProperty.GotoTenantForm();
            addNewProperty.AddTenantDetails();
            addNewProperty.SaveProperty();
        }
Ejemplo n.º 6
0
            public void PO_SearchPropertyAfterAddingNewProperty()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("Search property after adding a new property");
                test.AssignCategory("New Add Property");

                //Go to my properties page
                DashboardPage dashboard = new DashboardPage();

                dashboard.GoToMyPropertiesPage();

                //Get new property name from the excel file
                ExcelLib.PopulateInCollection(Base.ExcelPath, "Property Details");
                String PropertyName = ExcelLib.ReadData(2, "Property Name");

                //Search this property under my properties page and delete the property which has the same name as new property
                MyPropertiesPage myProperty = new MyPropertiesPage();

                if (myProperty.SearchAPropertySuccessfully(PropertyName))
                {
                    myProperty.DeleteAProperty(PropertyName);
                }

                //Click add new property button and go to add new property page
                myProperty.AddNewProperty();

                #region Add new property
                AddNewPropertyPage addNewProperty = new AddNewPropertyPage();
                //Fill out property details form and go to finance details form
                addNewProperty.AddPropertyDetails();
                addNewProperty.GotoFinanceForm();
                //Fill out finance details form and go to tenant details form
                addNewProperty.AddFinanceDetails();
                addNewProperty.GotoTenantForm();
                //Fill out tenant details page and save new property
                addNewProperty.AddTenantDetails();
                addNewProperty.SaveProperty();
                #endregion

                //Do the validation
                if (myProperty.SearchAPropertySuccessfully(PropertyName))
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully search this new added property");
                }
                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test falied, fail to search this new added property");
                }
            }
Ejemplo n.º 7
0
        public void AddPropertyDetails()
        {
            BaseClass baseClass = new BaseClass(driver);

            baseClass.BrowserFunctions();
            LoginPage loginPage = new LoginPage(driver);

            loginPage.Login("*****@*****.**", "ntmv2682");
            Assert.True(driver.Title.Contains("Dashboard"));
            DashboardPage dashboardPage = new DashboardPage(driver);

            dashboardPage.Dashboard();
            Assert.True(driver.Title.Contains("Properties"));
            PropertiesPage propertiesPage = new PropertiesPage(driver);

            propertiesPage.Properties();
            Assert.True(driver.Title.Contains("Add New Property"));
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage(driver);

            addNewProperty.PropertyName("Villas");
            addNewProperty.SearchAddress("1279 Great South Road, Runciman, New Zealand");
            addNewProperty.Number("1279");
            addNewProperty.Street("Great South Road");
            addNewProperty.Suburb("Victoria");
            addNewProperty.City("Runciman");

            // addNewProperty.AcceptIfAlertExists();
            addNewProperty.PostCode(25);
            // addNewProperty.AcceptIfAlertExists();
            addNewProperty.PostCode(78);
            addNewProperty.Region("Auc");
            // addNewProperty.AcceptIfAlertExists();
            addNewProperty.Region("kland");
            addNewProperty.TargetRent(425);
            addNewProperty.LandArea(520);
            addNewProperty.Bedrooms(3);
            addNewProperty.Carparks(2);
            addNewProperty.PropertyType("Affordable Housing");
            addNewProperty.Description("House for sale");
            addNewProperty.RentType("Weekly");
            addNewProperty.FloorArea(410);
            addNewProperty.Bathrooms(2);
            addNewProperty.YearBuilt(1992);
            addNewProperty.ChooseFiles();
        }
Ejemplo n.º 8
0
        public void ThenIGoBackToTheFinaceDetailsSection()
        {
            try
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.CreateTest("Add New Property -- Go back to Finance Details Section");

                AddNewPropertyPage addNewProperty = new AddNewPropertyPage();
                if (addNewProperty.IsFianceFormHeaderDisplayed())
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go back to Finance Details Section successfull");
                }
                else
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go back to Finance Details Section unsuccessfull");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go back to Finance Details Section unsuccessfull" + e.Message);
            }
        }
Ejemplo n.º 9
0
            public void CreateNewProperty()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("Create new property and Verity it" + GetDateAndTime.GetTimeNow());
                //Now page is Dashboard, then go to PropertyOwnersPage
                PropertyOwnerPage propertyOwnerPage = new DashboardPage().GotoPropertyOwnersPage();

                AddNewPropertyPage addNewPropertyPage = propertyOwnerPage.ClickAddNewPropertyBtn();

                //Fill details of AddNewProperty Page.
                addNewPropertyPage.FillAllFieldsWithoutTickOwnerOccupied();
                //Verify addNewPropertyPage
                addNewPropertyPage.VerifyPropertyDetailsPage();

                //Click Next button and move to financedetailsPage
                FinancedetailsPage financedetailsPage = addNewPropertyPage.ClickNext();

                //Fill the detail
                financedetailsPage.FillFinanceDetailsPage();
                //Add repayment
                financedetailsPage.FillAddRepayment();
                //Verify Finance Detail Page
                financedetailsPage.VerifyFinanceDetailsPage();

                //Goto to Tenant Detail Page
                TenantDetailsPage tenantDetailsPage = financedetailsPage.ClickNext();

                // fill the data of tenantDetailsPage
                tenantDetailsPage.FillTheDetails();
                // verify tenantDetailsPage
                tenantDetailsPage.VerifyTenantDetailsPage();
                // Click save button
                PropertyOwnerPage propertyOwnerPageSavedNewPro = tenantDetailsPage.ClickSave();

                // Verify the result
                propertyOwnerPageSavedNewPro.SearchPropertiesWhichAdded();
            }
Ejemplo n.º 10
0
        public void ThenPopupAnConfirmationDialog()
        {
            try
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.CreateTest("Add New Property -- Cancel add property under Property Details Section");

                AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

                if (addNewProperty.IsCancelConfirmationDialogDisplayed())
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, pop up confirmation dialog successfully");
                }

                else
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, pop up confirmation dialog unsuccessfull");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, pop up confirmation dialog unsuccessfull" + e.Message);
            }
        }
Ejemplo n.º 11
0
        public void ThenIMNavigatedToTheTenantDetailsSection()
        {
            try
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.CreateTest("Add New Property -- fill out finance details form and go to Tenant Details Section");

                AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

                if (addNewProperty.IsTenantFormHeaderDisplayed())
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go to Tenant Details Section successfully");
                }

                else
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Tenant Details Section unsuccessfull");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Tenant Details Section unsuccessfull" + e.Message);
            }
        }
Ejemplo n.º 12
0
        public void GivenClickAddNewPRopertyButton()
        {
            PropertyOwnerPage propertyOwnerPage = new PropertyOwnerPage();

            AddNewPropertyPage addNewPropertyPage = propertyOwnerPage.ClickAddNewPropertyBtn();
        }
Ejemplo n.º 13
0
        public void WhenClickNextButtonOnTheFinanceDetailsSection()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.GotoTenantForm();
        }
Ejemplo n.º 14
0
        public void WhenIClickCancelButtonOnPropertyDetailsSection()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.CancelPropertyForm();
        }
Ejemplo n.º 15
0
        public void WhenClickNextButton()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.GotoFinanceForm();
        }
Ejemplo n.º 16
0
        public void WhenIEnterAllThePropertyDetails()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.AddPropertyDetails();
        }
Ejemplo n.º 17
0
        public void WhenIClickPreviousButtonOnTheFinaceDetailsSection()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.GoBackToPropertyForm();
        }
Ejemplo n.º 18
0
        public void WhenClickSaveButton()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.SaveProperty();
        }
Ejemplo n.º 19
0
        public void WhenIClickCancelButtonOnTheTenantDetailsSection()
        {
            AddNewPropertyPage addNewProperty = new AddNewPropertyPage();

            addNewProperty.CanceTenantForm();
        }