Пример #1
0
        public void PreviousYearStatements()
        {
            NavigateToPOSMarksheet();
            //Search for a POS Marksheet
            POSSearchPannel possearchpanel = new POSSearchPannel();

            //Select a Group
            possearchpanel = possearchpanel.SelectGroup("Year 3");
            //Select a Subject
            possearchpanel = possearchpanel.SelectSubject("English: Reading");
            //Select a Strand
            possearchpanel = possearchpanel.SelectStrand("Comprehension");
            //Select a Assessment Period
            possearchpanel = possearchpanel.SelectAssessmentPeriod("Year 3 Autumn");
            //Select a Year Group
            possearchpanel = possearchpanel.OpenYearGroupSelectionDropdown("Year  3");
            //Click on Search Button
            POSDataMaintainanceScreen posdatamaintainance = possearchpanel.Search();

            Thread.Sleep(3000);

            //Verifying Toogle Functionality for Summative Columns
            POSToolbar postoolbar = new POSToolbar();

            postoolbar          = postoolbar.OpenToggleMenuList();
            posdatamaintainance = postoolbar.ClickPreviousYearStatementsToggleOption(true);
            Assert.IsTrue(posdatamaintainance.VerifyColumnPresent("En Handwrite S 2.01"));
            Assert.IsTrue(posdatamaintainance.VerifyColumnPresent("En Handwrite S 34.01"));

            //    List<IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnName("En Handwrite N 2.01");

            //    columnList.First().Click();
            //    List<string> GradeDetails = new List<string>
            //    { "M", "S", "D", "U", "E"};
            //    for (int i = 0; i < GradeDetails.Count; i++)
            //    {
            //        MarksheetGridHelper.GetEditor().SendKeys(GradeDetails[i]);
            //        MarksheetGridHelper.PerformEnterKeyBehavior();

            //    }

            //    postoolbar.ClickSaveButton();
            //    //    postoolbar.SaveMarksheetAssertionSuccess();
            //    Thread.Sleep(3000);
            //}
        }
Пример #2
0
        public void VerifyPOSMarksheetColumnHeaderonSearch()
        {
            NavigateToPOSMarksheet();

            ////Search for a POS Marksheet
            //POSSearchPannel possearchpanel = new POSSearchPannel();
            //List<string> temp = new List<string>();
            //List<string> learninglevelcode = new List<string>();
            //List<string> SubjectCode = new List<string>();
            //List<string> SubjectName = new List<string>();
            //List<Guid> StrandSubjectTypeID = new List<Guid>();
            //learninglevelcode = TestData.CreateDataList("Select Code From LearningLevel order by Name desc", "Code");
            //StrandSubjectTypeID = TestData.CreateGuidList("Select ID From AssessmentSubjectType Where Name = 'Strand' and TenantID = '" + TestDefaults.Default.TenantId + "'", "ID");
            //SubjectCode = TestData.CreateDataList("Select * From AssessmentSubject Where ID IN (Select AssessmentSubject From LearningActivity Where ID IN (Select ID From LearningProject Where Code Like '%" + learninglevelcode[11] + "%')) And AssessmentSubjectType != '" + StrandSubjectTypeID[0] + "' Order By Code", "Code");
            //SubjectName = TestData.CreateDataList("Select * From AssessmentSubject Where ID IN (Select AssessmentSubject From LearningActivity Where ID IN (Select ID From LearningProject Where Code Like '%" + learninglevelcode[11] + "%')) And AssessmentSubjectType != '" + StrandSubjectTypeID[0] + "' Order By Name", "Name");
            ////Select a Group
            //temp = TestData.CreateDataList("Select Name From LearningLevel order by Name desc", "Name");
            //possearchpanel = possearchpanel.SelectGroup(temp[11]);
            ////Select a Subject
            //possearchpanel = possearchpanel.SelectSubject(learninglevelcode[11] + ":" + SubjectCode[0] + "-" + SubjectName[0]);
            ////Select a Strand
            //temp = new List<string>();
            //temp = TestData.CreateDataList("Select Name From AssessmentSubject Where Name Like '%" + SubjectName[0] + "%' And AssessmentSubjectType = '" + StrandSubjectTypeID[0] + "'", "Name");
            //List<string> StrandCode = new List<string>();
            //StrandCode = TestData.CreateDataList("Select Code From LearningActivity Where AssessmentSubject IN (Select ID From AssessmentSubject Where Name Like '%" + SubjectName[0] + "%' And AssessmentSubjectType = '" + StrandSubjectTypeID[0] + "') And Code Like '%" + learninglevelcode[11] + "%'", "");
            //possearchpanel = possearchpanel.SelectStrand(StrandCode[0] + "-" + temp[0]);
            ////Select a Assessment Period
            //temp = new List<string>();
            //temp = TestData.CreateDataList("Select Name From AssessmentPeriod", "Name");
            //possearchpanel = possearchpanel.SelectAssessmentPeriod(temp[0]);
            ////Select a Year Group
            //possearchpanel = possearchpanel.OpenYearGroupSelectionDropdown();
            //temp = new List<string>();
            //temp = TestData.CreateDataList("Select FullName From YearGroup", "FullName");
            //possearchpanel.SelectYearGroup(temp[0]);

            //Search for a POS Marksheet
            POSSearchPannel possearchpanel = new POSSearchPannel();

            //Select a View
            possearchpanel = possearchpanel.SelectView("Scheme");
            //Select a Scheme
            possearchpanel = possearchpanel.SelectScheme("DFE National Curriculum");
            //Select a Group
            possearchpanel = possearchpanel.SelectGroup("Year 2");
            //Select a Subject
            possearchpanel = possearchpanel.SelectSubject("English: Reading");
            //Select a Strand
            possearchpanel = possearchpanel.SelectStrand("Comprehension");
            //Select a Assessment Period
            possearchpanel = possearchpanel.SelectAssessmentPeriod("Year 2 Autumn");
            //Select a Year Group
            possearchpanel = possearchpanel.OpenYearGroupSelectionDropdown("Year  2");

            //Click on Search Button
            POSDataMaintainanceScreen posdatamaintainance = possearchpanel.Search();

            POSToolbar postoolbar = new POSToolbar();

            postoolbar          = postoolbar.OpenToggleMenuList();
            posdatamaintainance = postoolbar.ClickNextYearStatementsToggleOption(false);
            posdatamaintainance = postoolbar.ClickPreviousYearStatementsToggleOption(false);
            postoolbar.ToggleButton.Click();
            //Get all the Marksheet Columns
            List <string> POSMarksheetColumnNames = posdatamaintainance.GetAllMarksheetColumnNames();
            //Expected Marksheet Columns
            List <string> ExpectedPOSMarksheetColumnNames = new List <string>();

            ExpectedPOSMarksheetColumnNames.Add("% of PoS Expectations Achieved");
            ExpectedPOSMarksheetColumnNames.Add("% of School Expectations Achieved");

            //ExpectedPOSMarksheetColumnNames = TestData.CreateDataList("Select Heading From MarksheetTemplateItem Where ID IN (Select MarksheetTemplateItem From MarksheetTemplateColumn Where ColumnDefinition IN (Select ID From ColumnDefinition Where Aspect IN (Select ID From Aspect Where LearningProject IN (Select ID From LearningActivity Where Code = '" + StrandCode[0] + "'))))", "");
            ExpectedPOSMarksheetColumnNames.AddRange(TestData.CreateDataList("Select Heading From MarksheetTemplateItem Where ID IN (Select MarksheetTemplateItem From MarksheetTemplateColumn Where ColumnDefinition IN (Select ID From ColumnDefinition Where Aspect IN (select id from aspect where LearningActivity in (select id from LearningActivity where code in (select code from Statement where id in(select Statement from SubjectLevelStatement where strand in(select id from Strand where name = 'Comprehension') and SubjectLevel in (select id from SubjectLevel where LearningLevel in (select id from LearningLevel where code = 'YR2' And TenantID = '" + TestDefaults.Default.TenantId + "')) )))))) ", "Heading"));

            List <String> POSColumnsdisplayed = new List <string>();

            foreach (String eachitem in POSMarksheetColumnNames)
            {
                POSColumnsdisplayed.Add(eachitem.Replace(" ", string.Empty).ToLower());
            }

            foreach (String eachitem in ExpectedPOSMarksheetColumnNames)
            {
                Assert.IsTrue(POSColumnsdisplayed.Contains(eachitem.Replace(" ", string.Empty).ToLower()));
            }
        }