Exemplo n.º 1
0
        public void StructuralGroupValidation(string[] basicDetails, string[] structuralGroup)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure");
            AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure");
            Wait.WaitForDocumentReady();

            var curriculumStructureTriplet = new CurriculumStructureTriplet();

            curriculumStructureTriplet.Create();
            var bandSchemePage = curriculumStructureTriplet.CreateBandSchemePage();

            bandSchemePage.BandSchemeName       = basicDetails[0];
            bandSchemePage.AcademicYearDropDown = basicDetails[1];
            var sourceClassDialog = bandSchemePage.ClickAddSourceClass();

            sourceClassDialog.SearchResult[0].ClickByJS();
            sourceClassDialog.AddSelectedClass();
            sourceClassDialog.OkButton();
            curriculumStructureTriplet.Save();
            var ValidationWarning = SeleniumHelper.Get(BandSchemePage.ValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
Exemplo n.º 2
0
        public void SearchSchemeByAcademicYearandName(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");

            var nameresult   = curriculumStructureTriplet.SearchCriteria.SearchBySchemeName = (basicDetails[0]);
            var result       = curriculumStructureTriplet.SearchCriteria.SearchByAcademicYear = (basicDetails[1]);
            var searchResult = curriculumStructureTriplet.SearchCriteria.Search().FirstOrDefault();
        }