public void Add_Tier_E2E(string[] basicDetails) { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "ManageTiers"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Manage Tiers"); Wait.WaitForDocumentReady(); var tierTriplet = new ManageTierTriplet(); var tierpage = tierTriplet.Create(); tierpage.TierFullName = basicDetails[0]; tierpage.TierShortName = basicDetails[1]; tierpage.AddActivehistory(); Wait.WaitForDocumentReady(); tierpage.ActiveHistoryTable[0].StartDate = "01/01/2017"; tierpage.ActiveHistoryTable[0].EndDate = "12/12/2018"; tierpage.AddYearGroup(); Wait.WaitForDocumentReady(); tierpage.YearGroupsTable[0].YearGroup = "Year 3"; tierpage.YearGroupsTable[0].StartDate = "01/01/2017"; tierpage.YearGroupsTable[0].EndDate = "12/12/2018"; tierpage.Save(); Assert.AreEqual(false, tierpage.IsSuccessMessageDisplayed(), "Tier record saved"); Wait.WaitForDocumentReady(); var searchResult = tierTriplet.SearchCriteria.Search().FirstOrDefault().Click <ManageTierPage>(); tierTriplet.Delete(); }
public void Delete_Tier(string[] basicDetails) { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "ManageTiers"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Manage Tiers"); Wait.WaitForDocumentReady(); var tierTriplet = new ManageTierTriplet(); var searchResult = tierTriplet.SearchCriteria.Search().FirstOrDefault().Click <ManageTierPage>(); tierTriplet.Delete(); }
public void Add_Tier(string[] basicDetails) { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "ManageTiers"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Manage Tiers"); Wait.WaitForDocumentReady(); DataPackage dataPackage = this.BuildDataPackage(); //Employee Details Data Injection var employeeId = Guid.NewGuid(); dataPackage.AddEmployee(employeeId); //Staff Details Data Injection var staffId = Guid.NewGuid(); var surname = Utilities.GenerateRandomString(10, "Surname"); var forename = Utilities.GenerateRandomString(3, "Forename"); dataPackage.AddStaff(staffId, employeeId, surname, forename); var serviceRecordId = Guid.NewGuid(); var staffDOA = DateTime.Now; dataPackage.AddServiceRecord(serviceRecordId, staffId, staffDOA, null); var tierTriplet = new ManageTierTriplet(); //Clear already present data var searchResult = tierTriplet.SearchCriteria.Search().FirstOrDefault().Click <ManageTierPage>(); tierTriplet.Delete(); Wait.WaitForDocumentReady(); var tierpage = tierTriplet.Create(); tierpage.TierFullName = basicDetails[0]; tierpage.TierShortName = basicDetails[1]; tierpage.AddActivehistory(); Wait.WaitForDocumentReady(); tierpage.ActiveHistoryTable[0].StartDate = "01/01/2016"; tierpage.ActiveHistoryTable[0].EndDate = "12/12/2017"; tierpage.AddYearGroup(); Wait.WaitForDocumentReady(); tierpage.YearGroupsTable[0].YearGroup = "Year 1"; tierpage.YearGroupsTable[0].StartDate = "01/01/2016"; tierpage.YearGroupsTable[0].EndDate = "12/12/2017"; //tierpage.AddTierManager(); //var tierStaff = string.Concat(surname, ", ", forename); //tierpage.TierManagerTable[0].SelectTierManager = tierStaff; //tierpage.TierManagerTable[0].StartDate = "01/01/2016"; //tierpage.TierManagerTable[0].EndDate = "12/12/2017"; tierpage.Save(); Assert.AreEqual(false, tierpage.IsSuccessMessageDisplayed(), "Tier record saved"); }