예제 #1
0
        public void AssignGradesetPopoverMessagethroughSave()
        {
            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, false);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");

            AddAssessments addassessment = marksheetBuilder.NavigateAssessments();

            //Adding Subject to the Marksheet Template
            AddSubjects addSubjects = addassessment.NavigateAssessmentsviaSubject();

            //Selecting a Subject
            addSubjects.EnterSubjectSearchCriteria("Language and Literacy");
            addSubjects = addSubjects.ClickSubjectSearchButton();
            addSubjects.SelectSubjectResult(1);
            AddModeMethodPurpose addmodemethodpurpose = addSubjects.SubjectNextButton();

            //Selecting a Mode Method and Purpose for that Subject
            addmodemethodpurpose.purposeAssessmentPeriodSelection(1);
            addmodemethodpurpose.modeAssessmentPeriodSelection(1);
            addmodemethodpurpose.methodAssessmentPeriodSelection(1);

            //Selecting an Assessment Period
            AddAssessmentPeriod addassessmentperiod = addmodemethodpurpose.modeMethodPurposeNextButton();

            addassessmentperiod.subjectAssessmentPeriodSelection(1);
            marksheetBuilder = addassessmentperiod.ClickSubjectAssessmentPeriodDone();

            //Check Assign gradeset popover is displayed and the close it
            MarksheetTemplateProperties marksheetTemplateProperties = new MarksheetTemplateProperties();

            marksheetTemplateProperties.CheckAssignGradepopover();
            marksheetTemplateProperties.CloseAssignGradepopover();

            //Adding Marksheet Template Name
            marksheetTemplateProperties.OpenDetailsTab();
            MarksheetTemplateDetails marksheettemplatedetails = new MarksheetTemplateDetails();
            string TemplateName = marksheetBuilder.RandomString(10);

            marksheettemplatedetails.SetMarksheetTemplateName(TemplateName);
            SaveMarksheetTemplate savemarksheettemplate = new SaveMarksheetTemplate();

            savemarksheettemplate.ClickSaveButton();
            //Check Assign gradeset popover message is displayed on click on Save
            marksheetTemplateProperties.CheckAssignGradepopover();
        }
예제 #2
0
        public void GradesetBulkAllocate()
        {
            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");
            //Adding Marksheet Template Name
            MarksheetTemplateDetails marksheettemplatedetails = new MarksheetTemplateDetails();
            string TemplateName = marksheetBuilder.RandomString(10);

            marksheettemplatedetails.SetMarksheetTemplateName(TemplateName);

            //Adding Subject to the Marksheet Template
            AddAssessments addassessment = marksheetBuilder.NavigateAssessments();
            AddSubjects    addSubjects   = addassessment.NavigateAssessmentsviaSubject();

            //Selecting a Subject
            int noofselectedsubject = 2;

            addSubjects.SelectSubjectResult(noofselectedsubject);
            AddModeMethodPurpose addmodemethodpurpose = addSubjects.SubjectNextButton();

            //Scenario 1 : One Column Definition

            int modeSelected = 1, methodSected = 1, purposeSelected = 1;

            //Selecting a Mode Method and Purpose for that Subject
            addmodemethodpurpose.purposeAssessmentPeriodSelection(purposeSelected);
            addmodemethodpurpose.modeAssessmentPeriodSelection(modeSelected);
            addmodemethodpurpose.methodAssessmentPeriodSelection(methodSected);

            AddAssessmentPeriod addassessmentperiod = addmodemethodpurpose.modeMethodPurposeNextButton();

            addassessmentperiod.subjectAssessmentPeriodSelection(1);
            marksheetBuilder = addassessmentperiod.ClickSubjectAssessmentPeriodDone();

            //Assigning a Gradeset to a Subject
            MarksheetTemplateProperties marksheettemplateproperties = new MarksheetTemplateProperties();

            marksheettemplateproperties.SelectGridRows();

            BulkAssignGradeset  bulkassigngradeset  = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            GradesetSearchPanel gradesetsearchpanel = bulkassigngradeset.ClickAddGradeSetButton();

            gradesetsearchpanel = gradesetsearchpanel.Search(true);
            string selectedgradesetname             = gradesetsearchpanel.GetFirstGradesetName();

            GradesetDataMaintenance gradesetdatamaintenance = gradesetsearchpanel.SelectGradeset();

            marksheettemplateproperties = gradesetdatamaintenance.ClickOkButton();

            bulkassigngradeset.ApplyGradeset();
            List <string> AssessmentGradesetNameList = marksheettemplateproperties.GetAllGradesetNames();

            foreach (string eachvalue in AssessmentGradesetNameList)
            {
                Assert.AreEqual(selectedgradesetname, eachvalue);
            }
            //Apply the gradeset of type Comment
            marksheettemplateproperties.SelectGridRows();
            bulkassigngradeset          = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            marksheettemplateproperties = bulkassigngradeset.SelectComment();
            //Apply the overwrite functionality
            marksheettemplateproperties = marksheettemplateproperties.SelectMultipleRows(4);
            marksheettemplateproperties = marksheettemplateproperties.SelectMultipleRows(2);
            bulkassigngradeset          = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            gradesetsearchpanel         = bulkassigngradeset.ClickAddGradeSetButton();
            gradesetsearchpanel         = gradesetsearchpanel.Search(true);

            gradesetdatamaintenance = gradesetsearchpanel.SelectGradeset(2);
            gradesetdatamaintenance.ClickOkButton();
            bulkassigngradeset.SelectOverwrite();
            bulkassigngradeset.ApplyGradeset();
        }