Esempio n. 1
0
        public void VerifyActiveCodesList_MarksDropdwon()
        {
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = AttendanceNavigations.NavigateToDealWithSpecificMarksMenuPage();
            var searchpanel = dealwithspecificmarktriplet.SearchCriteria;

            Assert.IsTrue(searchpanel.GetAllMarks());
        }
Esempio n. 2
0
        public void VerifyExclamationMarkInNI()
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
            SeleniumHelper.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            DealWithSpecifcMarksTriplet dealwithSpecific = new DealWithSpecifcMarksTriplet();

            Assert.IsTrue(dealwithSpecific.SearchCriteria.VerifySpecificCodeInDropdown("!"));
        }
Esempio n. 3
0
        public void VerifyDefaultValuesOf_DealWithSpecificMarks_SearchPanel(string academicyear, string Term, string startdate, string endDate)
        {
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = AttendanceNavigations.NavigateToDealWithSpecificMarksMenuPage();
            var searchpanel = dealwithspecificmarktriplet.SearchCriteria;

            Assert.IsTrue(searchpanel.SelectAcademicYear == academicyear && searchpanel.SelectDateRange == Term &&
                          searchpanel._searchStartDateTexBox.GetValue() == startdate && searchpanel._searchEndDateTextBox.GetValue() == endDate);
        }
Esempio n. 4
0
        public void  VerifyClassColoumnasDefault()
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
            SeleniumHelper.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = new DealWithSpecifcMarksTriplet();

            Wait.WaitForDocumentReady();
            dealwithspecificmarktriplet.SearchCriteria.SelectDateRange = "Current Term";
            dealwithspecificmarktriplet.SearchCriteria.SelectMark      = "-";
            AttendanceNavigations.SelectClass("6A");
            dealwithspecificmarktriplet.SearchCriteria.Search <DealWithSpecificMarkPage>();
            Wait.WaitForDocumentReady();
            //  SeleniumHelper.Sleep(50);
            var classcolumn = SeleniumHelper.FindElement(By.XPath("//span[@class='header-text'][text()='Class']"));

            Assert.AreNotEqual(null, classcolumn);
        }
Esempio n. 5
0
        public void SearchMarksForWholeSchool(string academicyear, string Term, string startdate, string endDate)
        {
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = AttendanceNavigations.NavigateToDealWithSpecificMarksMenuPage();
            var searchpanel = dealwithspecificmarktriplet.SearchCriteria;

            searchpanel.SelectAcademicYear = academicyear;
            searchpanel.SelectDateRange    = Term;
            searchpanel.SelectMark         = "-";
            searchpanel.SelectWholeSchool();
            var dealwithpage = searchpanel.Search <DealWithSpecificMarkPage>();

            if (dealwithpage.IsValidationMessageDisplay())
            {
                Console.WriteLine("It's Non-working Day");
                return;
            }

            var headerTitle = WebContext.WebDriver.FindElement(By.CssSelector("[data-automation-id='deal_with_specific_marks_header']")).Text;

            Assert.IsTrue(headerTitle.Contains("Whole School"));
        }
Esempio n. 6
0
        public void VerifyFloodFill_Of_MarksAndCommentsSection(string registerdate, string YearGroup, string pupilForeName, string pupilSurName,
                                                               string gender, string dateOfBirth, string DateOfAdmission, string pupilName)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Edit Marks");

            var editmarksTriplet = new EditMarksTriplet();

            editmarksTriplet.SearchCriteria.StartDate = registerdate;
            editmarksTriplet.SearchCriteria.Week      = true;
            editmarksTriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var editmarkPage = editmarksTriplet.SearchCriteria.Search <EditMarksPage>();

            editmarkPage.ModePreserve = false;
            var editmarkTable = editmarkPage.Marks;
            IEnumerable <SchoolAttendanceCode> getANRs = Queries.GetAttendanceNotRequiredCodes();
            List <string> codes = getANRs.Select(x => x.Code).ToList <string>();

            if (codes.Contains(editmarkTable[1][2].Text))
            {
                Console.WriteLine("Marks can't be overwritten on Holidays");
                return;
            }
            // FloodFill data
            var markGridColumns = editmarkPage.Marks.Columns;

            markGridColumns[2].TimeIndicatorSelected = "AM";
            editmarkPage.CodeList = "L";
            editmarkPage.ClickSave();

            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            AutomationSugar.WaitForAjaxCompletion();
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = new DealWithSpecifcMarksTriplet();

            dealwithspecificmarktriplet.SearchCriteria.SelectDateRange = "Last 7 days";
            dealwithspecificmarktriplet.SearchCriteria.SelectMark      = "L";
            dealwithspecificmarktriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var dealwithpage = dealwithspecificmarktriplet.SearchCriteria.Search <DealWithSpecificMarkPage>();

            var dealwithTable = dealwithpage.DealWithSpecificMarkTable;

            var dealGridColumns = dealwithpage.DealWithSpecificMarkTable.Columns;

            //Apply Floodfill on Mark Column
            dealwithTable.Columns[3].Select();
            dealwithTable.Columns[3].ClickDownArrow();
            dealwithTable.FloodFillMarks = "N";
            dealwithTable.OverrideMarks  = true;
            dealwithTable.ApplySelectedModeOfMarks();

            //Apply Floodfill on Comments Column
            dealwithTable.Columns[5].Select();
            dealwithTable.Columns[5].ClickDownArrow();
            dealwithTable.FloodFillComments = SeleniumHelper.GenerateRandomString(20);
            dealwithTable.OverrideComments  = true;
            dealwithTable.ApplySelectedModeOfComments();

            dealwithTable.ClickSave();

            Assert.IsTrue(AutomationSugar.SuccessMessagePresent(dealwithpage.ComponentIdentifier));
        }
Esempio n. 7
0
        public void Should_Deal_With_SpecificMarks(string registerdate, string YearGroup, string pupilForeName, string pupilSurName,
                                                   string gender, string dateOfBirth, string DateOfAdmission, string pupilName)
        {
            #region Pre-Condition

            //Add new Pupil
            DateTime dobSetup             = Convert.ToDateTime(dateOfBirth);
            DateTime dateOfAdmissionSetup = Convert.ToDateTime(DateOfAdmission);

            var learnerIdSetup   = Guid.NewGuid();
            var BuildPupilRecord = this.BuildDataPackage();

            BuildPupilRecord.CreatePupil(learnerIdSetup, pupilSurName, pupilForeName, dobSetup, dateOfAdmissionSetup, YearGroup);

            DataSetup DataSetPupil = new DataSetup(purgeBeforeInsert: true, purgeAfterTest: true, packages: BuildPupilRecord);

            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Edit Marks");

            var editmarksTriplet = new EditMarksTriplet();
            editmarksTriplet.SearchCriteria.StartDate = registerdate;
            editmarksTriplet.SearchCriteria.Week      = true;
            editmarksTriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var editmarkPage = editmarksTriplet.SearchCriteria.Search <EditMarksPage>();

            editmarkPage.ModePreserve   = false;
            editmarkPage.ModeHorizontal = true;

            var editmarkTable = editmarkPage.Marks;

            IEnumerable <SchoolAttendanceCode> getANRs = Queries.GetAttendanceNotRequiredCodes();
            List <string> codes = getANRs.Select(x => x.Code).ToList <string>();

            if (codes.Contains(editmarkTable[1][2].Text))
            {
                Console.WriteLine("Marks can't be overwritten on Holidays");
                return;
            }
            var BlankMarkAM = editmarkTable[pupilName][2].Text = "L";
            var BlankMarkPM = editmarkTable[pupilName][3].Text = "L";

            editmarkPage.ClickSave();

            #endregion
            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            Wait.WaitLoading();
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = new DealWithSpecifcMarksTriplet();
            dealwithspecificmarktriplet.SearchCriteria.SelectDateRange = "Last 7 days";
            dealwithspecificmarktriplet.SearchCriteria.SelectMark      = "L";
            dealwithspecificmarktriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var dealwithpage = dealwithspecificmarktriplet.SearchCriteria.Search <DealWithSpecificMarkPage>();

            var dealwithTable = dealwithpage.DealWithSpecificMarkTable;

            var dealGridColumns = dealwithpage.DealWithSpecificMarkTable.Columns;

            dealwithTable.Columns[3].Select();

            dealwithTable.Columns[3].ClickDownArrow();
            dealwithTable.FloodFillMarks = "N";
            dealwithTable.OverrideMarks  = true;
            dealwithTable.ApplySelectedModeOfMarks();

            dealwithpage.Save();

            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Edit Marks");
            var editmarksTriplet1 = new EditMarksTriplet();
            //editmarksTriplet1.SearchCriteria.StartDate = registerdate;
            editmarksTriplet1.SearchCriteria.Week = true;
            //editmarksTriplet1.SearchCriteria.SelectYearGroup(YearGroup);
            var editmarkPage1 = editmarksTriplet1.SearchCriteria.Search <EditMarksPage>();

            var editmarkTable1 = editmarkPage1.Marks;
            Assert.AreEqual("N", editmarkTable1[pupilName][2].Value, "The selected cells cannot be upated from Deal With Specific Marks Screen");
            Assert.AreEqual("N", editmarkTable1[pupilName][3].Value, "The selected cells cannot be upated from Deal With Specific Marks Screen");
        }
Esempio n. 8
0
        public void VerifyMinuteLates_CanOnly_BeEntered_For_L_OR_U_Code(string registerdate, string YearGroup, string pupilForeName, string pupilSurName,
                                                                        string gender, string dateOfBirth, string DateOfAdmission, string pupilName)
        {
            #region Pre-Condition

            //Add new Pupil
            DateTime dobSetup             = Convert.ToDateTime(dateOfBirth);
            DateTime dateOfAdmissionSetup = Convert.ToDateTime(DateOfAdmission);

            var learnerIdSetup   = Guid.NewGuid();
            var BuildPupilRecord = this.BuildDataPackage();

            BuildPupilRecord.CreatePupil(learnerIdSetup, pupilSurName, pupilForeName, dobSetup, dateOfAdmissionSetup, YearGroup);

            DataSetup DataSetPupil = new DataSetup(purgeBeforeInsert: true, purgeAfterTest: true, packages: BuildPupilRecord);

            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Edit Marks");

            var editmarksTriplet = new EditMarksTriplet();
            editmarksTriplet.SearchCriteria.StartDate = registerdate;
            editmarksTriplet.SearchCriteria.Week      = true;
            editmarksTriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var editmarkPage = editmarksTriplet.SearchCriteria.Search <EditMarksPage>();

            editmarkPage.ModePreserve   = false;
            editmarkPage.ModeHorizontal = true;

            var editmarkTable = editmarkPage.Marks;

            IEnumerable <SchoolAttendanceCode> getANRs = Queries.GetAttendanceNotRequiredCodes();
            List <string> codes = getANRs.Select(x => x.Code).ToList <string>();

            if (codes.Contains(editmarkTable[1][2].Text))
            {
                Console.WriteLine("Marks can't be overwritten on Holidays");
                return;
            }
            var BlankMarkAM = editmarkTable[pupilName][2].Text = "B";
            var BlankMarkPM = editmarkTable[pupilName][3].Text = "B";

            editmarkPage.ClickSave();

            #endregion

            AutomationSugar.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            Wait.WaitLoading();
            DealWithSpecifcMarksTriplet dealwithspecificmarktriplet = new DealWithSpecifcMarksTriplet();
            dealwithspecificmarktriplet.SearchCriteria.SelectDateRange = "Last 7 days";
            dealwithspecificmarktriplet.SearchCriteria.SelectMark      = "B";
            dealwithspecificmarktriplet.SearchCriteria.SelectYearGroup(YearGroup);
            var dealwithpage = dealwithspecificmarktriplet.SearchCriteria.Search <DealWithSpecificMarkPage>();

            var dealwithTable = dealwithpage.DealWithSpecificMarkTable;

            //dealwithTable[pupilName][4].Text = "10";
            //IWebElement el = WebContext.WebDriver.FindElement(By.CssSelector(".tooltip.fade.bottom.in"));
            //Assert.That(el.Text == String.Empty, "For Other Than L and U codes, Minute Late Can't be applied");

            dealwithTable.Columns[4].Select();

            dealwithTable.Columns[4].ClickDownArrow();
            dealwithTable.FloodFillMinuteLate = "10";
            dealwithTable.OverrideMinuteLate  = true;
            dealwithTable.ApplySelectedModeOfMinuteLate();

            Assert.IsTrue(dealwithTable[2][4].Text == "Minutes Late can only be recorded against code L or U");
        }
Esempio n. 9
0
        public void TC_ATT07_Validate_Deal_with_Chosen_Code_functionality(string foreName, string surName, string gender, string DOB, string dateOfAdmission, string yearGroup, string className,
                                                                          string academicYear, string searchMark)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);

            #region Pre-Condition

            //Navigate to Pupil Record
            SeleniumHelper.NavigateQuickLink("Pupil Records");
            var pupilRecords = new PupilRecordTriplet();

            //Add new pupil
            var addNewPupilDialog = pupilRecords.AddNewPupil();
            addNewPupilDialog.Forename    = foreName;
            addNewPupilDialog.SurName     = surName;
            addNewPupilDialog.Gender      = gender;
            addNewPupilDialog.DateOfBirth = DOB;
            var registrationDetailDialog = addNewPupilDialog.Continue();
            registrationDetailDialog.DateOfAdmission = dateOfAdmission;
            registrationDetailDialog.YearGroup       = yearGroup;
            registrationDetailDialog.ClassName       = className;
            registrationDetailDialog.CreateRecord();
            var confirmRequiredDialog = new ConfirmRequiredDialog();
            confirmRequiredDialog.ClickOk();

            //Save pupil
            //var pupilRecord = PupilRecordPage.Create();
            //pupilRecord.SavePupil();
            SeleniumHelper.CloseTab("Pupil Record");

            #endregion

            #region Test steps

            //Navigate to Deal with Chosen
            SeleniumHelper.NavigateMenu("Tasks", "Attendance", "Deal with Specific Marks");
            var dealwithCodes = new DealWithSpecifcMarksTriplet();

            //Select Search Criteria
            dealwithCodes.SearchCriteria.SelectAcademicYear = academicYear;
            dealwithCodes.SearchCriteria.SelectMark         = searchMark;
            dealwithCodes.SearchCriteria.YearGroup          = "Year 2";
            var dealChosenCode = dealwithCodes.SearchCriteria.Search <DealWithSpecificMarkPage>();

            //Input by keyboard
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][1].Marks = "/";
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][2].Marks = "\\";
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][3].Marks = "/";

            //Input by drop-down
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][4].MarkDropDown = "A";
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][5].MarkDropDown = "C";

            //Save
            dealChosenCode.Save();

            //Verify input
            marksRow = dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)];
            Assert.AreEqual("/", marksRow[1].Marks, "Cannot input by keyboard");
            Assert.AreEqual("\\", marksRow[2].Marks, "Cannot input by keyboard");
            Assert.AreEqual("/", marksRow[3].Marks, "Cannot input by keyboard");
            Assert.AreEqual("A", marksRow[4].Marks, "Cannot input by dropdown");
            Assert.AreEqual("C", marksRow[5].Marks, "Cannot input by dropdown");
            Assert.AreEqual("A", marksRow[6].Marks, "Cannot input by code list");
            Assert.AreEqual("B", marksRow[7].Marks, "Cannot input by code list");
            Assert.AreEqual("C", marksRow[8].Marks, "Cannot input by code list");

            //Verify can edit in mode overwrite
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][1].MarkDropDown = "A";
            Assert.AreEqual("A", dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][1].Text, "Mark cannot be edit in overwrite mode by dropdown");
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][2].Select();
            dealChosenCode.Code = "B";
            Assert.AreEqual("B", dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][2].Text, "Mark cannot be edit in overwrite mode by select from code list");

            //Verify cannot edit with invalid value
            dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][3].Marks = "T";
            Assert.AreEqual("/", dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][3].Text, "Mark can be edit with invalid value by keyboard");

            //Add comment
            var addComment = dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][1].AddComment();
            addComment.Comment = "Test Comment";
            addComment.ClickOk();

            //Save
            dealChosenCode.Save();

            //Verify comment
            dealChosenCode = dealChosenCodes.SearchCriteria.Search <DealWithChosenPage>();
            addComment     = dealChosenCode.Marks[String.Format("{0}, {1}", surName, foreName)][1].AddComment();
            Assert.AreEqual("Test Comment", addComment.Comment, "Can not add comment in Deal with Chosen code page");
            addComment.ClickCancel();

            //Verify mark of Edit Mark page
            SeleniumHelper.NavigateQuickLink("Edit Marks");
            var editMarkTriplet = new EditMarksTriplet();
            editMarkTriplet.SearchCriteria.Week = true;
            editMarkTriplet.SearchCriteria.SelectClass(className);
            editMarkTriplet.SearchCriteria.SelectYearGroup(yearGroup);
            var editMarks = editMarkTriplet.SearchCriteria.Search <EditMarksPage>();
            var marks     = editMarks.Marks[String.Format("{0}, {1}", surName, foreName)];
            Assert.AreEqual("A", marks[1].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("B", marks[2].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("/", marks[3].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("A", marks[4].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("C", marks[5].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("A", marks[6].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("B", marks[7].Text, "Change in Deal Chosen Screen is not record");
            Assert.AreEqual("C", marks[8].Text, "Change in Deal Chosen Screen is not record");

            #endregion
        }