public void CloneScheme() { NavigateToCreateScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); string schemeName = SchemeSearchPanel.GenerateRandomString(10); string schemeDescription = SchemeSearchPanel.GenerateRandomString(20); string schemeShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(schemeName, schemeDescription, schemeShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); AddStatement(); schemeSearchPanel.ClickSaveButton(); schemeSearchPanel.waitforSavemessagetoAppear(); schemeSearchPanel.SaveMessageAssertionSuccess(); schemeSearchPanel.ClickCancelButton(); schemeSearchPanel.NavigateToNewFromExistingScheme(); CloneSchemeSearchPanel cloneschemeSearchPanel = new CloneSchemeSearchPanel(); cloneschemeSearchPanel.SetSchemeName(schemeName); cloneschemeSearchPanel.Search(); cloneschemeSearchPanel.SelectSchemeByName(schemeName); cloneschemeSearchPanel.ClickSelectSchemeButton(); cloneschemeSearchPanel.ClickOkButton(); string clonedSchemeName = cloneschemeSearchPanel.GetClonedSchemeName(); Assert.IsTrue(clonedSchemeName.Contains(schemeName)); }
public void DeleteStrand() { NavigateToModifyExistingScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); // create Subject schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewSubjectLink(); string SubjectName = SchemeSearchPanel.GenerateRandomString(10); string SubjectDescription = SchemeSearchPanel.GenerateRandomString(20); string SubjectShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(SubjectName, SubjectDescription, SubjectShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // create Strand schemeSearchPanel = schemeSearchPanel.ClickCreateStrandButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStrandLink(); string StrandName = SchemeSearchPanel.GenerateRandomString(10); string StrandDescription = SchemeSearchPanel.GenerateRandomString(20); string StrandShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StrandName, StrandDescription, StrandShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // delete strand schemeSearchPanel = schemeSearchPanel.ClickDeleteStrandButton(); schemeSearchPanel = schemeSearchPanel.ClickDeleteOKButton(); Thread.Sleep(1000); }
public void EditStrand() { NavigateToModifyExistingScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); // create Subject schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewSubjectLink(); string SubjectName = SchemeSearchPanel.GenerateRandomString(10); string SubjectDescription = SchemeSearchPanel.GenerateRandomString(20); string SubjectShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(SubjectName, SubjectDescription, SubjectShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // create Strand schemeSearchPanel = schemeSearchPanel.ClickCreateStrandButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStrandLink(); string StrandName = SchemeSearchPanel.GenerateRandomString(10); string StrandDescription = SchemeSearchPanel.GenerateRandomString(20); string StrandShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StrandName, StrandDescription, StrandShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // edit strand schemeSearchPanel = schemeSearchPanel.ClickEditStrandButton(); schemeSearchPanel.SetNameAndDescription(StrandName + ". Edited", StrandDescription + ". Edited", StrandShortName + ". Edited"); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); }
public void NavigateToNewFromExistingScheme() { WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout)); String[] featureList = { "Curriculum" }; FeatureBee.FeatureBeeLogin.LoginWithFeatureBee(featureList, FeatureBee.FeatureBeeLogin.iSIMSUserType.AssessmentCoordinator); AutomationSugar.NavigateMenu("Tasks", "Assessment", "Manage Curriculum Schemes"); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); schemeSearchPanel.NavigateToNewFromExistingScheme(); }
public void AddNewScheme() { NavigateToCreateScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); string schemeName = SchemeSearchPanel.GenerateRandomString(10); string schemeDescription = SchemeSearchPanel.GenerateRandomString(20); string shortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(schemeName, schemeDescription, shortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); }
private void AddSubject() { SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); // create Subject schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewSubjectLink(); string SubjectName = SchemeSearchPanel.GenerateRandomString(10); string SubjectDescription = SchemeSearchPanel.GenerateRandomString(20); string SubjectShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(SubjectName, SubjectDescription, SubjectShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); }
public void DeleteStatement() { NavigateToModifyExistingScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); // create Subject schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewSubjectLink(); string SubjectName = SchemeSearchPanel.GenerateRandomString(10); string SubjectDescription = SchemeSearchPanel.GenerateRandomString(20); string SubjectShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(SubjectName, SubjectDescription, SubjectShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // create Strand schemeSearchPanel = schemeSearchPanel.ClickCreateStrandButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStrandLink(); string StrandName = SchemeSearchPanel.GenerateRandomString(10); string StrandDescription = SchemeSearchPanel.GenerateRandomString(20); string StrandShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StrandName, StrandDescription, StrandShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); //add Levels schemeSearchPanel = schemeSearchPanel.ClickAssignExistingLevelButton(); schemeSearchPanel = schemeSearchPanel.ClickAddExistingLevelLink(); schemeSearchPanel.SelectLevel(1); schemeSearchPanel.SelectLevel(2); schemeSearchPanel = schemeSearchPanel.AddExistingLevelOKButton(); //create Statement schemeSearchPanel = schemeSearchPanel.ClickLevelNode(); schemeSearchPanel = schemeSearchPanel.ClickCreateStatementButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStatementLink(); string StatementName = SchemeSearchPanel.GenerateRandomString(10); string StatementDescription = SchemeSearchPanel.GenerateRandomString(20); string StatementShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StatementName, StatementDescription, StatementShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // delete statement schemeSearchPanel = schemeSearchPanel.ClickDeleteStatementButton(); schemeSearchPanel = schemeSearchPanel.ClickDeleteOKButton(); Thread.Sleep(1000); }
/// <summary> /// Navigation to create scheme quick link /// </summary> public void NavigateToCreateScheme() { WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout)); String[] featureList = { "Curriculum" }; FeatureBee.FeatureBeeLogin.LoginWithFeatureBee(featureList, FeatureBee.FeatureBeeLogin.iSIMSUserType.AssessmentCoordinator); AutomationSugar.NavigateMenu("Tasks", "Assessment", "Manage Curriculum Schemes"); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); schemeSearchPanel.NavigateToCreateNewScheme(); //var assessmentQuickLinks = new AssessmentQuickLinks(); //// Open Assessment Quick Links Dropdown for assessment coordinator //assessmentQuickLinks.OpenAssessmentQuickLinksDropdown(SeleniumHelper.iSIMSUserType.AssessmentCoordinator); //// Wait for the ajax request to complete //WaitUntillAjaxRequestCompleted(); //SeleniumHelper.WaitForElementClickableThenClick(SeleniumHelper.SelectByDataAutomationID("quick-link-create-scheme")); }
public void DeleteScheme() { NavigateToCreateScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); string schemeName = SchemeSearchPanel.GenerateRandomString(10); string schemeDescription = SchemeSearchPanel.GenerateRandomString(20); string shortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(schemeName, schemeDescription, shortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); AddStatement(); schemeSearchPanel.ClickSaveButton(); schemeSearchPanel.waitforSavemessagetoAppear(); schemeSearchPanel.SaveMessageAssertionSuccess(); schemeSearchPanel = schemeSearchPanel.ClickDeleteSchemeButton(); schemeSearchPanel = schemeSearchPanel.ClickDeleteOKButton(); schemeSearchPanel.DeleteMessageAssertionSuccess(schemeName); }
private void AddStatement() { SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); // create Subject schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewSubjectLink(); string SubjectName = SchemeSearchPanel.GenerateRandomString(10); string SubjectDescription = SchemeSearchPanel.GenerateRandomString(20); string SubjectShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(SubjectName, SubjectDescription, SubjectShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // create Strand schemeSearchPanel = schemeSearchPanel.ClickCreateStrandButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStrandLink(); string StrandName = SchemeSearchPanel.GenerateRandomString(10); string StrandDescription = SchemeSearchPanel.GenerateRandomString(20); string StrandShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StrandName, StrandDescription, StrandShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); // add Levels schemeSearchPanel = schemeSearchPanel.ClickAssignExistingLevelButton(); schemeSearchPanel = schemeSearchPanel.ClickAddExistingLevelLink(); schemeSearchPanel.SelectLevel(1); //schemeSearchPanel.SelectLevel(2); schemeSearchPanel = schemeSearchPanel.AddExistingLevelOKButton(); // create Statement schemeSearchPanel = schemeSearchPanel.ClickLevelNode(); schemeSearchPanel = schemeSearchPanel.ClickCreateStatementButton(); schemeSearchPanel = schemeSearchPanel.ClickCreateNewStatementLink(); string StatementName = SchemeSearchPanel.GenerateRandomString(10); string StatementDescription = SchemeSearchPanel.GenerateRandomString(20); string StatementShortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(StatementName, StatementDescription, StatementShortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); }
public void SchemeApplyFilter() { NavigateToModifyExistingScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); //Open the Filter tab schemeSearchPanel.OpenFilter(); //Select a Group schemeSearchPanel = schemeSearchPanel.SelectGroup("Year 1"); //Select a Subject schemeSearchPanel = schemeSearchPanel.SelectSubject("English: Reading"); //Select a Strand schemeSearchPanel = schemeSearchPanel.SelectStrand("Comprehension"); schemeSearchPanel.Search(); List <string> SchemeData = schemeSearchPanel.GetDataInTab(); // String Columnname = MarksheetGridHelper.GetColumnName("En Read Comp Overall"); Assert.IsTrue(SchemeData.Contains("Year 1")); Assert.IsTrue(SchemeData.Contains("English: Reading")); Assert.IsTrue(SchemeData.Contains("Comprehension")); }
public void GenerateTemplateFromScheme() { NavigateToCreateScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); string schemeName = SchemeSearchPanel.GenerateRandomString(10); string schemeDescription = SchemeSearchPanel.GenerateRandomString(20); string shortName = SchemeSearchPanel.GenerateRandomString(10); schemeSearchPanel.SetNameAndDescription(schemeName, schemeDescription, shortName); schemeSearchPanel = schemeSearchPanel.ClickOKButton(); AddStatement(); schemeSearchPanel.ClickSaveButton(); schemeSearchPanel.waitforSavemessagetoAppear(); schemeSearchPanel.SaveMessageAssertionSuccess(); schemeSearchPanel = schemeSearchPanel.ClickCreateSubjectButton(); schemeSearchPanel = schemeSearchPanel.ClickGenerateTemplateLink(); schemeSearchPanel.waitforSavemessagetoAppear(); schemeSearchPanel.GenerateTemplateMessageAssertionSuccess(); schemeSearchPanel.OpenPosTemplate(); }
public void AddExistingResourcesToScheme() { NavigateToModifyExistingScheme(); SchemeSearchPanel schemeSearchPanel = new SchemeSearchPanel(); //Open the Filter tab schemeSearchPanel.OpenFilter(); //Select a Group schemeSearchPanel = schemeSearchPanel.SelectGroup("Year 1"); //Select a Subject schemeSearchPanel = schemeSearchPanel.SelectSubject("English: Reading"); //Select a Strand schemeSearchPanel = schemeSearchPanel.SelectStrand("Comprehension"); schemeSearchPanel.Search(); List <string> SchemeData = schemeSearchPanel.GetTreeData(); Assert.IsTrue(SchemeData.Contains("Year 1")); Assert.IsTrue(SchemeData.Contains("English: Reading")); Assert.IsTrue(SchemeData.Contains("Comprehension")); //Add existing subjects schemeSearchPanel.ClickAddSubjectButton(); schemeSearchPanel.ClickAddExistingSubjectButton(); schemeSearchPanel = schemeSearchPanel.SelectPhase("Year 1"); schemeSearchPanel = schemeSearchPanel.ClickSearchSubjectButton(); List <string> subjects = TestData.CreateDataList("select [AssessmentSubject].[Name] as Name from [AssessmentSubject] inner join [SubjectLevel] on [AssessmentSubject].[ID] = [SubjectLevel].[AssessmentSubject] inner join [LearningLevel] on [SubjectLevel].[LearningLevel] = [LearningLevel].[ID] where [LearningLevel].[Name]='Year 1' AND [AssessmentSubject].[TenantID]=" + TestDefaults.Default.TenantId, "Name"); List <string> subjectSearchResults = schemeSearchPanel.GetExistingData(); Assert.AreEqual(subjects.Count.ToString(), subjectSearchResults.Count.ToString()); foreach (string eachelement in subjects) { Assert.IsTrue(subjectSearchResults.Contains(eachelement.Replace(" ", string.Empty).ToLower())); } //Add existing levels schemeSearchPanel.ClickAddLevelButton(); schemeSearchPanel.ClickAddExistingLevelButton(); List <string> levels = TestData.CreateDataList("SELECT distinct [LearningLevel].[Name] [LearningLevel.Name] FROM dbo.[LearningLevel] [LearningLevel] inner JOIN dbo.[NCYearLearningLevel] [LearningLevel.NCYearLearningLevels] ON ([LearningLevel].[ID] = [LearningLevel.NCYearLearningLevels].[LearningLevel] AND [LearningLevel.NCYearLearningLevels].[TenantID] =" + TestDefaults.Default.TenantId + " ) WHERE ([LearningLevel].[TenantID] = " + TestDefaults.Default.TenantId + ")Group by [LearningLevel].[ID],[LearningLevel.NCYearLearningLevels].[LearningLevel],[LearningLevel].[Name] having count([LearningLevel.NCYearLearningLevels].[LearningLevel])=1", "LearningLevel.Name"); List <string> levelSearchResults = schemeSearchPanel.GetExistingData(); Assert.AreEqual(levels.Count.ToString(), levelSearchResults.Count.ToString()); foreach (string eachelement in levels) { Assert.IsTrue(levelSearchResults.Contains(eachelement.Replace(" ", string.Empty).ToLower())); } //Add existing Strands schemeSearchPanel.ClickAddStrandButton(); schemeSearchPanel.ClickAddExistingStrandButton(); List <string> strands = TestData.CreateDataList("select Name from Strand where id in(select Strand from SubjectLevelStatement where SubjectLevel in(select id from SubjectLevel where AssessmentSubject in (select id from AssessmentSubject where name ='English: Reading') and learningLevel in(select id from learningLevel where name ='Year 1'))) and TenantID=" + TestDefaults.Default.TenantId, "Name"); List <string> strandSearchResults = schemeSearchPanel.GetExistingData(); Assert.AreEqual(strands.Count.ToString(), strandSearchResults.Count.ToString()); foreach (string eachelement in strands) { Assert.IsTrue(strandSearchResults.Contains(eachelement.Replace(" ", string.Empty).ToLower())); } //Add existing statement schemeSearchPanel = schemeSearchPanel.CancelPickerFormButton(); schemeSearchPanel = schemeSearchPanel.ClickExistingLevelNode(); schemeSearchPanel.ClickAddStatementButton(); schemeSearchPanel.ClickAddExistingStatementButton(); List <string> statements = TestData.CreateDataList("select name from Statement where id in(select Statement from SubjectLevelStatement where SubjectLevel in(select id from SubjectLevel where AssessmentSubject in (select id from AssessmentSubject where name ='English: Reading') and learningLevel in(select id from learningLevel where name ='Year 1') and Strand in(select id from Strand where name ='Comprehension'))) and TenantID=" + TestDefaults.Default.TenantId, "Name"); List <string> statementSearchResults = schemeSearchPanel.GetExistingData(); Assert.AreEqual(statements.Count.ToString(), statementSearchResults.Count.ToString()); }