Beispiel #1
0
        public void ShouldHaveMandatorySelectedPupilDateField()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

            ecSelectedPupil.ClickCreate();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage = ecSelectedPupil.ClickSelectedPupilOption();

            ecSelectedPupilPage.EnterDescription("Test Exceptional Circumstances");
            ecSelectedPupilPage.mainPageStartDate.Clear();
            ecSelectedPupilPage.mainPageEndDate.Clear();

            AttendanceSearchPanel searchCriteria = ecSelectedPupilPage.ClickAddPupilLink();
            var checkbox = SeleniumHelper.Get(AttendanceElements.AddPupilPopUpElements.PupilPickerSearchPanel);

            checkbox.Click(SeSugar.Automation.SimsBy.AutomationId("section_menu_Year Group"));
            checkbox.FindCheckBoxAndClick("Year Group", new List <string> {
                "Year 1", "Year 3"
            });
            PupilPickerAvailablePupilSection AvailablePupils = searchCriteria.PupilPickerSearchButton();

            AvailablePupils.GetAvailablePupils();
            PupilPickerSelectedPupilSection    selectedPupil        = AvailablePupils.AddSelectedPupil();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage1 = selectedPupil.ClickExceptionalCircumstances_PupilPickerOkButton();

            ecSelectedPupilPage1.Save();
            Assert.IsTrue(ecSelectedPupilPage1.IsDisplayedValidationWarning());
        }
Beispiel #2
0
        public void ShouldAddSelectedPupilsInGrid(string startDate, string endDate, string yeargroup, string pupilForeName, string pupilSurName,
                                                  string pupilName, string dateOfBirth, string DateOfAdmission)
        {
            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: false, purgeAfterTest: true, packages: BuildPupilRecord);

            AttendancePatternPage page           = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();
            AttendanceSearchPanel searchcriteria = page.ClickAddPupilLink();

            var checkbox = SeleniumHelper.Get(AttendanceElements.AddPupilPopUpElements.PupilPickerSearchPanel);

            checkbox.Click(SimsBy.AutomationId("section_menu_Year Group"));
            checkbox.FindCheckBoxAndClick("Year Group", new List <string> {
                yeargroup
            });
            PupilPickerAvailablePupilSection AvailablePupils = searchcriteria.PupilPickerSearchButton();

            AvailablePupils.GetAvailablePupils();
            PupilPickerSelectedPupilSection selectedPupil = AvailablePupils.AddSelectedPupil();
            AttendancePatternPage           app1          = selectedPupil.ClickAttendancePattern_PupilPickerOkButton();

            Assert.IsTrue(app1.trashIcon.Displayed);
        }
        public void OverwriteModeOfMarks_OnAttendanceRegister()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var registerView = new AttendanceSearchPanel();

            registerView.ClickRadioButton("Week");

            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            AttendanceDetails editMarksPage = group.EditMarksSearchButton();

            //Vertical Cursor Orientation in Preserve Mode
            EditMarksGridHelper grid = new EditMarksGridHelper();

            grid.ClickOrientationbutton(grid.preserveButton);
            grid.ClickOrientationbutton(grid.overwriteMode);
            EditMarksGridHelper.ClickFirstCellofColumn("3");
            EditMarksGridHelper.GetEditor().SendKeys("L");
            EditMarksGridHelper.GetEditor().SendKeys("L");
            EditMarksGridHelper.GetEditor().SendKeys("B");
            EditMarksGridHelper.GetEditor().SendKeys("C");
            EditMarksGridHelper.GetEditor().SendKeys("C");
            EditMarksGridHelper.GetEditor().SendKeys("D");
        }
        private void Select_Year_And_NavigateToEditMarksScreen()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var search_filter = new AttendanceSearchPanel();

            search_filter.Select("Year Group", "Year 1", "Year 2");
            search_filter.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            search_filter.EditMarksSearchButton();
        }
Beispiel #5
0
        public void PupilPickerSearchPanelShouldContain_Name_Year_Class_And_SearchButton()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

            ecSelectedPupil.ClickCreate();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage = ecSelectedPupil.ClickSelectedPupilOption();
            AttendanceSearchPanel searchcriteria = ecSelectedPupilPage.ClickAddPupilLink();

            Assert.IsTrue(searchcriteria.pupilNameFilter.Displayed && searchcriteria.classFilter.Displayed && searchcriteria.yeargroupFilter.Displayed && searchcriteria.searchButton.Displayed);
        }
        public void ShouldHaveSummarySection()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails editMarksPage = group.EditMarksSearchButton();

            Assert.IsTrue(editMarksPage.IsSummarySectionDisplayed());
        }
        public void ShouldHavePupilLogLinkAndAttendanceNoteOnPLogPopUp()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails    editMarksPage = group.EditMarksSearchButton();
            EditMarksPupilDetail plog          = editMarksPage.ClickPupilLink();

            Assert.IsTrue(plog.viewPlogNote.Displayed && plog.attendanceNote.Displayed);
        }
        public void ShouldDisplayAdditionalColumnDialog()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();

            //Select Class and Year Group
            var search_filter = new AttendanceSearchPanel();

            search_filter.Select("Year Group", "Year 1", "Year 2");
            AttendanceDetails editMarksGrid = search_filter.EditMarksSearchButton();

            // Check if the Identifier button is displayed
            Assert.IsTrue(editMarksGrid.additionalColumnButton.Displayed);
        }
        public void ShouldRedirectToPupilLogPage_OnClickOfPupilLogLink()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails    editMarksPage = group.EditMarksSearchButton();
            EditMarksPupilDetail plog          = editMarksPage.ClickPupilLink();

            plog.ClickViewPupilLogLink();
            Assert.IsTrue(plog.pupilLogPage.Displayed);
        }
        public void VerifyMaxLengthOfNoteAndTitleField()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails    editMarksPage = group.EditMarksSearchButton();
            EditMarksPupilDetail plog          = editMarksPage.ClickPupilLink();

            plog.ClickOnAttendanceNoteButton();
            Assert.IsTrue(plog.attendanceNoteTextArea.GetAttribute("data-rule-maxlength") == "4000" && plog.attendanceTitleArea.GetAttribute("maxlength") == "200");
        }
Beispiel #11
0
        public void VerifyPupilNameSearchFilter()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

            ecSelectedPupil.ClickCreate();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage = ecSelectedPupil.ClickSelectedPupilOption();
            AttendanceSearchPanel searchcriteria = ecSelectedPupilPage.ClickAddPupilLink();

            SearchCriteria.SetCriteria("LegalSurname", "a");
            PupilPickerAvailablePupilSection availablePupils = searchcriteria.PupilPickerSearchButton();

            Assert.IsTrue(availablePupils.searchResults.Displayed);
        }
        public void ShouldHaveMandatoryNoteField()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails    editMarksPage = group.EditMarksSearchButton();
            EditMarksPupilDetail plog          = editMarksPage.ClickPupilLink();

            plog.ClickOnAttendanceNoteButton();
            plog.AttendanceNoteTextSave();
            Assert.IsTrue(plog.attendanceNotevalidationWarning.Displayed);
        }
        public void VerifySummarySectionRows()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails editMarksPage = group.EditMarksSearchButton();
            var summaryRows = editMarksPage.SummarySection().ToList();

            Assert.AreEqual(summaryRows[0].Text, "Total Present + AEA");
            Assert.AreEqual(summaryRows[1].Text, "Total Unrecorded");
            Assert.AreEqual(summaryRows[2].Text, "Total Authorised Absence");
            Assert.AreEqual(summaryRows[3].Text, "Total Unauthorised Absence");
        }
Beispiel #14
0
        public void VerifyYearGroupSearchFilter()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

            ecSelectedPupil.ClickCreate();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage = ecSelectedPupil.ClickSelectedPupilOption();
            AttendanceSearchPanel searchcriteria = ecSelectedPupilPage.ClickAddPupilLink();
            var searchCriteria = SeleniumHelper.Get(AttendanceElements.AddPupilPopUpElements.PupilPickerSearchPanel);

            searchCriteria.Click(SeSugar.Automation.SimsBy.AutomationId("section_menu_Year Group"));
            searchCriteria.FindCheckBoxAndClick("Year Group", new List <string> {
                "Year 1", "Year 3"
            });
            PupilPickerAvailablePupilSection availablePupils = searchcriteria.PupilPickerSearchButton();

            Assert.IsTrue(availablePupils.searchResults.Displayed);
        }
        public void VerifyWeekViewOfRegister()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var registerView = new AttendanceSearchPanel();

            registerView.ClickRadioButton("Week");
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            AttendanceDetails editMarksPage = group.EditMarksSearchButton();

            IWebElement grid    = SeleniumHelper.Get(By.CssSelector("[data-section-id=\"searchResults\"]"));
            var         columns = grid.FindElements(By.CssSelector("[data-menu-column-id]"));

            // Only the Pupil Name column And Single Day Sessions should be present in the grid
            Assert.IsTrue(columns.Count == 12);
        }
        public void ShouldAddSelectedPupilsInGrid()
        {
            ApplyMarkOverDateRangePage page           = AttendanceNavigations.NavigateToApplyMarkOverDateRangeFromTaskMenu();
            AttendanceSearchPanel      searchcriteria = page.ClickAddPupilButton();
            var checkbox = SeleniumHelper.Get(AttendanceElements.AddPupilPopUpElements.PupilPickerSearchPanel);

            checkbox.FindCheckBoxAndClick("Year Group", new List <string> {
                "Year 1", "Year 3"
            });
            PupilPickerAvailablePupilSection AvailablePupils = searchcriteria.PupilPickerSearchButton();

            AvailablePupils.GetAvailablePupils();
            PupilPickerSelectedPupilSection selectedPupil = AvailablePupils.AddSelectedPupil();
            ApplyMarkOverDateRangePage      app1          = selectedPupil.ClickApplyMarkOverDateRange_PupilPickerOkButton();

            Assert.IsTrue(app1.PupilGrid.Displayed);
        }
        public void CreateAttendaceNoteWithoutPinNote()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            group.EnterDate(SeleniumHelper.GetFirstDayOfWeek(DateTime.Now).ToShortDateString());
            AttendanceDetails    editMarksPage = group.EditMarksSearchButton();
            EditMarksPupilDetail plog          = editMarksPage.ClickPupilLink();

            plog.ClickOnAttendanceNoteButton();
            plog.EnterTextInAttendanceNoteTextArea("Test Note For Attendance Plog");
            plog.EnterTitle("AttendanceNote");
            AttendanceDetails    editMarksPage1 = plog.AttendanceNoteTextSave();
            EditMarksPupilDetail plog1          = editMarksPage1.ClickPupilLink();

            plog1.ClickViewPupilLogLink();
            Assert.IsTrue(plog.AttendanceNoteOnPupilLogPage.Displayed);
        }
Beispiel #18
0
        public void ShouldAddSelectedPupilsInGrid()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

            ecSelectedPupil.ClickCreate();
            CreateExceptionalCircumstancesPage ecSelectedPupilPage = ecSelectedPupil.ClickSelectedPupilOption();
            AttendanceSearchPanel searchCriteria = ecSelectedPupilPage.ClickAddPupilLink();
            var checkbox = SeleniumHelper.Get(AttendanceElements.AddPupilPopUpElements.PupilPickerSearchPanel);

            checkbox.Click(SeSugar.Automation.SimsBy.AutomationId("section_menu_Year Group"));
            checkbox.FindCheckBoxAndClick("Year Group", new List <string> {
                "Year 1", "Year 3"
            });
            PupilPickerAvailablePupilSection AvailablePupils = searchCriteria.PupilPickerSearchButton();

            AvailablePupils.GetAvailablePupils();
            PupilPickerSelectedPupilSection    selectedPupil = AvailablePupils.AddSelectedPupil();
            CreateExceptionalCircumstancesPage app1          = selectedPupil.ClickExceptionalCircumstances_PupilPickerOkButton();

            Assert.IsTrue(app1.Trashicon.Displayed);
        }
        public void PreseveModeOfMarks_OnAttendanceRegister()
        {
            AttendanceNavigations.NavigateToEditMarksMenuPage();
            var registerView = new AttendanceSearchPanel();

            registerView.ClickRadioButton("Week");

            var group = new AttendanceSearchPanel();

            group.Select("Year Group", "Year 1", "Year 2");
            AttendanceDetails editMarksPage = group.EditMarksSearchButton();

            var editMarksTripletPage = new EditMarksTriplet();
            var editPage             = editMarksTripletPage.SearchCriteria.Search <EditMarksPage>();

            var editmarkTable = editPage.Marks;
            IEnumerable <SchoolAttendanceCode> getHolidays = Queries.GetAttendanceNotRequiredCodes();
            List <string> codes = getHolidays.Select(x => x.Code).ToList <string>();

            if (codes.Contains(editmarkTable[1][2].Text))
            {
                Console.WriteLine("Marks can't be overwritten on Holidays");
                return;
            }

            //Vertical Cursor Orientation in Preserve Mode
            EditMarksGridHelper grid = new EditMarksGridHelper();

            grid.ClickOrientationbutton(grid.preserveButton);
            grid.ClickOrientationbutton(grid.preserveMode);
            EditMarksGridHelper.ClickFirstCellofColumn("3");
            EditMarksGridHelper.GetEditor().SendKeys("L");
            EditMarksGridHelper.GetEditor().SendKeys("L");
            EditMarksGridHelper.GetEditor().SendKeys("B");
            EditMarksGridHelper.GetEditor().SendKeys("C");
            EditMarksGridHelper.GetEditor().SendKeys("C");
            EditMarksGridHelper.GetEditor().SendKeys("D");
        }