Exemple #1
0
        public void GivenIAlreadyListedARentalProperty()
        {
            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            obj.AddRentalPropertyDetails();
            obj.SaveListRentalProperty();
            Driver.driver.SwitchTo().Alert().Accept();
        }
Exemple #2
0
        public void ThenIStayAtListRentalPropertyPage()
        {
            test = extent.CreateTest("List A Rental -- deal with confirmation dialog and cancel to list");
            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            if (obj.IsHeaderDisplayed())
            {
                test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, succesfully stay at list rental property page");
            }
            else
            {
                test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, fail to stay at list rental property page");
            }
        }
Exemple #3
0
        public void ThenPopUpACancelConfirmationDialog()
        {
            test = extent.CreateTest("List A Rental -- cancel list rental property and pop up a confirmation dialog");

            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            if (obj.IsConfirmationDialogDisplay())
            {
                test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, sucessfully pop up a confirmation dialog after clicking cancel button");
            }
            else
            {
                test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, fail to pop up a confirmation dialog after clicking cancel button");
            }
        }
Exemple #4
0
            public void PO_SearchPropertyAfterListingRental()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("Search the property after listing as rental");
                test.AssignCategory("List A Rental");

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

                dashboard.GoToMyPropertiesPage();

                //Click list rental button and go to add list rental proeprty page
                MyPropertiesPage myProperty = new MyPropertiesPage();

                myProperty.ListARental();

                //Fill out the list rental property form and save
                ListRentalPropertyPage listrentalProerty = new ListRentalPropertyPage();

                listrentalProerty.AddRentalPropertyDetails();
                listrentalProerty.SaveListRentalProperty();
                //handle the alert and click ok
                Driver.driver.SwitchTo().Alert().Accept();

                //Go to the properties for rent page
                dashboard.GotoPropertiesForRentPage();

                // Got the property title from excel
                ExcelLib.PopulateInCollection(Base.ExcelPath, "List Rental Property");
                String searchPropertyTitle = ExcelLib.ReadData(2, "Title");

                PropertiesForRentPage propertyForRent = new PropertiesForRentPage();

                if (propertyForRent.SearchRentalPropertySuccessfully(searchPropertyTitle))
                {
                    test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully search this property after listing as a rental");
                }
                else
                {
                    test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test failed, fail to search this property after listing as a reantal");
                }
            }
Exemple #5
0
            public void PO_ListAsRental()
            {
                // Creates a toggle for the given test, adds all log events under it
                test = extent.StartTest("List a property as rental");
                test.AssignCategory("List A Rental");

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

                dashboard.GoToMyPropertiesPage();

                //Click list rental button and go to add list rental proeprty page
                MyPropertiesPage myProperty = new MyPropertiesPage();

                myProperty.ListARental();

                //Fill out the list rental property form and save
                ListRentalPropertyPage listrentalProerty = new ListRentalPropertyPage();

                listrentalProerty.AddRentalPropertyDetails();
                listrentalProerty.SaveListRentalProperty();

                //handle the alert and click ok
                Driver.driver.SwitchTo().Alert().Accept();

                RentalListingsAndTenantApplications rentalApplication = new RentalListingsAndTenantApplications();

                if (rentalApplication.IsHeaderDisplayed())
                {
                    test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully navigate to rental listings&applications page after listing a rental");
                }
                else
                {
                    test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test failed, fail to navigate to rental listings&applications page after listing a rental");
                }
            }
Exemple #6
0
        public void WhenIClickSaveButton()
        {
            ListRentalPropertyPage listRentalProperty = new ListRentalPropertyPage();

            listRentalProperty.SaveListRentalProperty();
        }
Exemple #7
0
        public void WhenIEnterAllTheRentalPropertyInformation()
        {
            ListRentalPropertyPage listRentalProperty = new ListRentalPropertyPage();

            listRentalProperty.AddRentalPropertyDetails();
        }
Exemple #8
0
        public void WhenIClickTheNoButton()
        {
            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            obj.QuitToCancel();
        }
Exemple #9
0
        public void WhenIClickTheYesButton()
        {
            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            obj.ConfirmToCancel();
        }
Exemple #10
0
        public void WhenIClickCancelButton()
        {
            ListRentalPropertyPage obj = new ListRentalPropertyPage();

            obj.CancelListRentalProperty();
        }