Exemplo n.º 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());
        }
Exemplo n.º 2
0
        public void VerifySelectedPupilSection()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            Assert.IsTrue(ecSelectedPupilPage.SelectedPupilSection.Displayed && ecSelectedPupilPage.AddPupilLink.Displayed);
        }
Exemplo n.º 3
0
        public void CreateExceptionalCircumstancesForSelectedPupil()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            CreateExceptionalCircumstanceForSelectedPupil(ecSelectedPupilPage);
            //Assert.IsTrue(ECSelectedPupilPage.HasConfirmedSave());
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public void DefaultStartAndEndSessionsForSelectedPupil()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            string SessionStart = ECSelectedPupilPage.SessionStart.GetValue();
            string SessionEnd   = ECSelectedPupilPage.SessionEnd.GetValue();

            Assert.That(SessionStart == "AM" && SessionEnd == "PM");
        }
Exemplo n.º 6
0
        public void DeleteExceptionalCircumstancesForSelectedPupil()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            CreateExceptionalCircumstanceForSelectedPupil(ecSelectedPupilPage);
            //Click on Delete button
            ecSelectedPupilPage.Delete();
            Assert.IsTrue(ecSelectedPupilPage.DeleteDialogDisappeared());
        }
Exemplo n.º 7
0
        public void DefaultStartAndEndDateRangeForSelectedPupil()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            DateTime DefaultStartDate = Convert.ToDateTime(ecSelectedPupilPage.mainPageStartDate.GetAttribute("value"));
            DateTime DefaultEndDate   = Convert.ToDateTime(ecSelectedPupilPage.mainPageEndDate.GetAttribute("value"));

            Assert.That(DefaultStartDate, Is.EqualTo(DateTime.Now.Date));
            Assert.That(DefaultEndDate, Is.EqualTo(DateTime.Now.Date));
        }
Exemplo n.º 8
0
        public void ShouldHaveMandatorySelectedPupilSessions()
        {
            ExceptionalCircumstancePage ecSelectedPupil = AttendanceNavigations.NavigateToExceptionalCircumstancePageFromTaskMenu1();

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

            ecSelectedPupilPage.EnterDescription("Test Exceptional Circumstances");
            ecSelectedPupilPage.SessionStart.Clear();
            ecSelectedPupilPage.SessionEnd.Clear();
            ecSelectedPupilPage.Save();
            Assert.IsTrue(ecSelectedPupilPage.IsDisplayedValidationWarning());
        }
Exemplo n.º 9
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);
        }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
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);
        }