public void PO_SearchTenantAfterAddingNewTenant() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Search the tenant after adding new tenant for a given property"); test.AssignCategory("Add New Tenant"); #region Delete the existing tenant of the given proeprty //Before adding new tenant, check whether the tenant already exist, if exist ,delete it ExcelLib.PopulateInCollection(Base.ExcelPath, "Add Tenant"); String propertyName = ExcelLib.ReadData(2, "Property Name"); String tenantEmail = ExcelLib.ReadData(2, "Tenant Email"); //go to my properties page from dashboard DashboardPage dashBoard = new DashboardPage(); dashBoard.GoToMyPropertiesPage(); //search the given property MyPropertiesPage myProperty = new MyPropertiesPage(); myProperty.SearchAPropertySuccessfully(propertyName); //go to manage tenant page and delete the tenant which user want to add myProperty.GoToManageTenantPage(); ManageTenantPage manageTenant = new ManageTenantPage(); manageTenant.RemoveTenant(tenantEmail); //go back to my properties page and then go to add tenant page manageTenant.GoBackToProperties(); myProperty.AddTenant(); #endregion #region Add new tenant //Fill out the add tenant details form and go to liability details form AddTenantPage addTenant = new AddTenantPage(); addTenant.AddTenantDetails(); addTenant.NextToLiabilityDetails(); //Add a new liability and go to sumamry form addTenant.ClickAddNewLiability(); addTenant.AddLiabilityDetails(); addTenant.SaveNewLiability(); addTenant.NextToSummary(); //Save the new tenant addTenant.Submit(); #endregion //Search the given property under my properties page myProperty.SearchAPropertySuccessfully(propertyName); //Go to manage tenant page myProperty.GoToManageTenantPage(); if (manageTenant.FindATenant(tenantEmail)) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully find the new tenant under manage tenant page"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test failed, fail to find the new tenant under manage tenant page"); } }
public void GivenIHaveAddedANewLiability() { AddTenantPage addTenant = new AddTenantPage(); addTenant.ClickAddNewLiability(); addTenant.AddLiabilityDetails(); addTenant.SaveNewLiability(); }
public void GivenIAmAlreadyUnderTheSummarySection() { AddTenantPage addTenant = new AddTenantPage(); addTenant.AddTenantDetails(); addTenant.NextToLiabilityDetails(); addTenant.ClickAddNewLiability(); addTenant.AddLiabilityDetails(); addTenant.NextToSummary(); }
public void GivenIHaveAddedANewTenantForAGivenPropertyAndWentBackToMyPropertiesPage() { AddTenantPage addTenant = new AddTenantPage(); addTenant.AddTenantDetails(); addTenant.NextToLiabilityDetails(); addTenant.ClickAddNewLiability(); addTenant.AddLiabilityDetails(); addTenant.NextToSummary(); addTenant.Submit(); }
public void WhenIClickAddNewLiabilityButton() { AddTenantPage addTenant = new AddTenantPage(); addTenant.ClickAddNewLiability(); }