Beispiel #1
0
        public void PatternDropdwonandSelectedPupilsdValidations()
        {
            AttendancePatternPage app = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();

            app.ClickApplyPatternButton();
            Assert.IsTrue(app.ValidationWarning.Displayed, "Validation Warning");
        }
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);
        }
Beispiel #3
0
        public void VerifyAttendancePattenCodesForAMSession()
        {
            AttendancePatternPage page = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();
            var patternCodes           = page.PatternCodesForAMSession();

            Assert.IsTrue(patternCodes);
        }
Beispiel #4
0
        public void ShouldHaveMandatoryDateField()
        {
            AttendancePatternPage app = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();

            app.StartDate.Clear();
            app.EndDate.Clear();
            app.ClickApplyPatternButton();
            Assert.IsTrue(app.ValidationWarning.Displayed, "Validation Warning");
        }
Beispiel #5
0
        public void CheckDefaultValueOfDatePicker(string academicYear, string dropdowntext)
        {
            AttendancePatternPage page    = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();
            string   defaultdropdownValue = page.SelectDateRangeButtonDefaultValue.Text.Trim();
            string   defaultacademicyear  = page.academicYearDropdown.GetValue();
            DateTime dStartDate           = Convert.ToDateTime(page.StartDate.GetValue());
            DateTime dEndDate             = Convert.ToDateTime(page.EndDate.GetValue());

            Assert.IsTrue((defaultdropdownValue == dropdowntext) && defaultacademicyear == academicYear && dStartDate == page.weekstartdate() && dEndDate == page.weekEndDate());
        }
Beispiel #6
0
        public void ShouldHaveStartDateLessthanEndDate()
        {
            AttendancePatternPage app = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();

            app.StartDate.Clear();
            app.StartDate.SendKeys(Convert.ToString(DateTime.Today.ToShortDateString()));
            app.EndDate.Clear();
            app.EndDate.SendKeys(Convert.ToString(DateTime.Today.AddDays(-1).ToShortDateString()));
            app.ClickApplyPatternButton();
            Assert.IsTrue(app.ValidationWarning.Displayed, "Validation Warning");
        }
Beispiel #7
0
        public void VerifySelectedPupilSection()
        {
            AttendancePatternPage page = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();

            Assert.IsTrue(page.SelectedPupilSection.Displayed && page.AddPupilLink.Displayed);
        }
Beispiel #8
0
        public void ShouldDisplayAttendancePatternDialog_OnClickOfMenuAttendancePattern()
        {
            AttendancePatternPage page = AttendanceNavigations.NavigateToAttendancePatternFromTaskMenu();

            Assert.IsTrue(page.AttendancePatternDialog.Displayed && page.ApplyPattern.Displayed && page.closeButton.Displayed);
        }
Beispiel #9
0
        public void VerifyAddAndRemoveLinks_On_AttendancePattenDialog_OnPupilRecordPage()
        {
            AttendancePatternPage page = AttendanceNavigations.NavigateToAttendancePatternPage_OnPupilRecordPage();

            Assert.IsTrue(page.LinksAbsent());
        }