Beispiel #1
0
        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");
        }
Beispiel #2
0
        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");
        }
Beispiel #3
0
        public void SearchBandSchemeByName(string[] basicDetails, string[] structuralGroup)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure");
            AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure");
            Wait.WaitForDocumentReady();

            Random rnd          = new Random();
            int    displayOrder = rnd.Next(1, 50);

            var curriculumStructureTriplet = new CurriculumStructureTriplet();

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

            bandSchemePage.BandSchemeName       = basicDetails[0];
            bandSchemePage.AcademicYearDropDown = basicDetails[1];
            var structuralGroupDialog = bandSchemePage.ClickAddTeachingGroup();

            structuralGroupDialog.ShortName    = structuralGroup[1];
            structuralGroupDialog.DisplayOrder = displayOrder;
            structuralGroupDialog.Save();
            Wait.WaitForDocumentReady();
            var sourceClassDialog = bandSchemePage.ClickAddSourceClass();

            sourceClassDialog.SearchResult[0].ClickByJS();
            sourceClassDialog.AddSelectedClass();
            sourceClassDialog.OkButton();
            curriculumStructureTriplet.Save();
            curriculumStructureTriplet.SearchCriteria.SearchBySchemeName = basicDetails[0];
            var searchResult = curriculumStructureTriplet.SearchCriteria.Search().FirstOrDefault();
        }
Beispiel #4
0
        public void SourceGroupValidation(string[] basicDetails, string[] structuralGroup)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure");
            AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure");
            Wait.WaitForDocumentReady();

            Random rnd          = new Random();
            int    displayOrder = rnd.Next(1, 50);

            var curriculumStructureTriplet = new CurriculumStructureTriplet();

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

            bandSchemePage.BandSchemeName       = basicDetails[0];
            bandSchemePage.AcademicYearDropDown = basicDetails[1];
            var structuralGroupDialog = bandSchemePage.ClickAddTeachingGroup();

            structuralGroupDialog.ShortName    = structuralGroup[1];
            structuralGroupDialog.DisplayOrder = displayOrder;
            structuralGroupDialog.Save();
            Wait.WaitForDocumentReady();
            curriculumStructureTriplet.Save();
            var ValidationWarning = SeleniumHelper.Get(BandSchemePage.ValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
Beispiel #5
0
        public void CreateScheme(string[] basicDetails, string[] structuralGroup)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, "Curriculum Structure");
            AutomationSugar.NavigateMenu("Tasks", "School Groups", "Curriculum Structure");
            Wait.WaitForDocumentReady();

            Random rnd          = new Random();
            int    displayOrder = rnd.Next(1, 50);

            var curriculumStructureTriplet = new CurriculumStructureTriplet();

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

            bandSchemePage.BandSchemeName       = basicDetails[0];
            bandSchemePage.AcademicYearDropDown = basicDetails[1];
            var structuralGroupDialog = bandSchemePage.ClickAddTeachingGroup();

            structuralGroupDialog.ShortName    = structuralGroup[0];
            structuralGroupDialog.DisplayOrder = displayOrder;
            structuralGroupDialog.Save();
            Wait.WaitForDocumentReady();

            //DataPackage dataPackage = this.BuildDataPackage();
            ////Create School NC Year
            //var schoolNcYearId = Guid.NewGuid();
            //dataPackage.AddSchoolNCYearLookup(schoolNcYearId);
            ////Create YearGroup and its set memberships
            //var yearGroupId = Guid.NewGuid();
            //var yearGroupShortName = Utilities.GenerateRandomString(3, "SNADD");
            //var yearGroupFullName = Utilities.GenerateRandomString(10, "AYGMT");
            //dataPackage.AddYearGroupLookup(yearGroupId, schoolNcYearId, yearGroupShortName, yearGroupFullName, 1);

            var sourceYearDialog = bandSchemePage.ClickAddSourceClass();

            sourceYearDialog.SearchResult[0].ClickByJS();
            sourceYearDialog.AddSelectedClass();
            sourceYearDialog.OkButton();
            curriculumStructureTriplet.Save();
            Assert.AreEqual(false, bandSchemePage.IsSuccessMessageDisplayed(), "Structural Group Record Saved");
        }
Beispiel #6
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");
        }