public void SourceClassValidation(string[] basicDetails, string[] teachingGroup) { SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure"); Wait.WaitForDocumentReady(); Random rnd = new Random(); string displayOrder = rnd.Next(1, 50).ToString(); var curriculumStructureTriplet = new CurriculumStructureTriplet(); curriculumStructureTriplet.Create(); var curriculumStructurePage = curriculumStructureTriplet.CreateTeachingGroupSchemePage(); curriculumStructurePage.SchemeName = basicDetails[0]; curriculumStructurePage.AcademicYearBeginDropDown = basicDetails[1]; curriculumStructurePage.AcademicYearEndDropDown = basicDetails[2]; var teachingGroupDialog = curriculumStructurePage.ClickAddTeachingGroup(); teachingGroupDialog.FullName = teachingGroup[0]; teachingGroupDialog.ShortName = teachingGroup[1]; teachingGroupDialog.Subject = teachingGroup[2]; teachingGroupDialog.DisplayOrder = displayOrder; teachingGroupDialog.Save(); Wait.WaitForDocumentReady(); curriculumStructureTriplet.Save(); var ValidationWarning = SeleniumHelper.Get(CurriculumStructurePage.ValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }
public void CreateScheme(string[] basicDetails, string[] teachingGroup) { SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure"); Wait.WaitForDocumentReady(); Random rnd = new Random(); string displayOrder = rnd.Next(1, 50).ToString(); var curriculumStructureTriplet = new CurriculumStructureTriplet(); curriculumStructureTriplet.Create(); var curriculumStructurePage = curriculumStructureTriplet.CreateTeachingGroupSchemePage(); curriculumStructurePage.SchemeName = basicDetails[0]; curriculumStructurePage.AcademicYearBeginDropDown = basicDetails[1]; curriculumStructurePage.AcademicYearEndDropDown = basicDetails[2]; var teachingGroupDialog = curriculumStructurePage.ClickAddTeachingGroup(); teachingGroupDialog.FullName = teachingGroup[0]; teachingGroupDialog.ShortName = teachingGroup[1]; teachingGroupDialog.Subject = teachingGroup[2]; teachingGroupDialog.DisplayOrder = displayOrder; teachingGroupDialog.Save(); Wait.WaitForDocumentReady(); var sourceClassDialog = curriculumStructurePage.ClickAddSourceClass(); sourceClassDialog.SearchResult[0].ClickByJS(); sourceClassDialog.AddSelectedClass(); sourceClassDialog.OkButton(); curriculumStructureTriplet.Save(); Assert.AreEqual(false, curriculumStructurePage.IsSuccessMessageDisplayed(), "Group Scheme Record Saved"); }
public void TeachingGroupValidation(string[] basicDetails, string[] teachingGroup) { SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure"); AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure"); Wait.WaitForDocumentReady(); var curriculumStructureTriplet = new CurriculumStructureTriplet(); curriculumStructureTriplet.Create(); var curriculumStructurePage = curriculumStructureTriplet.CreateTeachingGroupSchemePage(); curriculumStructurePage.SchemeName = basicDetails[0]; curriculumStructurePage.AcademicYearBeginDropDown = basicDetails[1]; curriculumStructurePage.AcademicYearEndDropDown = basicDetails[2]; var sourceClassDialog = curriculumStructurePage.ClickAddSourceClass(); sourceClassDialog.SearchResult[0].ClickByJS(); sourceClassDialog.AddSelectedClass(); sourceClassDialog.OkButton(); curriculumStructureTriplet.Save(); var ValidationWarning = SeleniumHelper.Get(CurriculumStructurePage.ValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }