diff --git a/exActReport_config.js b/exActReport_config.js index ab8b48b..00c319f 100644 --- a/exActReport_config.js +++ b/exActReport_config.js @@ -1,5 +1,12 @@ //exActReport_config.js +var today = new Date(); +var mm = today.getMonth()+1; //January is 0 +var dd = today.getDate(); +var yyyy = today.getFullYear(); +var hour = today.getHours(); +var minute = today.getMinutes(); + exports.config = { framework: 'jasmine', seleniumAddress: 'http://localhost:4444/wd/hub', @@ -10,7 +17,10 @@ exports.config = { }, capabilities: { - browserName: 'chrome' + browserName: 'chrome', + 'goog:chromeOptions': { + w3c: false + } }, onPrepare: function() { @@ -20,8 +30,11 @@ exports.config = { }, params: { - login: 'http://stage.edgate.com/exact/login.php' //QA - //login: 'https://correlation.edgate.com/exact/login.php' //PROD + login: 'http://stage.edgate.com/exact/login.php', //QA + //login: 'https://correlation.edgate.com/exact/login.php', //PROD + + report_file: 'AutomatedRegressionReport:' + mm + dd + yyyy + hour + minute, + report_title: 'Automated Regression Report: ' + mm + dd + yyyy + hour + minute, } /*multiCapabilities: [{ diff --git a/exActReport_spec.js b/exActReport_spec.js index 08725fc..30de798 100644 --- a/exActReport_spec.js +++ b/exActReport_spec.js @@ -25,14 +25,14 @@ describe('ExACT Report script', function () { var LoginButton = element(by.css('.btn')); var EdGateLogo = element(by.css('p > img')); var CopyrightText = element(by.css('#footer-branding > p:nth-child(2)')); - var CorrelationCoverageDonutChart = element(by.css('#gcanvas')); - var CorrelationCoverageSubText = element(by.css('p:nth-child(2)')); browser.wait(EC.visibilityOf(EdGateLogo), 30000).then(function() { browser.sleep(2500); }); expect(EdGateLogo.isPresent()).toBe(true); - expect(await CopyrightText.getText()).toEqual('© Copyright 2021 EdGate Correlation Services'); + expect(await CopyrightText.getText()).toEqual('© Copyright 2022 EdGate Correlation Services'); + expect(await UserNameTextBox.getAttribute('placeholder')).toEqual('Username'); + expect(await PasswordTextBox.getAttribute('placeholder')).toEqual('Password'); await browser.driver.getCurrentUrl().then(async function(actualURL) { if(actualURL.indexOf('http://stage.edgate.com/exact/login.php') !== -1) { await UserNameTextBox.sendKeys('exact_juan').then(function() { @@ -53,21 +53,20 @@ describe('ExACT Report script', function () { await LoginButton.click().then(function() { browser.sleep(2500); }); - /*browser.wait(EC.visibilityOf(CorrelationCoverageSubText), 30000).then(function() { - browser.sleep(2500); - });*/ }); } //Dashboard - Report(); - ReportPage(); + ReportMenu(); + RunBasicContentHTMLReport(); + RunBasicStandardsReport(); + ViewQueuedReportsTab(); //Sign Out*/ SignOut(); }); -function Report() { +function ReportMenu() { it(': Report, should verify Report page.', async function () { //Navigation Menu var EC = protractor.ExpectedConditions; @@ -101,7 +100,7 @@ function Report() { }); } -function ReportPage() { +function RunBasicContentHTMLReport() { it(': MyContentWidget, should verify widget default information.', async function () { var ExACTLogo = element(by.css('span:nth-child(2) > img')); var IWantToHeader = element(by.css('h3')); @@ -166,6 +165,7 @@ function ReportPage() { var ShowMetadataLabel = element(by.css('.form-check:nth-child(13) > .form-check-label')); var RollUpCorrelationsToHighestLevelStandardCheckbox = element(by.css('#bShowRollups')); var RollUpCorrelationsToHighestLevelStandardLabel = element(by.css('.form-check:nth-child(14) > .form-check-label')); + //Correlation Relevence var CorrelationRelevanceHeader = element(by.css('#card-options-body')); var ShowAllRadioButtonTwo = element(by.css('#bShowWeight1')); var ShowAllLabelTwo = element(by.css('.form-check:nth-child(16) > .form-check-label')); @@ -175,9 +175,11 @@ function ReportPage() { var SecondaryLabel = element(by.css('.form-check:nth-child(18) > .form-check-label')); var OffNoIndicatorsRadioButton = element(by.css('#bShowWeight0')); var OffNoIndicatorsLabel = element(by.css('.form-check:nth-child(19) > .form-check-label')); + //Statistics var StatisticsHeader = element(by.css('b:nth-child(21)')); var IncludeCorrelationStatisticsRadioButton = element(by.css('#bShowStatistics')); var IncludeCorrelationStatisticsLabel = element(by.css('.form-check:nth-child(23) > .form-check-label')); + //Format var FormatHeader = element(by.css('label > b')); var FormatDropdown = element(by.css('#format')); var RunNowButton = element(by.css('#repsubmit')); @@ -248,7 +250,7 @@ function ReportPage() { expect(await GradesTitle.getText()).toEqual('Grades'); expect(await CorrelationsTitle.getText()).toEqual('Correlations'); expect(await OptionsTitle.getText()).toEqual('Options'); - //Report Type + //Report Type | Basic Content Report expect(await ReportTypeTitle.getText()).toEqual('Report Type'); //expect(await ContentReportsHeader.getText()).toEqual('unable to read'); expect(await BasicContentReportLabel.getText()).toEqual('Basic Content Report'); @@ -261,7 +263,7 @@ function ReportPage() { browser.sleep(2500); }); expect(await ReportTypeTitle.getText()).toEqual('Report Type: Basic Content Report'); - //Main Criteria + //Main Criteria | Geometry expect(await MainCriteriaTitle.getText()).toEqual('Content'); expect(await MainCriteriaSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); expect(await MainCriteriaSubjectList.getText()).toContain('Demo - User Submitted Content'); @@ -281,7 +283,7 @@ function ReportPage() { browser.sleep(2500); }); expect(await MainCriteriaTitle.getText()).toEqual('Content: Geometry'); - //Subjects + //Subjects | Mathematics expect(await SubjectsTitle.getText()).toEqual('Subjects'); expect(await SubjectsSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); expect(await SubjectList.getText()).toContain('Mathematics'); @@ -292,7 +294,7 @@ function ReportPage() { browser.sleep(2500); }); expect(await SubjectsTitle.getText()).toEqual('Subjects: Mathematics'); - //Grades + //Grades | 9 expect(await GradesTitle.getText()).toEqual('Grades'); expect(await GradessSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); expect(await GradesList.getText()).toContain('K'); @@ -308,14 +310,18 @@ function ReportPage() { expect(await GradesList.getText()).toContain('10'); expect(await GradesList.getText()).toContain('11'); expect(await GradesList.getText()).toContain('12'); - element(by.cssContainingText('option', '9')).click().then(function() { - browser.sleep(1000); - }); + browser.actions() + .keyDown(protractor.Key.SHIFT) + .click(element(by.cssContainingText('option', '6')).getWebElement()) + .mouseMove(element(by.cssContainingText('option', '8')).getWebElement()) + .click(element(by.cssContainingText('option', '8')).getWebElement()) + .keyUp(protractor.Key.SHIFT) + .perform(); browser.wait(EC.visibilityOf(GradesTitle), 30000).then(function() { browser.sleep(2500); }); - expect(await GradesTitle.getText()).toEqual('Grades: 9'); - //Correlations + expect(await GradesTitle.getText()).toEqual('Grades: 6, 7, 8'); + //Correlations | California Standards expect(await CorrelationsTitle.getText()).toEqual('Correlations'); expect(await CorrelationsSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); expect(await CorrelationsList.getText()).toContain('Alabama Standards'); @@ -337,7 +343,10 @@ function ReportPage() { browser.sleep(2500); }); expect(await CorrelationsTitle.getText()).toEqual('Correlations: California Standards'); - //Options + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + //Options | Correlated Only (default) //Gap Reporting expect(await OptionsTitle.getText()).toEqual('Options'); expect(await GAPReportingHeader.getText()).toEqual('GAP Reporting'); @@ -348,7 +357,7 @@ function ReportPage() { expect(await CorrelatedOnlyLabel.getText()).toEqual('Correlated Only'); expect(UncorrelatedOnlyRadioButton.isPresent()).toBe(true); expect(await UncorrelatedOnlyLabel.getText()).toEqual('Uncorrelated Only'); - //Display Options + //Display Options | Off - No Indicators (defualt) expect(await DisplayOptionsHeader.getText()).toEqual('Display Options'); expect(UseAlternateColorsCheckbox.isPresent()).toBe(true); expect(await UseAlternateColorsLabel.getText()).toEqual('Use Alternate Colors'); @@ -360,6 +369,7 @@ function ReportPage() { expect(await ShowMetadataLabel.getText()).toEqual('Show Metadata'); expect(RollUpCorrelationsToHighestLevelStandardCheckbox.isPresent()).toBe(true); expect(await RollUpCorrelationsToHighestLevelStandardLabel.getText()).toEqual('Roll up Correlations to Highest Level Standard'); + //Correlation Relevence expect(await CorrelationRelevanceHeader.getText()).toContain('Correlation Relevance:'); expect(ShowAllRadioButtonTwo.isPresent()).toBe(true); expect(await ShowAllLabelTwo.getText()).toEqual('Show All'); @@ -368,11 +378,11 @@ function ReportPage() { expect(SecondaryRadioButton.isPresent()).toBe(true); expect(await SecondaryLabel.getText()).toEqual('Secondary'); expect(OffNoIndicatorsRadioButton.isPresent()).toBe(true); - //Statistics + //Statistics | N/A (default) expect(await StatisticsHeader.getText()).toEqual('Statistics'); expect(IncludeCorrelationStatisticsRadioButton.isPresent()).toBe(true); expect(await IncludeCorrelationStatisticsLabel.getText()).toEqual('Include Correlation Statistics'); - //Format + //Format | HTML (default) expect(await FormatHeader.getText()).toEqual('Format'); expect(await FormatDropdown.getAttribute('value')).toEqual('1'); expect(await FormatDropdown.getText()).toContain('HTML'); @@ -380,9 +390,11 @@ function ReportPage() { expect(await RunNowButton.getText()).toEqual('Run Now'); expect(RunInBackgroundButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green background expect(await RunInBackgroundButton.getText()).toEqual('Run In Background'); + //Run Report In Background DIV (validation check) await RunInBackgroundButton.click().then(function() { browser.sleep(2500); }); + //Indexing... browser.wait(EC.visibilityOf(RunReportInBackgroundDIVTitle), 30000).then(function() { browser.sleep(2500); }); @@ -397,7 +409,6 @@ function ReportPage() { await AddReportToQueueButton.click().then(function() { browser.sleep(2500); }); - //Run Report In Background DIV expect(await RunReportInBackgroundDIVTitle.getText()).toEqual('Run Report In Background'); expect(RunReportInBackgroundDIVCloseIcon.isPresent()).toBe(true); expect(await ReportFileNameTitle.getText()).toEqual('Report File Name (No file extention)'); @@ -417,7 +428,7 @@ function ReportPage() { expect(await ReportTypeTitle.getText()).toEqual('Report Type: Basic Content Report'); expect(await MainCriteriaTitle.getText()).toEqual('Content: Geometry'); expect(await SubjectsTitle.getText()).toEqual('Subjects: Mathematics'); - expect(await GradesTitle.getText()).toEqual('Grades: 9'); + expect(await GradesTitle.getText()).toEqual('Grades: 6, 7, 8'); expect(await CorrelationsTitle.getText()).toEqual('Correlations: California Standards'); expect(await OptionsTitle.getText()).toEqual('Options'); await RunNowButton.click().then(function() { @@ -426,46 +437,777 @@ function ReportPage() { browser.wait(EC.visibilityOf(MainCriteriaLabel), 30000).then(function() { browser.sleep(2500); }); + //Report Results expect(await MainCriteriaLabel.getText()).toEqual('Main Criteria:'); expect(await MainCriteriaResult.getText()).toContain(' Geometry'); expect(await SecondaryCriteriaLabel.getText()).toEqual('Secondary Criteria:'); expect(await SecondaryCriteriaResult.getText()).toContain(' California Content Standards'); expect(await SubjectLabel.getText()).toEqual('Subject:'); expect(await SubjectResult.getText()).toContain(' Mathematics'); - expect(await GradeLabel.getText()).toEqual('Grade:'); - expect(await GradeResult.getText()).toContain(' 9'); + expect(await GradeLabel.getText()).toEqual('Grades:'); + expect(await GradeResult.getText()).toContain(' 6, 7, 8'); expect(await SubjectReportTitle.getText()).toEqual('Geometry'); - expect(await SubjectReportSubTitle.getText()).toEqual('Algebraic Transformations'); + expect(await SubjectReportSubTitle.getText()).toEqual('3-variable linear system word problem'); expect(await SubjectReportContent.getText()).toEqual('California Content Standards'); expect(await SubjectReportSubject.getText()).toEqual('Mathematics'); - expect(await SubjectReportAdopted.getText()).toEqual('Grade 9 - Adopted: 2013'); + expect(await SubjectReportAdopted.getText()).toEqual('Grade 7 - Adopted: 2013'); }); } -function CorrelationCoverageWidget() { - it(': CorrelationCoverageWidget, should verify widget default information.', async function () { - var CorrelationCoverageWidgetTitle = element(by.css('.row:nth-child(3) > .col-lg-6:nth-child(1) .card-header')); - var CorrelationCoverageStandardDropDown = element(by.css('#stdgap')); - var CorrelationCoverageSubjectDropDown = element(by.css('#subgap')); - var CorrelationCoverageDonutChart = element(by.css('#gcanvas')); - var CorrelationCoverageSubText = element(by.css('p:nth-child(2)')); - var StandardsCoveredIcon = element(by.css('.list-group-item:nth-child(4)')); - var StandardsCoveredLabel = element(by.css('.list-group-item:nth-child(5)')); - var NotCoveredIcon = element(by.css('.list-group-item:nth-child(6)')); - var NotCoveredLabel = element(by.css('')); - var ViewDetailsLinkText = element(by.linkText('View Details')); - var ViewDetailsArrowIcon = element(by.css('.fa-arrow-circle-right')); - - browser.executeScript('window.scrollTo(0, 563);').then(function() { +function RunBasicStandardsReport() { + it(': MyContentWidget, should verify widget default information.', async function () { + var ExACTLogo = element(by.css('span:nth-child(2) > img')); + var IWantToHeader = element(by.css('h3')); + var DashboardMenuIcon = element(by.linkText('Dashboard')); + var AlignMenuIcon = element(by.linkText('Align')); + var UploadMenuIcon = element(by.linkText('Upload')); + var ReportMenuIcon = element(by.linkText('Report')); + var ApproveMenuIcon = element(by.linkText('Approve')); + var EC = protractor.ExpectedConditions; + //Report Page Title + var ReportPageTitle = element(by.css('h2')); + //Report + var BuildYourReportHeaderButton = element(by.linkText('Build your report')); + var ViewQueuedReportsHeaderButton = element(by.linkText('View queued reports')); + //Report Type Breadcrumbs + var ReportTypeBreadcrumb = element(by.css('#crumb-rept')); + var MainCriteriaBreadcrumb = element(by.css('#crumb-main')); + var SubjectsBreadcrumb = element(by.css('#crumb-subjects')); + var GradesBreadcrumb = element(by.css('#crumb-grades')); + var CorrelationsBreadcrumb = element(by.css('#crumb-correlation')); + var OptionsBreadcrumb = element(by.css('#crumb-options')); + //Report Type + var ReportTypeTitle = element(by.css('#card-rept-head > .btn')); + var ContentReportsHeader = element(by.xpath('//*[@id="reporttype"]/optgroup[1]')); + var BasicContentReportLabel = element(by.css('optgroup:nth-child(1)')); + var StandardsReportsHeader = element(by.css('#reporttype > optgroup:nth-child(2)')); + var BasicStandardsReportLabel = element(by.css('optgroup:nth-child(2)')); + //Main Criteria + var MainCriteriaTitle = element(by.css('#card-main-head > .btn')); + var MainCriteriaSubtext = element(by.css('.text-instruct')); + var MainCriteriaSubjectList = element(by.css('#maincrit')); + //Subjects + var SubjectsTitle = element(by.css('#card-subjects-head > .btn')); + var SubjectsSubtext = element(by.css('#card-subjects-body .text-instruct')); + var SubjectList = element(by.css('#subject')); + //Courses + var CoursesButton = element(by.css('#courselink')); + var SelectCoursesDIVTitle = element(by.css('.modal-title')); + var SelectCoursesDIVXCloseIcon = element(by.css('.close > span')); + var SelectCoursesDIVSubtext = element(by.css('p')); + var SelectCoursesDIVSubtitle = element(by.css('.col-md-6 > b')); + var SelectCoursesDIVCheckboxOne = element(by.css('#SC3019')); + var SelectCoursesDIVOptionLabelOne = element(by.css('label:nth-child(4)')); + var SelectCoursesDIVCheckboxTwo = element(by.css('#SC3024')); + var SelectCoursesDIVOptionLabelTwo = element(by.css('label:nth-child(7)')); + var SelectCoursesDIVCheckboxThree = element(by.css('#SC3013')); + var SelectCoursesDIVOptionLabelThree = element(by.css('label:nth-child(10)')); + var SelectCoursesDIVApplyButton = element(by.css('#courseapply')); + var SelectCoursesDIVCloseButton = element(by.css('.btn-secondary')); + //Grades + var GradesTitle = element(by.css('#card-grades-head > .btn')); + var GradessSubtext = element(by.css('#card-grades-body .text-instruct')); + var GradesList = element(by.css('#grade')); + //Correlations + var CorrelationsTitle = element(by.css('#card-correlation-head > .btn')); + var CorrelationsSubtext = element(by.css('#card-correlation-body .text-instruct')); + var CorrelationsList = element(by.css('#five_cor')); + //Options + var OptionsTitle = element(by.css('#card-options-head > .btn')); + var GAPReportingHeader = element(by.css('#card-options-body > b:nth-child(1)')); + var ContentDisplayHeader = element(by.css('#card-options-body')); + var ShowAllRadioButton = element(by.css('#showGap1')); + var ShowAllLabel = element(by.css('.form-check:nth-child(4) > .form-check-label')); + var CorrelatedOnlyRadioButton = element(by.css('#showGap2')); + var CorrelatedOnlyLabel = element(by.css('.form-check:nth-child(5) > .form-check-label')); + var UncorrelatedOnlyRadioButton = element(by.css('#showGap0')); + var UncorrelatedOnlyLabel = element(by.css('.form-check:nth-child(6) > .form-check-label')); + var DisplayOptionsHeader = element(by.css('b:nth-child(8)')); + var UseAlternateColorsCheckbox = element(by.css('#color')); + var UseAlternateColorsLabel = element(by.css('.form-check:nth-child(10) > .form-check-label')); + var ShowTitlesAsLinksCheckbox = element(by.css('#hyperTitles')); + var ShowTitlesAsLinksLabel = element(by.css('.form-check:nth-child(11) > .form-check-label')); + var ContentAsBulletedListCheckbox = element(by.css('#bullet')); + var ContentAsBulletedListLabel = element(by.css('.form-check:nth-child(12) > .form-check-label')); + var SummaryDescriptionCheckbox = element(by.css('#bIncludeUnitSummary')); + var SummaryDescriptionLabel = element(by.css('.form-check:nth-child(13) > .form-check-label')); + var ShowMetadataCheckbox = element(by.css('#bDisplayMetadata')); + var ShowMetadataLabel = element(by.css('.form-check:nth-child(14) > .form-check-label')); + var ShowPublisherContentIDsCheckbox = element(by.css('#bIncludeLOID')); + var ShowPublisherContentIDsLabel = element(by.css('.form-check:nth-child(15) > .form-check-label')); + //Correlation Relevence + var CorrelationRelevanceHeader = element(by.css('#card-options-body')); + var ShowAllRadioButtonTwo = element(by.css('#bShowWeight1')); + var ShowAllLabelTwo = element(by.css('.form-check:nth-child(17) > .form-check-label')); + var PrimaryRadioButton = element(by.css('#bShowWeight2')); + var PrimaryLabel = element(by.css('.form-check:nth-child(18) > .form-check-label')); + var SecondaryRadioButton = element(by.css('#bShowWeight3')); + var SecondaryLabel = element(by.css('.form-check:nth-child(19) > .form-check-label')); + var OffNoIndicatorsRadioButton = element(by.css('#bShowWeight0')); + var OffNoIndicatorsLabel = element(by.css('.form-check:nth-child(20) > .form-check-label')); + //Statistics + var StatisticsHeader = element(by.css('b:nth-child(22)')); + var IncludeCorrelationStatisticsRadioButton = element(by.css('#bShowStatistics')); + var IncludeCorrelationStatisticsLabel = element(by.css('.form-check:nth-child(24) > .form-check-label')); + var ShowStandardTextInStatisticsRadioButton = element(by.css('#bStatsText')); + var ShowStandardTextInStatisticsLabel = element(by.css('.form-check:nth-child(25) > .form-check-label')); + //Format + var FormatHeader = element(by.css('label > b')); + var FormatDropdown = element(by.css('#format')); + var RunNowButton = element(by.css('#repsubmit')); + var RunInBackgroundButton = element(by.css('#repqsubmit')); + //Run Report In Background DIV + var RunReportInBackgroundDIVTitle = element(by.css('#myModalLabel')); + var RunReportInBackgroundDIVCloseIcon = element(by.css('.close > span')); + var ReportFileNameTitle = element(by.css('.form-group:nth-child(2) > label')); + var ReportFileNameTextbox = element(by.css('#reportName')); + var ReportFileNameValidationText = element(by.css('#validrepname')); + var ReportTitle = element(by.css('.form-group:nth-child(3) > label')); + var ReportTitleTextbox = element(by.css('#reportTitle')); + var ReportTitleValidationText = element(by.css('.form-group:nth-child(3) > .invalid-feedback')); + var AddReportToQueueButton = element(by.css('#queuebtn')); + + //Navigation Menu Bars + expect(ExACTLogo.isPresent()).toBe(true); + expect(await DashboardMenuIcon.getText()).toEqual('Dashboard'); + expect(await IWantToHeader.getText()).toEqual('I WANT TO'); + expect(await AlignMenuIcon.getText()).toEqual('Align'); + expect(await UploadMenuIcon.getText()).toEqual('Upload'); + expect(await ReportMenuIcon.getText()).toEqual('Report'); + expect(await ApproveMenuIcon.getText()).toEqual('Approve'); + await ReportMenuIcon.click().then(function() { browser.sleep(2500); }); - expect(await CorrelationCoverageWidgetTitle.getText()).toEqual('Correlation Coverage'); - expect(await CorrelationCoverageStandardDropDown.getAttribute('value')).toEqual('19928');//changes - expect(await CorrelationCoverageSubjectDropDown.getAttribute('value')).toEqual('Mathematics');//changes - expect(await CorrelationCoverageSubText.getText()).toEqual('Click anywhere on the chart to see a coverage breakdown by grade.'); - expect(ViewDetailsLinkText.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green - expect(await ViewDetailsLinkText.getText()).toEqual('View Details'); - expect(ViewDetailsArrowIcon.isPresent()).toBe(true); + browser.wait(EC.visibilityOf(ReportPageTitle), 30000).then(function() { + browser.sleep(2500); + }); + //Report Page Title + expect(ReportPageTitle.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green text + expect(await ReportPageTitle.getText()).toEqual('Report'); + expect(BuildYourReportHeaderButton.getCssValue('background-color')).toBe('rgba(42, 55, 118, 1)'); //dark blue background + expect(BuildYourReportHeaderButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //white text + expect(await BuildYourReportHeaderButton.getText()).toEqual('Build your report'); + expect(ViewQueuedReportsHeaderButton.getCssValue('background-color')).toBe('rgba(0, 0, 0, 0)'); //white background + expect(ViewQueuedReportsHeaderButton.getCssValue('color')).toBe('rgba(182, 186, 181, 1)'); //grey text + expect(await ViewQueuedReportsHeaderButton.getText()).toEqual('View queued reports'); + //Report Type Breadcrums + expect(ReportTypeBreadcrumb.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green text + expect(await ReportTypeBreadcrumb.getText()).toEqual('Report Type'); + expect(MainCriteriaBreadcrumb.getCssValue('color')).toBe('rgba(115, 135, 156, 1)'); //grey text + expect(await MainCriteriaBreadcrumb.getText()).toEqual('Main Criteria'); + expect(SubjectsBreadcrumb.getCssValue('color')).toBe('rgba(115, 135, 156, 1)'); //grey text + expect(await SubjectsBreadcrumb.getText()).toEqual('Subjects'); + expect(GradesBreadcrumb.getCssValue('color')).toBe('rgba(115, 135, 156, 1)'); //grey text + expect(await GradesBreadcrumb.getText()).toEqual('Grades'); + expect(CorrelationsBreadcrumb.getCssValue('color')).toBe('rgba(115, 135, 156, 1)'); //green text + expect(await CorrelationsBreadcrumb.getText()).toEqual('Correlations'); + expect(OptionsBreadcrumb.getCssValue('color')).toBe('rgba(115, 135, 156, 1)'); //grey text + expect(await OptionsBreadcrumb.getText()).toEqual('Options'); + //Accordion Labels + expect(await ReportTypeTitle.getText()).toEqual('Report Type'); + expect(await MainCriteriaTitle.getText()).toEqual('Main Criteria'); + expect(await SubjectsTitle.getText()).toEqual('Subjects'); + expect(await GradesTitle.getText()).toEqual('Grades'); + expect(await CorrelationsTitle.getText()).toEqual('Correlations'); + expect(await OptionsTitle.getText()).toEqual('Options'); + //Report Type | Basic Standards Report + expect(await ReportTypeTitle.getText()).toEqual('Report Type'); + //expect(await ContentReportsHeader.getText()).toEqual('unable to read'); + expect(await BasicContentReportLabel.getText()).toEqual('Basic Content Report'); + //expect(await StandardsReportsHeader.getText()).toEqual('unable to read'); + expect(await BasicStandardsReportLabel.getText()).toEqual('Basic Standards Report'); + await BasicStandardsReportLabel.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(ReportTypeTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await ReportTypeTitle.getText()).toEqual('Report Type: Basic Standards Report'); + //Main Criteria | Common Core State Standards + expect(await MainCriteriaTitle.getText()).toEqual('Standards'); + expect(await MainCriteriaSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); + expect(await MainCriteriaSubjectList.getText()).toContain('California Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Common Core State Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Texas TEKS Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Alabama Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Arizona Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Florida Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('New York Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Washington Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Alberta Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Ontario Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('Australian Curriculum (ACARA) Standards'); + expect(await MainCriteriaSubjectList.getText()).toContain('New South Wales Standards'); + element(by.cssContainingText('option', 'Common Core State Standards')).click().then(function() { + browser.sleep(1000); + }); + browser.wait(EC.visibilityOf(MainCriteriaTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await MainCriteriaTitle.getText()).toEqual('Standards: Common Core State Standards'); + //Subjects | Science + expect(await SubjectsTitle.getText()).toEqual('Subjects'); + expect(await SubjectsSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); + expect(await SubjectList.getText()).toContain('Language Arts'); + expect(await SubjectList.getText()).toContain('Mathematics'); + expect(await SubjectList.getText()).toContain('Science'); + expect(await SubjectList.getText()).toContain('Social Studies'); + element(by.cssContainingText('option', 'Science')).click().then(function() { + browser.sleep(1000); + }); + browser.wait(EC.visibilityOf(SubjectsTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await SubjectsTitle.getText()).toEqual('Subjects: Science'); + browser.sleep(2500); + expect(CoursesButton.isDisplayed()).toBe(false); + await MainCriteriaTitle.click().then(function() { + browser.sleep(1500); + }); + element(by.cssContainingText('option', 'Common Core State Standards')).click().then(function() { + browser.sleep(1500); + }); + element(by.cssContainingText('option', 'Arizona Standards')).click().then(function() { + browser.sleep(1500); + }); + browser.wait(EC.visibilityOf(MainCriteriaTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await MainCriteriaTitle.getText()).toEqual('Standards: Arizona Standards'); + element(by.cssContainingText('option', 'Science')).click().then(function() { + browser.sleep(2500); + }); + //Courses DIV + expect(CoursesButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CoursesButton.getText()).toEqual('Courses'); + await CoursesButton.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(SelectCoursesDIVTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await SelectCoursesDIVTitle.getText()).toEqual('Select Courses'); + expect(SelectCoursesDIVXCloseIcon.isPresent()).toBe(true); + expect(await SelectCoursesDIVSubtext.getText()).toEqual('Please select one or more courses to filter your results by:'); + expect(await SelectCoursesDIVSubtitle.getText()).toEqual('Science'); + await SelectCoursesDIVCheckboxOne.click().then(function() { + browser.sleep(2500); + }); + expect(await SelectCoursesDIVOptionLabelOne.getText()).toEqual('Earth and Space Science'); + expect(SelectCoursesDIVCheckboxTwo.isPresent()).toBe(true); + expect(await SelectCoursesDIVOptionLabelTwo.getText()).toEqual('Life Science'); + expect(SelectCoursesDIVCheckboxThree.isPresent()).toBe(true); + expect(await SelectCoursesDIVOptionLabelThree.getText()).toEqual('Physical Science'); + expect(SelectCoursesDIVApplyButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await SelectCoursesDIVApplyButton.getAttribute('value')).toEqual('Apply'); + expect(SelectCoursesDIVCloseButton.getCssValue('background-color')).toBe('rgba(108, 117, 125, 1)'); //grey + expect(await SelectCoursesDIVCloseButton.getText()).toEqual('Close'); + await SelectCoursesDIVApplyButton.click().then(function() { + browser.sleep(2500); + }); + expect(await SubjectsTitle.getText()).toEqual('Subjects: Science (Earth and Space Science) Courses'); + expect(CoursesButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CoursesButton.getText()).toEqual('Courses'); + //Grades | 6 + expect(await GradesTitle.getText()).toEqual('Grades'); + expect(await GradessSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); + expect(await GradesList.getText()).toContain('6'); + expect(await GradesList.getText()).toContain('7'); + expect(await GradesList.getText()).toContain('8'); + expect(await GradesList.getText()).toContain('9'); + expect(await GradesList.getText()).toContain('10'); + expect(await GradesList.getText()).toContain('11'); + expect(await GradesList.getText()).toContain('12'); + element(by.cssContainingText('option', '6')).click().then(function() { + browser.sleep(1000); + }); + browser.wait(EC.visibilityOf(GradesTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await GradesTitle.getText()).toEqual('Grades: 6'); + //Correlations | Biology + expect(await CorrelationsTitle.getText()).toEqual('Correlations'); + expect(await CorrelationsSubtext.getText()).toEqual('To select multiple values, hold Ctrl or Shift before making selections'); + expect(await CorrelationsList.getText()).toContain('Biology'); + expect(await CorrelationsList.getText()).toContain('Demo - User Submitted Content'); + element(by.cssContainingText('option', 'Biology')).click().then(function() { + browser.sleep(1000); + }); + browser.wait(EC.visibilityOf(CorrelationsTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await CorrelationsTitle.getText()).toEqual('Correlations: Biology'); + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + //Options | Correlated Only (default) + //Gap Reporting + expect(await OptionsTitle.getText()).toEqual('Options'); + expect(await GAPReportingHeader.getText()).toEqual('GAP Reporting'); + expect(await ContentDisplayHeader.getText()).toContain('Standards Display:'); + expect(ShowAllRadioButton.isPresent()).toBe(true); + expect(await ShowAllLabel.getText()).toEqual('Show All'); + expect(CorrelatedOnlyRadioButton.isPresent()).toBe(true); + expect(await CorrelatedOnlyLabel.getText()).toEqual('Correlated Only'); + expect(UncorrelatedOnlyRadioButton.isPresent()).toBe(true); + expect(await UncorrelatedOnlyLabel.getText()).toEqual('Uncorrelated Only'); + await UncorrelatedOnlyRadioButton.click().then(function() { + browser.sleep(1000); + }); + //Display Options | Uncorrelated; Use Alternate Colors, Show Metadata, Show Publisher Content IDs; Show All + expect(await DisplayOptionsHeader.getText()).toEqual('Display Options'); + expect(UseAlternateColorsCheckbox.isPresent()).toBe(true); + expect(await UseAlternateColorsLabel.getText()).toEqual('Use Alternate Colors'); + expect(ShowTitlesAsLinksCheckbox.isPresent()).toBe(true); + expect(await ShowTitlesAsLinksLabel.getText()).toEqual('Show Titles as Links'); + expect(ContentAsBulletedListCheckbox.isPresent()).toBe(true); + expect(await ContentAsBulletedListLabel.getText()).toEqual('Content as Bulleted List'); + expect(SummaryDescriptionCheckbox.isPresent()).toBe(true); + expect(await SummaryDescriptionLabel.getText()).toEqual('Summary/Description'); + expect(ShowMetadataCheckbox.isPresent()).toBe(true); + expect(await ShowMetadataLabel.getText()).toEqual('Show Metadata'); + expect(ShowPublisherContentIDsCheckbox.isPresent()).toBe(true); + expect(await ShowPublisherContentIDsLabel.getText()).toEqual('Show Publisher Content IDs'); + //Correlation Relevence + expect(await CorrelationRelevanceHeader.getText()).toContain('Correlation Relevance:'); + expect(ShowAllRadioButtonTwo.isPresent()).toBe(true); + expect(await ShowAllLabelTwo.getText()).toEqual('Show All'); + expect(PrimaryRadioButton.isPresent()).toBe(true); + expect(await PrimaryLabel.getText()).toEqual('Primary'); + expect(SecondaryRadioButton.isPresent()).toBe(true); + expect(await SecondaryLabel.getText()).toEqual('Secondary'); + expect(OffNoIndicatorsRadioButton.isPresent()).toBe(true); + expect(await OffNoIndicatorsLabel.getText()).toEqual('Off (no indicators)'); + //Statistics | N/A (default) + expect(await StatisticsHeader.getText()).toEqual('Statistics'); + expect(IncludeCorrelationStatisticsRadioButton.isPresent()).toBe(true); + expect(await IncludeCorrelationStatisticsLabel.getText()).toEqual('Include Correlation Statistics'); + expect(ShowStandardTextInStatisticsRadioButton.isPresent()).toBe(true); + expect(await ShowStandardTextInStatisticsLabel.getText()).toEqual('Show Standard Text in Statistics'); + await IncludeCorrelationStatisticsRadioButton.click().then(function() { + browser.sleep(2500); + }); + //Format | PDF + expect(await FormatHeader.getText()).toEqual('Format'); + expect(await FormatDropdown.getAttribute('value')).toEqual('1'); + expect(await FormatDropdown.getText()).toContain('HTML'); + element(by.cssContainingText('option', 'PDF')).click().then(function() { + browser.sleep(2500); + }); + expect(await FormatDropdown.getText()).toContain('HTML'); + expect(RunNowButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green background + expect(await RunNowButton.getText()).toEqual('Run Now'); + expect(RunInBackgroundButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green background + expect(await RunInBackgroundButton.getText()).toEqual('Run In Background'); + //Accordion Labels + expect(await ReportTypeTitle.getText()).toEqual('Report Type: Basic Standards Report'); + expect(await MainCriteriaTitle.getText()).toEqual('Standards: Arizona Standards'); + expect(await SubjectsTitle.getText()).toEqual('Subjects: Science (Earth and Space Science) Courses'); + expect(await GradesTitle.getText()).toEqual('Grades: 6'); + expect(await CorrelationsTitle.getText()).toEqual('Correlations: Biology'); + expect(await OptionsTitle.getText()).toEqual('Options'); + //Run Report In Background DIV + await RunInBackgroundButton.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(RunReportInBackgroundDIVTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await RunReportInBackgroundDIVTitle.getText()).toEqual('Run Report In Background'); + expect(RunReportInBackgroundDIVCloseIcon.isPresent()).toBe(true); + expect(await ReportFileNameTitle.getText()).toEqual('Report File Name (No file extention)'); + await ReportFileNameTextbox.sendKeys('AutomatedRegressionReport').then(function() { + browser.sleep(1500); + }); + expect(await ReportTitle.getText()).toEqual('Report Title'); + await ReportTitleTextbox.sendKeys(browser.params.report_title).then(function() { + browser.sleep(1500); + }); + expect(AddReportToQueueButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green background + expect(await AddReportToQueueButton.getText()).toEqual('Add Report To Queue'); + await AddReportToQueueButton.click().then(function() { + browser.sleep(2500); + }); + //Report Title validation + expect(await RunReportInBackgroundDIVTitle.getText()).toEqual('Run Report In Background'); + expect(RunReportInBackgroundDIVCloseIcon.isPresent()).toBe(true); + expect(await ReportFileNameTitle.getText()).toEqual('Report File Name (No file extention)'); + expect(await ReportFileNameTextbox.getAttribute('value')).toEqual('AutomatedRegressionReport'); + expect(ReportFileNameValidationText.getCssValue('color')).toBe('rgba(220, 53, 69, 1)'); //red text + expect(await ReportFileNameValidationText.getText()).toEqual('A file with this name is already in the queue. Please choose another.'); + expect(await ReportTitle.getText()).toEqual('Report Title'); + expect(await ReportTitleTextbox.getAttribute('value')).toEqual(browser.params.report_title); + expect(await ReportTitleValidationText.getText()).toEqual(''); + expect(AddReportToQueueButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green background + expect(await AddReportToQueueButton.getText()).toEqual('Add Report To Queue'); + await ReportFileNameTextbox.clear().then(function() { + browser.sleep(1500); + }); + await ReportFileNameTextbox.sendKeys(browser.params.report_file).then(function() { + browser.sleep(1500); + }); + await AddReportToQueueButton.click().then(function() { + browser.sleep(2500); + }); + }); +} + +function ViewQueuedReportsTab() { + it(': ViewQueuedReportsTab, should validate the Viewed Queued Reports tab.', async function () { + var BuildYourReportButton = element(by.linkText('Build your report')); + var ViewQueuedReportsButton = element(by.linkText('View queued reports')); + //Column Title Bar + var ReportIDColumnTitle = element(by.css('.bg-secondary > td:nth-child(2)')); + var TitleColumnTitle = element(by.css('.bg-secondary > td:nth-child(3)')); + var FormatColumnTitle = element(by.css('.bg-secondary > td:nth-child(4)')); + var StatusColumnTitle = element(by.css('.bg-secondary > td:nth-child(5)')); + var SizeColumnTitle = element(by.css('.bg-secondary > td:nth-child(6)')); + var CreatedColumnTitle = element(by.css('.bg-secondary > td:nth-child(7)')); + var LastRunColumnTitle = element(by.css('.bg-secondary > td:nth-child(8)')); + //Report 1 + var ReportCheckboxOne = element(by.css('tr:nth-child(1) input')); + var ReportIDColumnCheckboxOne = element(by.css('tbody > tr:nth-child(1) > td:nth-child(2)')); + var TitleColumnRowOne = element(by.css('tbody > tr:nth-child(1) > td:nth-child(3)')); + var FormatColumnRowOne = element(by.css('tr:nth-child(1) .badge')); + var StatusColumnIconRowOne = element(by.css('tr:nth-child(1) .glyphicon')); + var StatusColumnRowOne = element(by.xpath('//td[5]/span')); + var SizeColumnRowOne = element(by.css('tbody > tr:nth-child(1) > td:nth-child(6)')); + var CreatedColumnRowOne = element(by.css('tbody > tr:nth-child(1) > td:nth-child(7)')); + var LastRunColumnRowOne = element(by.css('tbody > tr:nth-child(1) > td:nth-child(8)')); + var ReportDownloadIconRowOne = element(by.css('tr:nth-child(1) .fa')); + //Report 2 + var ReportCheckboxTwo = element(by.css('tr:nth-child(2) input')); + var ReportIDColumnCheckboxTwo = element(by.css('tbody > tr:nth-child(2) > td:nth-child(2)')); + var TitleColumnRowTwo = element(by.css('tbody > tr:nth-child(2) > td:nth-child(3)')); + var FormatColumnRowTwo = element(by.css('tr:nth-child(2) .badge')); + var StatusColumnIconRowTwo = element(by.css('tr:nth-child(2) .glyphicon')); + var StatusColumnRowTwo = element(by.css('tr:nth-child(2) .text-success')); + var StatusColumnTwoRowTwo = element(by.css('tr:nth-child(2) .text-warning')); + var SizeColumnRowTwo = element(by.css('tbody > tr:nth-child(2) > td:nth-child(6)')); + var CreatedColumnRowTwo = element(by.css('tbody > tr:nth-child(2) > td:nth-child(7)')); + var LastRunColumnRowTwo = element(by.css('tbody > tr:nth-child(2) > td:nth-child(8)')); + var ReportDownloadIconRowTwo = element(by.css('tr:nth-child(2) .fa')); + //Report 3 + var ReportCheckboxThree = element(by.css('tr:nth-child(3) input')); + var ReportIDColumnCheckboxThree = element(by.css('tbody > tr:nth-child(3) > td:nth-child(2)')); + var TitleColumnRowThree = element(by.css('tbody > tr:nth-child(3) > td:nth-child(3)')); + var FormatColumnRowThree = element(by.css('tr:nth-child(3) .badge')); + var StatusColumnIconRowThree = element(by.css('tr:nth-child(3) .glyphicon')); + var StatusColumnRowThree = element(by.xpath('//tr[3]/td[5]/span')); + var SizeColumnRowThree = element(by.css('tbody > tr:nth-child(3) > td:nth-child(6)')); + var CreatedColumnRowThree = element(by.css('tbody > tr:nth-child(3) > td:nth-child(7)')); + var LastRunColumnRowThree = element(by.css('tbody > tr:nth-child(3) > td:nth-child(8)')); + var ReportDownloadIconRowThree = element(by.css('tr:nth-child(3) .fa')); + //Report 4 + var ReportCheckboxFour = element(by.css('tr:nth-child(4) input')); + var ReportIDColumnCheckboxFour = element(by.css('tbody > tr:nth-child(4) > td:nth-child(2)')); + var TitleColumnRowFour = element(by.css('tbody > tr:nth-child(4) > td:nth-child(3)')); + var FormatColumnRowFour = element(by.css('tr:nth-child(4) .badge')); + var StatusColumnIconRowFour = element(by.css('tr:nth-child(4) .glyphicon')); + var StatusColumnRowFour = element(by.xpath('//tr[4]/td[5]/span')); + var StatusColumnTwoRowFour = element(by.css('tr:nth-child(4) .text-warning')); + var SizeColumnRowFour = element(by.css('tbody > tr:nth-child(4) > td:nth-child(6)')); + var CreatedColumnRowFour = element(by.css('tbody > tr:nth-child(4) > td:nth-child(7)')); + var LastRunColumnRowFour = element(by.css('tbody > tr:nth-child(4) > td:nth-child(8)')); + var ReportDownloadIconRowFour = element(by.css('tr:nth-child(4) .fa')); + //Report 5 + var ReportCheckboxFive = element(by.css('tr:nth-child(5) input')); + var ReportIDColumnCheckboxFive = element(by.css('tbody > tr:nth-child(5) > td:nth-child(2)')); + var TitleColumnRowFive = element(by.css('tbody > tr:nth-child(5) > td:nth-child(3)')); + var FormatColumnRowFive = element(by.css('tr:nth-child(5) .badge')); + var StatusColumnIconRowFive = element(by.css('tr:nth-child(5) .glyphicon')); + var StatusColumnRowFive = element(by.css('tr:nth-child(5) .text-success')); + var StatusColumnTwoRowFive = element(by.css('tr:nth-child(5) .text-warning')); + var SizeColumnRowFive = element(by.css('tbody > tr:nth-child(5) > td:nth-child(6)')); + var CreatedColumnRowFive = element(by.css('tbody > tr:nth-child(5) > td:nth-child(7)')); + var LastRunColumnRowFive = element(by.css('tbody > tr:nth-child(5) > td:nth-child(8)')); + var ReportDownloadIconRowFive = element(by.css('tr:nth-child(5) .fa')); + //Report 6 + var ReportCheckboxSix = element(by.css('tr:nth-child(6) input')); + var ReportIDColumnCheckboxSix = element(by.css('tbody > tr:nth-child(6) > td:nth-child(2)')); + var TitleColumnRowSix = element(by.css('tbody > tr:nth-child(6) > td:nth-child(3)')); + var FormatColumnRowSix = element(by.css('tr:nth-child(6) .badge')); + var StatusColumnIconRowSix = element(by.css('tr:nth-child(6) .glyphicon')); + var StatusColumnRowSix = element(by.css('tr:nth-child(6) .text-success')); + var SizeColumnRowSix = element(by.css('tbody > tr:nth-child(6) > td:nth-child(6)')); + var CreatedColumnRowSix = element(by.css('tbody > tr:nth-child(6) > td:nth-child(7)')); + var LastRunColumnRowSix = element(by.css('tbody > tr:nth-child(6) > td:nth-child(8)')); + var ReportDownloadIconRowSix = element(by.css('tr:nth-child(6) .fa')); + //Report 7 + var ReportCheckboxSeven = element(by.css('tr:nth-child(7) input')); + var ReportIDColumnCheckboxSeven = element(by.css('tbody > tr:nth-child(7) > td:nth-child(2)')); + var TitleColumnRowSeven = element(by.css('tbody > tr:nth-child(7) > td:nth-child(3)')); + var FormatColumnRowSeven = element(by.css('tr:nth-child(7) .badge')); + var StatusColumnIconRowSeven = element(by.css('tr:nth-child(7) .glyphicon')); + var StatusColumnRowSeven = element(by.css('tr:nth-child(7) .text-success')); + var SizeColumnRowSeven = element(by.css('tbody > tr:nth-child(7) > td:nth-child(6)')); + var CreatedColumnRowSeven = element(by.css('tbody > tr:nth-child(7) > td:nth-child(7)')); + var LastRunColumnRowSeven = element(by.css('tbody > tr:nth-child(7) > td:nth-child(8)')); + var ReportDownloadIconRowSeven = element(by.css('tr:nth-child(7) .fa')); + //Buttons + var ReRunReportButton = element(by.css('.btn-primary')); + var DeleteButton = element(by.css('#delbtn')); + var ReportMenuIcon = element(by.linkText('Report')); + //Select Report To Re-run + var EC = protractor.ExpectedConditions; + var UIAlertMessage = element(by.css('.alert')); + + /*await ReportMenuIcon.click().then(function() { + browser.sleep(2500); + });*/ + + expect(BuildYourReportButton.getCssValue('background-color')).toBe('rgba(42, 55, 118, 1)'); //blue active + expect(ViewQueuedReportsButton.getCssValue('background-color')).toBe('rgba(0, 0, 0, 0)'); //gray dimmed + await ViewQueuedReportsButton.click().then(function() { + browser.sleep(2500); + }); + expect(BuildYourReportButton.getCssValue('background-color')).toBe('rgba(0, 0, 0, 0)'); //gray dimmed + expect(ViewQueuedReportsButton.getCssValue('background-color')).toBe('rgba(42, 55, 118, 1)'); //blue active + //Column Title Bar + expect(await ReportIDColumnTitle.getText()).toEqual('Report ID'); + expect(await TitleColumnTitle.getText()).toEqual('Title'); + expect(await FormatColumnTitle.getText()).toEqual('Format'); + expect(await StatusColumnTitle.getText()).toEqual('Status'); + expect(await SizeColumnTitle.getText()).toEqual('Size'); + expect(await CreatedColumnTitle.getText()).toEqual('Created'); + expect(await LastRunColumnTitle.getText()).toEqual('Last Run'); + //Report 1 + expect(ReportCheckboxOne.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxOne.getText()).not.toBe(''); + expect(await TitleColumnRowOne.getText()).toEqual(browser.params.report_title); + expect(FormatColumnRowOne.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowOne.getText()).toEqual('pdf'); + expect(StatusColumnIconRowOne.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(StatusColumnRowOne.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(await StatusColumnRowOne.getText()).toEqual('Pending'); + expect(await SizeColumnRowOne.getText()).toEqual('N/A'); + expect(await CreatedColumnRowOne.getText()).not.toBe(''); + expect(await LastRunColumnRowOne.getText()).toEqual('');//empty? + expect(ReportDownloadIconRowOne.isPresent()).toBe(true); + expect(ReportDownloadIconRowOne.getCssValue('color')).toBe('grayrgba(1, 160, 78, 1)'); //gray - dimmed + //Report 2 + expect(ReportCheckboxTwo.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxTwo.getText()).toEqual('13'); + expect(await TitleColumnRowTwo.getText()).toEqual('Automated Regression Report: 52020221420'); + expect(FormatColumnRowTwo.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowTwo.getText()).toEqual('pdf'); + expect(StatusColumnIconRowTwo.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowTwo.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowTwo.getText()).toEqual('Completed'); + expect(await SizeColumnRowTwo.getText()).toEqual('75KB'); + expect(await CreatedColumnRowTwo.getText()).toEqual('May 20 2022 11:20pm PDT'); + expect(await LastRunColumnRowTwo.getText()).not.toBe(''); + expect(ReportDownloadIconRowTwo.isPresent()).toBe(true); + expect(ReportDownloadIconRowTwo.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 3 + expect(ReportCheckboxThree.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxThree.getText()).toEqual('12'); + expect(await TitleColumnRowThree.getText()).toEqual('Automated Regression Report: 42920221654'); + expect(FormatColumnRowThree.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowThree.getText()).toEqual('pdf'); + expect(StatusColumnIconRowThree.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowThree.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowThree.getText()).toEqual('Completed'); + expect(await SizeColumnRowThree.getText()).toEqual('75KB'); + expect(await CreatedColumnRowThree.getText()).toEqual('BUG'); + expect(await LastRunColumnRowThree.getText()).toEqual('BUG'); + expect(ReportDownloadIconRowThree.isPresent()).toBe(true); + expect(ReportDownloadIconRowThree.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 4 + expect(ReportCheckboxFour.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxFour.getText()).toEqual('10'); + expect(await TitleColumnRowFour.getText()).toEqual('Social Studies'); + expect(FormatColumnRowFour.getCssValue('background-color')).toBe('rgba(25, 91, 192, 1)'); //blue + expect(await FormatColumnRowFour.getText()).toEqual('doc'); + expect(StatusColumnIconRowFour.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowFour.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowFour.getText()).toEqual('Completed'); + expect(await SizeColumnRowFour.getText()).toEqual('516B'); + expect(await CreatedColumnRowFour.getText()).toEqual('May 27 2021 04:40pm PDT'); + expect(await LastRunColumnRowFour.getText()).not.toBe(''); + expect(ReportDownloadIconRowFour.isPresent()).toBe(true); + expect(ReportDownloadIconRowFour.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 5 + expect(ReportCheckboxFive.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxFive.getText()).toEqual('9'); + expect(await TitleColumnRowFive.getText()).toEqual('Another Test Report'); + expect(FormatColumnRowFive.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowFive.getText()).toEqual('pdf'); + expect(StatusColumnIconRowFive.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowFive.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowFive.getText()).toEqual('Completed'); + expect(await SizeColumnRowFive.getText()).toEqual('567B'); + expect(await CreatedColumnRowFive.getText()).toEqual('May 27 2021 04:33pm PDT'); + expect(await LastRunColumnRowFive.getText()).not.toBe(''); + expect(ReportDownloadIconRowFive.isPresent()).toBe(true); + expect(ReportDownloadIconRowFive.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 6 + expect(ReportCheckboxSix.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxSix.getText()).toEqual('8'); + expect(await TitleColumnRowSix.getText()).toEqual('Second Test'); + expect(FormatColumnRowSix.getCssValue('background-color')).toBe('rgba(0, 0, 0, 1)'); //black + expect(await FormatColumnRowSix.getText()).toEqual('html'); + expect(StatusColumnIconRowSix.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowSix.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowSix.getText()).toEqual('Completed'); + expect(await SizeColumnRowSix.getText()).toEqual('1KB'); + expect(await CreatedColumnRowSix.getText()).toEqual('May 18 2021 02:09pm PDT'); + expect(await LastRunColumnRowSix.getText()).toEqual('May 27 2022 09:38pm PDT'); + expect(ReportDownloadIconRowSix.isPresent()).toBe(true); + expect(ReportDownloadIconRowSix.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 7 + expect(ReportCheckboxSeven.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxSeven.getText()).toEqual('7'); + expect(await TitleColumnRowSeven.getText()).toEqual('FirstQueuedReport'); + expect(FormatColumnRowSeven.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green + expect(await FormatColumnRowSeven.getText()).toEqual('xls'); + expect(StatusColumnIconRowSeven.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowSeven.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowSeven.getText()).toEqual('Completed'); + expect(await SizeColumnRowSeven.getText()).toEqual('71KB'); + expect(await CreatedColumnRowSeven.getText()).toEqual('May 14 2021 03:04pm PDT'); + expect(await LastRunColumnRowSeven.getText()).toEqual('May 27 2022 09:28pm PDT'); + expect(ReportDownloadIconRowSeven.isPresent()).toBe(true); + expect(ReportDownloadIconRowSeven.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Buttons + expect(ReRunReportButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green + expect(await ReRunReportButton.getText()).toEqual('Re-run Report'); + expect(DeleteButton.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //red + expect(await DeleteButton.getText()).toEqual('Delete'); + //Select Report To Re-run + await ReportCheckboxTwo.click().then(function() { + browser.sleep(1500); + }); + await ReportCheckboxFour.click().then(function() { + browser.sleep(1500); + }); + await ReportCheckboxFive.click().then(function() { + browser.sleep(1500); + }); + await ReRunReportButton.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(UIAlertMessage), 30000).then(function() { + browser.sleep(2500); + }); + expect(await UIAlertMessage.getText()).toEqual('Report(s) added back into queue'); + expect(StatusColumnIconRowTwo.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(StatusColumnTwoRowTwo.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(await StatusColumnTwoRowTwo.getText()).toEqual('Pending'); + expect(StatusColumnIconRowFour.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(StatusColumnTwoRowFour.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(await StatusColumnTwoRowFour.getText()).toEqual('Pending'); + expect(StatusColumnIconRowFive.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(StatusColumnTwoRowFive.getCssValue('color')).toBe('rgba(255, 193, 7, 1)'); //yellow + expect(await StatusColumnTwoRowFive.getText()).toEqual('Pending'); + //Select latest report to be deleted + await ReportCheckboxOne.click().then(function() { + browser.sleep(1500); + }); + /*await DeleteButton.click().then(function() { + browser.sleep(2500); + var alertDialog = browser.switchTo().alert(); + expect(alertDialog.getText()).toEqual('Are you sure you want to delete this?'); + browser.switchTo().alert().accept(); + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(UIAlertMessage), 30000).then(function() { + browser.sleep(2500); + }); + expect(await UIAlertMessage.getText()).toEqual('Report(s) deleted'); + //Confirm new list order + //Column Title Bar + expect(await ReportIDColumnTitle.getText()).toEqual('Report ID'); + expect(await TitleColumnTitle.getText()).toEqual('Title'); + expect(await FormatColumnTitle.getText()).toEqual('Format'); + expect(await StatusColumnTitle.getText()).toEqual('Status'); + expect(await SizeColumnTitle.getText()).toEqual('Size'); + expect(await CreatedColumnTitle.getText()).toEqual('Created'); + expect(await LastRunColumnTitle.getText()).toEqual('Last Run'); + //Report 1 + expect(ReportCheckboxOne.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxOne.getText()).toEqual('13'); + expect(await TitleColumnRowOne.getText()).toEqual('Automated Regression Report: 52020221420'); + expect(FormatColumnRowOne.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowOne.getText()).toEqual('pdf'); + expect(StatusColumnIconRowOne.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowOne.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowOne.getText()).toEqual('Completed'); + expect(await SizeColumnRowOne.getText()).toEqual('75KB'); + expect(await CreatedColumnRowOne.getText()).toEqual('May 20 2022 11:20pm PDT'); + expect(await LastRunColumnRowOne.getText()).not.toBe(''); + expect(ReportDownloadIconRowOne.isPresent()).toBe(true); + expect(ReportDownloadIconRowOne.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 2 + expect(ReportCheckboxTwo.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxTwo.getText()).toEqual('12'); + expect(await TitleColumnRowTwo.getText()).toEqual('Automated Regression Report: 42920221654'); + expect(FormatColumnRowTwo.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowTwo.getText()).toEqual('pdf'); + expect(StatusColumnIconRowTwo.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowTwo.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowTwo.getText()).toEqual('Completed'); + expect(await SizeColumnRowTwo.getText()).toEqual('75KB'); + expect(await CreatedColumnRowTwo.getText()).toEqual('Apr 30 2022 01:40am PDT'); + expect(await LastRunColumnRowTwo.getText()).toEqual('Jul 16 2022 01:02am PDT'); + expect(ReportDownloadIconRowTwo.isPresent()).toBe(true); + expect(ReportDownloadIconRowTwo.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 3 + expect(ReportCheckboxThree.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxThree.getText()).toEqual('10'); + expect(await TitleColumnRowThree.getText()).toEqual('Social Studies'); + expect(FormatColumnRowThree.getCssValue('background-color')).toBe('rgba(25, 91, 192, 1)'); //blue + expect(await FormatColumnRowThree.getText()).toEqual('doc'); + expect(StatusColumnIconRowThree.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowThree.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowThree.getText()).toEqual('Completed'); + expect(await SizeColumnRowThree.getText()).toEqual('516B'); + expect(await CreatedColumnRowThree.getText()).toEqual('May 27 2021 04:40pm PDT'); + expect(await LastRunColumnRowThree.getText()).not.toBe(''); + expect(ReportDownloadIconRowThree.isPresent()).toBe(true); + expect(ReportDownloadIconRowThree.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 4 + expect(ReportCheckboxFour.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxFour.getText()).toEqual('9'); + expect(await TitleColumnRowFour.getText()).toEqual('Another Test Report'); + expect(FormatColumnRowFour.getCssValue('background-color')).toBe('rgba(255, 0, 0, 1)'); //red + expect(await FormatColumnRowFour.getText()).toEqual('pdf'); + expect(StatusColumnIconRowFour.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowFour.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowFour.getText()).toEqual('Completed'); + expect(await SizeColumnRowFour.getText()).toEqual('567B'); + expect(await CreatedColumnRowFour.getText()).toEqual('May 27 2021 04:33pm PDT'); + expect(await LastRunColumnRowFour.getText()).not.toBe(''); + expect(ReportDownloadIconRowFour.isPresent()).toBe(true); + expect(ReportDownloadIconRowFour.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 5 + expect(ReportCheckboxFive.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxFive.getText()).toEqual('8'); + expect(await TitleColumnRowFive.getText()).toEqual('Second Test'); + expect(FormatColumnRowFive.getCssValue('background-color')).toBe('rgba(0, 0, 0, 1)'); //black + expect(await FormatColumnRowFive.getText()).toEqual('html'); + expect(StatusColumnIconRowFive.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowFive.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowFive.getText()).toEqual('Completed'); + expect(await SizeColumnRowFive.getText()).toEqual('1KB'); + expect(await CreatedColumnRowFive.getText()).toEqual('May 18 2021 02:09pm PDT'); + expect(await LastRunColumnRowFive.getText()).toEqual('May 27 2022 09:38pm PDT'); + expect(ReportDownloadIconRowFive.isPresent()).toBe(true); + expect(ReportDownloadIconRowFive.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + //Report 6 + expect(ReportCheckboxSix.isPresent()).toBe(true); + expect(await ReportIDColumnCheckboxSix.getText()).toEqual('7'); + expect(await TitleColumnRowSix.getText()).toEqual('FirstQueuedReport'); + expect(FormatColumnRowSix.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //green + expect(await FormatColumnRowSix.getText()).toEqual('xls'); + expect(StatusColumnIconRowSix.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(StatusColumnRowSix.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await StatusColumnRowSix.getText()).toEqual('Completed'); + expect(await SizeColumnRowSix.getText()).toEqual('71KB'); + expect(await CreatedColumnRowSix.getText()).toEqual('May 14 2021 03:04pm PDT'); + expect(await LastRunColumnRowSix.getText()).toEqual('May 27 2022 09:28pm PDT'); + expect(ReportDownloadIconRowSix.isPresent()).toBe(true); + expect(ReportDownloadIconRowSix.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green*/ }); } diff --git a/myStandardsWidget_config.js b/myStandardsWidget_config.js new file mode 100644 index 0000000..e638277 --- /dev/null +++ b/myStandardsWidget_config.js @@ -0,0 +1,36 @@ +//myStandardsWidget_config.js + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['myStandardsWidget_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.waitForAngularEnabled(false); + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + params: { + login: 'http://stage.edgate.com/exact/login.php' //QA + //login: 'https://correlation.edgate.com/exact/login.php' //PROD + } + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/myStandardsWidget_spec.js b/myStandardsWidget_spec.js new file mode 100644 index 0000000..ffaf1cc --- /dev/null +++ b/myStandardsWidget_spec.js @@ -0,0 +1,1034 @@ +//myStandardsWidget_spec.js + +describe('My Content Widget script', function () { + //login-ExACT landing page + var UserNameTextBox = element(by.name('username')); + var PasswordTextBox = element(by.name('password')); + + //Open browser + browser.get(browser.params.login); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('ExACT Login'); + }); + + //Sign In + ExACT(UserNameTextBox, PasswordTextBox); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('ExACT'); + }); + + function ExACT(UserNameTextBox, PasswordTextBox) { + it('ExACT, log in.', async function () { + var EC = protractor.ExpectedConditions; + var LoginButton = element(by.css('.btn')); + var EdGateLogo = element(by.css('p > img')); + var CopyrightText = element(by.css('#footer-branding > p:nth-child(2)')); + var CorrelationCoverageSubText = element(by.css('p:nth-child(2)')); + + browser.wait(EC.visibilityOf(EdGateLogo), 30000).then(function() { + browser.sleep(2500); + }); + expect(EdGateLogo.isPresent()).toBe(true); + expect(await CopyrightText.getText()).toEqual('© Copyright 2022 EdGate Correlation Services'); + await browser.driver.getCurrentUrl().then(async function(actualURL) { + if(actualURL.indexOf('http://stage.edgate.com/exact/login.php') !== -1) { + await UserNameTextBox.sendKeys('exact_juan').then(function() { + browser.sleep(1500); + }); + } else { + await UserNameTextBox.sendKeys('exact_ctuser').then(function() { + browser.sleep(1500); + }); + } + }); + await PasswordTextBox.sendKeys('ex123456').then(function() { + browser.sleep(1500); + }); + await LoginButton.click().then(function() { + browser.sleep(5000); + }); + }); + } + + //Dashboard + Dashboard(); + MyStandardsWidget(); + + //Sign Out*/ + SignOut(); +}); + +function Dashboard() { + it(': Dashboard, should verify ExACT dashboard.', async function () { + //Navigation Menu + var EC = protractor.ExpectedConditions; + var ExACTLogo = element(by.css('span:nth-child(2) > img')); + var DashboardMenuIcon = element(by.linkText('Dashboard')); + var FrameworksMenuTab = element(by.linkText('Frameworks')); + var AlignMenuTab = element(by.linkText('Align')); + var UploadMenuTab = element(by.linkText('Upload')); + var ReportMenuTab = element(by.linkText('Report')); + var ApproveMenuTab = element(by.linkText('Approve')); + var MenuBars = element(by.css('.fa-bars')); + var MiniExACTLogo = element(by.css('.sm-ver')); + var MiniDashboardMenuIcon = element(by.css('.fa-dashboard')); + var MiniAlignMenuIcon = element(by.css('.menu-left-first .fa-sitemap')); + var MiniUploadMenuIcon = element(by.css('.fa-upload')); + var MiniReportMenuIcon = element(by.css('.fa-table')); + var MiniApproveMenuIcon = element(by.css('.fa-wrench')); + var SearchIcon = element(by.css('.searchbar-icon > .fa')); + var ExACTHelpIcon = element(by.css('.fa-question-circle')); + var UserIcon = element(by.css('.fa-user')); + var UserDropdown = element(by.css('#navbarDropdown > span')); + //Dashboard + var CorrelationDashboardHeader = element(by.css('h2')); + + //Navigation Menu + browser.wait(EC.visibilityOf(ExACTLogo), 30000).then(function() { + browser.sleep(2500); + }); + expect(ExACTLogo.isPresent()).toBe(true); + expect(await DashboardMenuIcon.getText()).toEqual('Dashboard'); + expect(await FrameworksMenuTab.getText()).toEqual('Frameworks'); + expect(await AlignMenuTab.getText()).toEqual('Align'); + expect(await UploadMenuTab.getText()).toEqual('Upload'); + expect(await ReportMenuTab.getText()).toEqual('Report'); + expect(await ApproveMenuTab.getText()).toEqual('Approve'); + expect(MenuBars.isPresent()).toBe(true); + expect(MiniExACTLogo.isPresent()).toBe(true); + expect(MiniDashboardMenuIcon.isPresent()).toBe(true); + expect(MiniAlignMenuIcon.isPresent()).toBe(true); + expect(MiniUploadMenuIcon.isPresent()).toBe(true); + expect(MiniReportMenuIcon.isPresent()).toBe(true); + expect(MiniApproveMenuIcon.isPresent()).toBe(true); + expect(SearchIcon.isPresent()).toBe(true); + expect(ExACTHelpIcon.isPresent()).toBe(true); + expect(UserIcon.isPresent()).toBe(true); + expect(await UserDropdown.getText()).toEqual('ExACT Admin'); + //Dashboard + expect(CorrelationDashboardHeader.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CorrelationDashboardHeader.getText()).toEqual('Correlation Dashboard'); + }); +} + +function MyStandardsWidget() { + it(': MyStandardsWidget, should verify widget default information.', async function () { + var EC = protractor.ExpectedConditions; + var MyStandardsTab = element(by.css('#mystd-tab')); + var OtherAvailableStandardsTab = element(by.css('#availstd-tab')); + var MyStandardsDropdown = element(by.css('#stdparent')); + //Organization Column + var OrganizationColumnHeader = element(by.css('.table:nth-child(3) th:nth-child(1)')); + //More info Column + var MoreInfoColumnHeader = element(by.css('.table:nth-child(3) > thead .text-center:nth-child(2)')); + //DIV + var MoreInfoDIVTitle = element(by.css('.modal-content .modal-title')); + var MoreInfoDIVXCloseIcon = element(by.css('.modal-content > .modal-header span')); + var MoreInfoDIVSubText = element(by.css('.modal-body > .notenabled')); + var MoreInfoDIVContactUsLink = element(by.linkText('Contact Us')); + var MoreInfoDIVSubjectColumnHeader = element(by.css('.table:nth-child(2) th:nth-child(1)')); + var MoreInfoDIVAdoptedColumnHeader = element(by.css('.table:nth-child(2) th:nth-child(2)')); + var MoreInfoDIVGradesColumnHeader = element(by.css('.table:nth-child(2) th:nth-child(3)')); + //Row1 + var LanguageArtsSubject = element(by.css('.text-success:nth-child(1) > td:nth-child(1)')); + var LanguageArtsAdopted = element(by.css('.text-success:nth-child(1) > td:nth-child(2)')); + var LanguageArtsGrades = element(by.css('.text-success:nth-child(1) > td:nth-child(3)')); + //Row2 + var MathematicsSubject = element(by.css('.text-success:nth-child(2) > td:nth-child(1)')); + var MathematicsAdopted = element(by.css('.text-success:nth-child(2) > td:nth-child(2)')); + var MathematicsGrades = element(by.css('.text-success:nth-child(2) > td:nth-child(3)')); + //Row3 + var ScienceSubject = element(by.css('.text-success:nth-child(3) > td:nth-child(1)')); + var ScienceAdopted = element(by.css('.text-success:nth-child(3) > td:nth-child(2)')); + var ScienceGrades = element(by.css('.text-success:nth-child(3) > td:nth-child(3)')); + //Row4 + var SocialStudiesSubject = element(by.css('.text-success:nth-child(4) > td:nth-child(1)')); + var SocialStudiesAdopted = element(by.css('.text-success:nth-child(4) > td:nth-child(2)')); + var SocialStudiesGrades = element(by.css('.text-success:nth-child(4) > td:nth-child(3)')); + //Row5 + var ArtsEducationSubject = element(by.css('.notenabled:nth-child(5) > td:nth-child(1)')); + var ArtsEducationAdopted = element(by.css('.notenabled:nth-child(5) > td:nth-child(2)')); + var ArtsEducationGrades = element(by.css('.notenabled:nth-child(5) > td:nth-child(3)')); + //Row6 + var CareerVocationalSubject = element(by.css('.notenabled:nth-child(6) > td:nth-child(1)')); + var CareerVocationalAdopted = element(by.css('.notenabled:nth-child(6) > td:nth-child(2)')); + var CareerVocationalGrades = element(by.css('.notenabled:nth-child(6) > td:nth-child(3)')); + //Row7 + var EarlyChildhoodEducationSubject = element(by.css('.notenabled:nth-child(7) > td:nth-child(1)')); + var EarlyChildhoodEducationAdopted = element(by.css('.notenabled:nth-child(7) > td:nth-child(2)')); + var EarlyChildhoodEducationGrades = element(by.css('.notenabled:nth-child(7) > td:nth-child(3)')); + //Row8 + var EnglishLanguageLearnersSubject = element(by.css('.notenabled:nth-child(8) > td:nth-child(1)')); + var EnglishLanguageLearnersAdopted = element(by.css('.notenabled:nth-child(8) > td:nth-child(2)')); + var EnglishLanguageLearnersGrades = element(by.css('.notenabled:nth-child(8) > td:nth-child(3)')); + //Row9 + var HealthAndPESubject = element(by.css('.notenabled:nth-child(9) > td:nth-child(1)')); + var HealthAndPEAdopted = element(by.css('.notenabled:nth-child(9) > td:nth-child(2)')); + var HealthAndPEGrades = element(by.css('.notenabled:nth-child(9) > td:nth-child(3)')); + //Row10 + var WorldLanguagesSubject = element(by.css('.notenabled:nth-child(10) > td:nth-child(1)')); + var WorldLanguagesAdopted = element(by.css('.notenabled:nth-child(10) > td:nth-child(2)')); + var WorldLanguagesGrades = element(by.css('.notenabled:nth-child(10) > td:nth-child(3)')); + //View Column + var ViewColumnHeader = element(by.css('thead .text-center:nth-child(3)')); + //Row1 + var AlabamaStandards = element(by.css('#stdbody > tr:nth-child(1) > td:nth-child(1)')); + var AlabamaMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(1) .fa-info-circle')); + var AlabamaViewIcon = element(by.css('tr:nth-child(1) .fa-sitemap')); + //Row2 + var ArizonaStandards = element(by.css('#stdbody > tr:nth-child(2) > td:nth-child(1)')); + var ArizonaMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(2) .fa-info-circle')); + var ArizonaViewIcon = element(by.css('tr:nth-child(2) .fa-sitemap')); + //Row3 + var CaliforniaStandards = element(by.css('#stdbody > tr:nth-child(3) > td:nth-child(1)')); + var CaliforniaMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(3) .fa-info-circle')); + var CaliforniaViewIcon = element(by.css('tr:nth-child(3) .fa-sitemap')); + //Row4 + var FloridaStandards = element(by.css('#stdbody > tr:nth-child(4) > td:nth-child(1)')); + var FloridaMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(4) .fa-info-circle')); + var FloridaViewIcon = element(by.css('tr:nth-child(4) .fa-sitemap')); + //Row5 + var NewYorkStandards = element(by.css('#stdbody > tr:nth-child(5) > td:nth-child(1)')); + var NewYorkMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(5) .fa-info-circle')); + var NewYorkViewIcon = element(by.css('tr:nth-child(5) .fa-sitemap')); + //Row6 + var TexasTEKSStandards = element(by.css('#stdbody > tr:nth-child(6) > td:nth-child(1)')); + var TexasTEKSMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(6) .fa-info-circle')); + var TexasTEKSViewIcon = element(by.css('tr:nth-child(6) .fa-sitemap')); + //Row7 + var WashingtonStandards = element(by.css('#stdbody > tr:nth-child(7) > td:nth-child(1)')); + var WashingtonMoreInfoIcon = element(by.css('#stdbody > tr:nth-child(7) .fa-info-circle')); + var WashingtonViewIcon = element(by.css('tr:nth-child(7) .fa-sitemap')); + + expect(await MyStandardsTab.getCssValue('color')).toBe('rgba(42, 55, 118, 1)'); //dark blue + expect(await MyStandardsTab.getText()).toEqual('My Standards'); + expect(OtherAvailableStandardsTab.getCssValue('color')).toBe('rgba(182, 186, 181, 1)'); //gray + expect(await OtherAvailableStandardsTab.getText()).toEqual('Other Available Standards'); + expect(await MyStandardsDropdown.getAttribute('value')).toEqual('154828031'); + // + expect(await OrganizationColumnHeader.getText()).toEqual('Organization'); + expect(await MoreInfoColumnHeader.getText()).toEqual('More Info'); + expect(await ViewColumnHeader.getText()).toEqual('View'); + //Row1 + expect(await AlabamaStandards.getText()).toEqual('Alabama Standards'); + expect(AlabamaMoreInfoIcon.isPresent()).toBe(true); + expect(AlabamaViewIcon.isPresent()).toBe(true); + //Row2 + expect(await ArizonaStandards.getText()).toEqual('Arizona Standards'); + expect(ArizonaMoreInfoIcon.isPresent()).toBe(true); + expect(ArizonaViewIcon.isPresent()).toBe(true); + //Row3 + expect(await CaliforniaStandards.getText()).toEqual('California Standards'); + expect(CaliforniaMoreInfoIcon.isPresent()).toBe(true); + expect(CaliforniaViewIcon.isPresent()).toBe(true); + //Row4 + expect(await FloridaStandards.getText()).toEqual('Florida Standards'); + expect(FloridaMoreInfoIcon.isPresent()).toBe(true); + expect(FloridaViewIcon.isPresent()).toBe(true); + //Row5 + expect(await NewYorkStandards.getText()).toEqual('New York Standards'); + expect(NewYorkMoreInfoIcon.isPresent()).toBe(true); + expect(NewYorkViewIcon.isPresent()).toBe(true); + //Row6 + expect(await TexasTEKSStandards.getText()).toEqual('Texas TEKS Standards'); + expect(TexasTEKSMoreInfoIcon.isPresent()).toBe(true); + expect(TexasTEKSViewIcon.isPresent()).toBe(true); + //Row7 + expect(await WashingtonStandards.getText()).toEqual('Washington Standards'); + expect(WashingtonMoreInfoIcon.isPresent()).toBe(true); + expect(WashingtonViewIcon.isPresent()).toBe(true); + //Click California Standards More Info icon + await CaliforniaMoreInfoIcon.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(MoreInfoDIVTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await MoreInfoDIVTitle.getText()).toEqual('California Content Standards'); + expect(await MoreInfoDIVSubText.getText()).toEqual('*Not enabled in Profile. If you would like access to any of these standards sets, please Contact Us.'); + expect(MoreInfoDIVContactUsLink.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await MoreInfoDIVSubjectColumnHeader.getText()).toEqual('Subject'); + expect(await MoreInfoDIVAdoptedColumnHeader.getText()).toEqual('Adopted'); + expect(await MoreInfoDIVGradesColumnHeader.getText()).toEqual('Grades'); + //Row1 + expect(LanguageArtsSubject.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await LanguageArtsSubject.getText()).toEqual('Language Arts'); + expect(LanguageArtsAdopted.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await LanguageArtsAdopted.getText()).toEqual('1997'); + expect(LanguageArtsGrades.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await LanguageArtsGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row2 + expect(MathematicsSubject.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await MathematicsSubject.getText()).toEqual('Mathematics'); + expect(MathematicsAdopted.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await MathematicsAdopted.getText()).toEqual('1997'); + expect(MathematicsGrades.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await MathematicsGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row3 + expect(ScienceSubject.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await ScienceSubject.getText()).toEqual('Science'); + expect(ScienceAdopted.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await ScienceAdopted.getText()).toEqual('1998'); + expect(ScienceGrades.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await ScienceGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row4 + expect(SocialStudiesSubject.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await SocialStudiesSubject.getText()).toEqual('Social Studies'); + expect(SocialStudiesAdopted.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await SocialStudiesAdopted.getText()).toEqual('1998'); + expect(SocialStudiesGrades.getCssValue('color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await SocialStudiesGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row5 + expect(ArtsEducationSubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await ArtsEducationSubject.getText()).toEqual('Arts Education*'); + expect(ArtsEducationAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await ArtsEducationAdopted.getText()).toEqual('2001'); + expect(ArtsEducationGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await ArtsEducationGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row6 + expect(CareerVocationalSubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await CareerVocationalSubject.getText()).toEqual('Career / Vocational*'); + expect(CareerVocationalAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await CareerVocationalAdopted.getText()).toEqual(''); + expect(CareerVocationalGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await CareerVocationalGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row7 + expect(EarlyChildhoodEducationSubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EarlyChildhoodEducationSubject.getText()).toEqual('Early Childhood Education*'); + expect(EarlyChildhoodEducationAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EarlyChildhoodEducationAdopted.getText()).toEqual('2008'); + expect(EarlyChildhoodEducationGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EarlyChildhoodEducationGrades.getText()).toEqual('Ages 3-5*'); + //Row8 + expect(EnglishLanguageLearnersSubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EnglishLanguageLearnersSubject.getText()).toEqual('English Language Learners*'); + expect(EnglishLanguageLearnersAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EnglishLanguageLearnersAdopted.getText()).toEqual('1999'); + expect(EnglishLanguageLearnersGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await EnglishLanguageLearnersGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row9 + expect(HealthAndPESubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await HealthAndPESubject.getText()).toEqual('Health and PE*'); + expect(HealthAndPEAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await HealthAndPEAdopted.getText()).toEqual('2008'); + expect(HealthAndPEGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await HealthAndPEGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + //Row10 + expect(WorldLanguagesSubject.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await WorldLanguagesSubject.getText()).toEqual('World Languages*'); + expect(WorldLanguagesAdopted.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await WorldLanguagesAdopted.getText()).toEqual('2009'); + expect(WorldLanguagesGrades.getCssValue('color')).toBe('rgba(119, 119, 119, 1)'); //gray + expect(await WorldLanguagesGrades.getText()).toEqual('Pre K*, K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12'); + await MoreInfoDIVXCloseIcon.click().then(function() { + browser.sleep(2500); + }); + + /*//Dashboard Navigation panel + var DashboardMenuIcon = element(by.linkText('Dashboard')); + + expect(ExportDIVXCloseIcon.isPresent()).toBe(true);*/ + }); +} + +function Algebra() { + it(': Algebra, should verify Algebra data.', async function () { + var EC = protractor.ExpectedConditions; + var ContentLabelFour = element(by.css('.list-group-item:nth-child(4) > a')); + //Filter Results Table + var FilterResultsLabel = element(by.css('.well > b')); + //Content Set + var ContentSetLabel = element(by.css('.form-group:nth-child(1) > b')); + var AlgebraCheckBox = element(by.css('#metaorgobjectid585821586')); + var AlgebraLabel = element(by.css('.form-group:nth-child(1) > label')); + var ContentSetCount = element(by.css('.form-group:nth-child(1)')); + //Grade + var GradeLabel = element(by.css('.form-group:nth-child(3) > b')); + var NinethGradeCheckbox = element(by.css('#metagrades49')); + var NinethGradeLabel = element(by.css('.form-group:nth-child(3) > label:nth-child(4)')); + var GradeCount = element(by.css('.form-group:nth-child(3)')); + var TenthGradeCheckbox = element(by.css('#metagrades51')); + var TenthGradeLabel = element(by.css('.form-group:nth-child(3) > label:nth-child(7)')); + var EleventhGradeCheckbox = element(by.css('#metagrades52')); + var EleventhGradeLabel = element(by.css('label:nth-child(10)')); + var TwelfthGradeCheckbox = element(by.css('#metagrades53')); + var TwelfthGradeLabel = element(by.css('label:nth-child(13)')); + var EighthGradeCheckbox = element(by.css('#metagrades48')); + var EighthGradeLabel = element(by.css('label:nth-child(16)')); + var MoreLink = element(by.linkText('More>>')) + //Subject + var SubjectLabel = element(by.css('.form-group:nth-child(6) > b')); + var MathematicsCheckbox = element(by.css('#metasubjectsMathematics')); + var SubjectLabelOne = element(by.css('.form-group:nth-child(6) > label')); + var SubjectCountOne = element(by.css('.form-group:nth-child(6)')); + //Alignment Status + var AlignmentStatusLabel = element(by.css('.form-group:nth-child(8) > b')); + var NotAlignedCheckbox = element(by.css('#metaAlignmentStatusNot\\ Aligned')); + var NotAlignedLabel = element(by.css('.form-group:nth-child(8) > label')); + var CountTable = element(by.css('.form-group:nth-child(8)')); + var PendingCheckbox = element(by.css('#metaAlignmentStatusPending')); + var PendingLabel = element(by.css('.form-group:nth-child(8) > label:nth-child(7)')); + //Reset All link + var ResetAllLink = element(by.linkText('Reset All')); + + browser.wait(EC.visibilityOf(ContentLabelFour), 30000).then(function() { + browser.sleep(2500); + }); + expect(await ContentLabelFour.getText()).toEqual('Algebra'); + await ContentLabelFour.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(FilterResultsLabel), 30000).then(function() { + browser.sleep(2500); + }); + //Filter Results Table + expect(await FilterResultsLabel.getText()).toEqual('Filter Results'); + //Content Set + expect(await ContentSetLabel.getText()).toEqual('Content Set'); + expect(AlgebraCheckBox.isPresent()).toBe(true); + expect(await AlgebraLabel.getText()).toEqual('Algebra'); + expect(await ContentSetCount.getText()).toContain('Algebra (183)'); + //Grade + expect(await GradeLabel.getText()).toEqual('Grade'); + expect(NinethGradeCheckbox.isPresent()).toBe(true); + expect(await NinethGradeLabel.getText()).toEqual('9'); + expect(await GradeCount.getText()).toContain('9 (181)'); + expect(TenthGradeCheckbox.isPresent()).toBe(true); + expect(await TenthGradeLabel.getText()).toEqual('10'); + expect(await GradeCount.getText()).toContain('10 (180)'); + expect(EleventhGradeCheckbox.isPresent()).toBe(true); + expect(await EleventhGradeLabel.getText()).toEqual('11'); + expect(await GradeCount.getText()).toContain('11 (170)'); + expect(TwelfthGradeCheckbox.isPresent()).toBe(true); + expect(await TwelfthGradeLabel.getText()).toEqual('12'); + expect(await GradeCount.getText()).toContain('12 (170)'); + expect(EighthGradeCheckbox.isPresent()).toBe(true); + expect(await EighthGradeLabel.getText()).toEqual('8'); + expect(await GradeCount.getText()).toContain('8 (15)'); + expect(await MoreLink.getText()).toEqual('More>>'); + //Subject + expect(await SubjectLabel.getText()).toEqual('Subject'); + expect(MathematicsCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelOne.getText()).toEqual('Mathematics'); + expect(await SubjectCountOne.getText()).toContain('Mathematics (183)'); + //Alignment Status + expect(await AlignmentStatusLabel.getText()).toEqual('Alignment Status'); + expect(NotAlignedCheckbox.isPresent()).toBe(true); + expect(await NotAlignedLabel.getText()).toEqual('Not Aligned'); + expect(await CountTable.getText()).toContain('Not Aligned (175)'); + expect(PendingCheckbox.isPresent()).toBe(true); + expect(await PendingLabel.getText()).toEqual('Pending'); + expect(await CountTable.getText()).toContain('Pending (8)'); + //Reset All link + expect(await ResetAllLink.getText()).toEqual('Reset All'); + }); +} + +function ResultsPanel() { + it(': ResultsPanel, should verify results panel information.', async function () { + var HomeLink = element(by.linkText('Home')); + var ContentBreadcrumb = element(by.css('.breadcrumb-item:nth-child(2)')); + var SaveIcon = element(by.css('.float-right > a:nth-child(1) > img')); + var EC = protractor.ExpectedConditions; + var SaveSearchDIVTitle = element(by.css('#myModalLabel')); + var SaveSearchDescriptionLabel = element(by.css('#save')); + var SaveSearchDescriptionTextBox = element(by.css('.form-control:nth-child(3)')); + var SaveSearchButton = element(by.css('#save > input.btn.btn-primary')); + var ValidationText = element(by.css('.alert-danger')); + var ValidationTextTwo = element(by.css('.alert:nth-child(1)')); + var SaveSearchDIVXCloseIcon = element(by.css('.modal-header span')); + var PrintIcon = element(by.css('.icon-link > img')); + var ResultsCount = element(by.css('.float-left:nth-child(5)')); + var PaginationOne = element(by.linkText('1')); + var PaginationTwo = element(by.linkText('2')); + var PaginationThree = element(by.linkText('3')); + var PaginationFour = element(by.linkText('4')); + var PaginationFive = element(by.linkText('5')); + var PaginationEllipsis = element(by.linkText('...')); + var PaginationEight = element(by.linkText('8')); + var PaginationShowAll = element(by.linkText('Show All')); + //Results + //Angle relationships example (Video) + var AngleRelationshipsExampleVideo = element(by.linkText('Angle relationships example (Video)')); + var AngleRelationshipsExampleVideoDescription = element(by.css('.card:nth-child(8) .lo-descr')); + var AngleRelationshipsExampleVideoContentSet = element(by.css('.card:nth-child(8) small')); + var AngleRelationshipsExampleVideoViewDetailsButton = element(by.linkText('View Details')); + var ViewDetatilsContentOneViewDetatils = element(by.css('#content873065502')); + var AngleRelationshipsExampleVideoAlignmentStatusIcon = element(by.css('#alignstatuslink873065502 > .display-alignment')); + var AngleRelationshipsExampleVideoAlignmentSatuts = element(by.linkText('Not Aligned')); + var AngleRelationshipsExampleVideoViewStandardsButton = element(by.linkText('View Standards')); + //Angles of parallel lines 2 + var AnglesOfParallelLines2 = element(by.linkText('Angles of parallel lines 2')); + var AnglesOfParallelLines2Description = element(by.css('.card:nth-child(9) .lo-descr')); + var AnglesOfParallelLines2ContentSet = element(by.css('.card:nth-child(9) small')); + var AnglesOfParallelLines2ViewDetailsButton = element(by.css('.card:nth-child(9) > .card-body > div > .btn')); + var AnglesOfParallelLines2AlignmentStatusIcon = element(by.css('#alignstatuslink873065503 > .display-alignment')); + var AnglesOfParallelLines2AlignmentSatuts = element(by.css('#alignstatuslink873065503 .email')); + var AnglesOfParallelLines2ViewStandardsButton = element(by.css('.card:nth-child(9) .well > .btn')); + //ANOVA 1: Calculating SST (total sum of squares)(Video) + var ANOVA1CalculatingSST = element(by.linkText('ANOVA 1: Calculating SST (total sum of squares) (Video)')); + var ANOVA1CalculatingSSTDescription = element(by.css('.card:nth-child(10) .lo-descr')); + var ANOVA1CalculatingSSTContentSet = element(by.css('.card:nth-child(10) small')); + var ANOVA1CalculatingSSTViewDetailsButton = element(by.css('.card:nth-child(10) > .card-body > div > .btn')); + var ANOVA1CalculatingSSTAlignmentStatusIcon = element(by.css('#alignstatuslink873565165 > .display-alignment')); + var ANOVA1CalculatingSSTAlignmentSatuts = element(by.css('#alignstatuslink873565165 .email')); + var ANOVA1CalculatingSSTViewStandardsButton = element(by.css('.card:nth-child(10) .well > .btn')); + + expect(await HomeLink.getText()).toEqual('Home'); + expect(ContentBreadcrumb.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ContentBreadcrumb.getText()).toContain('Content'); + await SaveIcon.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(SaveSearchDIVTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await SaveSearchDIVTitle.getText()).toEqual('Save Search'); + expect(await SaveSearchDescriptionLabel.getText()).toEqual('Please enter a description of this search:'); + expect(SaveSearchButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + //expect(await SaveSearchButton.getText()).toEqual('1a'); CAN'T CAPTURE TEXT + await SaveSearchButton.click().then(function() { + browser.sleep(2500); + }); + expect(ValidationText.getCssValue('background-color')).toBe('rgba(231, 76, 60, 0.88)'); //red + expect(await ValidationText.getText()).toEqual('You must enter a description'); + await SaveSearchDescriptionTextBox.sendKeys('My saved automated list').then(function() { + browser.sleep(1500); + }); + await SaveSearchButton.click().then(function() { + browser.sleep(2500); + }); + expect(ValidationTextTwo.getCssValue('background-color')).toBe('rgba(38, 185, 154, 0.88)'); //green + expect(await ValidationTextTwo.getText()).toEqual('Your search was saved successfully! It can now be recalled on your Saved Searches page.'); + await SaveSearchDIVXCloseIcon.click().then(function() { + browser.sleep(2500); + }); + expect(PrintIcon.isPresent()).toBe(true); + expect(await ResultsCount.getText()).toEqual('Results 1 - 25 of 183'); + /*browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + });*/ + expect(PaginationOne.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(PaginationOne.getCssValue('color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(await PaginationOne.getText()).toContain('1'); + expect(PaginationTwo.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationTwo.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationTwo.getText()).toEqual('2'); + expect(PaginationThree.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationThree.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationThree.getText()).toContain('3'); + expect(PaginationFour.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationFour.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationFour.getText()).toEqual('4'); + expect(PaginationFive.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationFive.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationFive.getText()).toEqual('5'); + expect(PaginationEllipsis.isPresent()).toBe(true); + expect(PaginationEight.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationEight.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationEight.getText()).toEqual('8'); + expect(PaginationShowAll.getCssValue('background-color')).toBe('rgba(255, 255, 255, 1)'); //white + expect(PaginationShowAll.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await PaginationShowAll.getText()).toEqual('Show All'); + //Results + //Angle relationships example (Video) + expect(await AngleRelationshipsExampleVideo.getText()).toEqual('Angle relationships example (Video)'); + expect(await AngleRelationshipsExampleVideoDescription.getText()).toContain('Explore the different types of angles'); + expect(await AngleRelationshipsExampleVideoContentSet.getText()).toEqual('Content Set: Algebra'); + expect(AngleRelationshipsExampleVideoViewDetailsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await AngleRelationshipsExampleVideoViewDetailsButton.getText()).toEqual('View Details'); + expect(AngleRelationshipsExampleVideoAlignmentStatusIcon.isPresent()).toBe(true); + expect(await AngleRelationshipsExampleVideoAlignmentSatuts.getText()).toEqual('Not Aligned'); + expect(AngleRelationshipsExampleVideoViewStandardsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await AngleRelationshipsExampleVideoViewStandardsButton.getText()).toEqual('View Standards'); + await AngleRelationshipsExampleVideoViewDetailsButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Content Type: Tutorial'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Format: Online Video'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Free or Fee: Free'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Grade Range: 7 to 12'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Language: English'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Level-On Target: 9'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Login Required: No'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Printable: Yes'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Source: Khan Academy'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Subject(s): Mathematics'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Target Audience: Student'); + expect(await ViewDetatilsContentOneViewDetatils.getText()).toContain('Terms of Use: https://www.khanacademy.org/about/tos'); + //Angles of parallel lines 2 + expect(await AnglesOfParallelLines2.getText()).toEqual('Angles of parallel lines 2'); + expect(await AnglesOfParallelLines2Description.getText()).toContain('Angles of parallel lines examples'); + expect(await AnglesOfParallelLines2ContentSet.getText()).toEqual('Content Set: Algebra'); + expect(AnglesOfParallelLines2ViewDetailsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await AnglesOfParallelLines2ViewDetailsButton.getText()).toEqual('View Details'); + expect(AnglesOfParallelLines2AlignmentStatusIcon.isPresent()).toBe(true); + expect(await AnglesOfParallelLines2AlignmentSatuts.getText()).toEqual('Not Aligned'); + expect(AnglesOfParallelLines2ViewStandardsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await AnglesOfParallelLines2ViewStandardsButton.getText()).toEqual('View Standards'); + //ANOVA 1: Calculating SST (total sum of squares)(Video) + expect(await ANOVA1CalculatingSST.getText()).toEqual('ANOVA 1: Calculating SST (total sum of squares) (Video)'); + expect(await ANOVA1CalculatingSSTDescription.getText()).toContain("You already know a good bit about hypothesis testing with one or two samples. Now we take things further by making inferences based on three or more samples. We'll use the very special F-distribution to do it (F stands for "); + expect(await ANOVA1CalculatingSSTContentSet.getText()).toEqual('Content Set: Algebra'); + expect(ANOVA1CalculatingSSTViewDetailsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ANOVA1CalculatingSSTViewDetailsButton.getText()).toEqual('View Details'); + expect(ANOVA1CalculatingSSTAlignmentStatusIcon.isPresent()).toBe(true); + expect(await ANOVA1CalculatingSSTAlignmentSatuts.getText()).toEqual('Not Aligned'); + expect(ANOVA1CalculatingSSTViewStandardsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ANOVA1CalculatingSSTViewStandardsButton.getText()).toEqual('View Standards'); + }); +} + +function DeleteSavedSearch() { + it(': DeleteSavedSearch, should verify then delete saved search.', async function () { + var ProfileImage = element(by.css('#navbarDropdown > span')); + var SavedSearches = element(by.linkText('Saved Searches')); + var EC = protractor.ExpectedConditions; + var MySavedSearchesTitle = element(by.css('h2')); + var SavedSearchTenthGradeAligned = element(by.linkText('10th Grade Aligned')); + var SavedSearchDateOne = element(by.css('.list-group-item:nth-child(1)')); + var SavedSearchDeleteButtonOne = element(by.css('.list-group-item:nth-child(1) .btn')); + var SavedSearchLanguageOnlyFourResults = element(by.linkText('Language - Only Four Results')); + var SavedSearchDateTwo = element(by.css('.list-group-item:nth-child(2)')); + var SavedSearchDeleteButtonTwo = element(by.css('.list-group-item:nth-child(2) .btn')); + var SavedSearchMySavedAutomatedList = element(by.linkText('My saved automated list')); + var SavedSearchDateThree = element(by.css('.list-group-item:nth-child(3)')); + var SavedSearchDeleteButtonThree = element(by.css('.list-group-item:nth-child(3) .btn')); + //Filter Results Table + var FilterResultsLabel = element(by.css('.well > b')); + //Content Set + var ContentSetLabel = element(by.css('.form-group:nth-child(1) > b')); + var AlgebraCheckBox = element(by.css('#metaorgobjectid585821586')); + var ContentSetLabelOne = element(by.css('.form-group:nth-child(1) > label')); + var ContentSetCount = element(by.css('.form-group:nth-child(1)')); + //Grade + var GradeLabel = element(by.css('.form-group:nth-child(3) > b')); + var NinethGradeCheckbox = element(by.css('#metagrades49')); + var GradeLabelOne = element(by.css('.form-group:nth-child(3) > label:nth-child(4)')); + var GradeCount = element(by.css('.form-group:nth-child(3)')); + var TenthGradeCheckbox = element(by.css('#metagrades51')); + var GradeLabelTwo = element(by.css('.form-group:nth-child(3) > label:nth-child(7)')); + var EleventhGradeCheckbox = element(by.css('#metagrades52')); + var GradeLabelThree = element(by.css('label:nth-child(10)')); + var TwelfthGradeCheckbox = element(by.css('#metagrades53')); + var GradeLabelFour = element(by.css('label:nth-child(13)')); + var EighthGradeCheckbox = element(by.css('#metagrades48')); + var GradeLabelFive = element(by.css('label:nth-child(16)')); + var MoreLink = element(by.linkText('More>>')) + //Subject + var SubjectLabel = element(by.css('.form-group:nth-child(6) > b')); + var MathematicsCheckbox = element(by.css('#metasubjectsMathematics')); + var SubjectLabelOne = element(by.css('.form-group:nth-child(6) > label')); + var SubjectLabelOneTwo = element(by.css('.form-group:nth-child(6) > label:nth-child(4)')); + var SubjectCount = element(by.css('.form-group:nth-child(6)')); + var ScienceCheckbox = element(by.css('#metasubjectsScience')); + var SubjectLabelTwo = element(by.css('.form-group:nth-child(6) > label:nth-child(7)')); + var LanguageArtsCheckbox = element(by.css('#metasubjectsLanguage\\ Arts')); + var SubjectLabelThree = element(by.css('.form-group:nth-child(6) > label:nth-child(10)')); + var SocialStudiesCheckbox = element(by.css('#metasubjectsScience')); + var SubjectLabelFour = element(by.css('.form-group:nth-child(6) > label:nth-child(13)')); + //Alignment Status + var AlignmentStatusLabel = element(by.css('.form-group:nth-child(8) > b')); + var NotAlignedCheckbox = element(by.css('#metaAlignmentStatusNot\\ Aligned')); + var NotAlignedLabel = element(by.css('.form-group:nth-child(8) > label')); + var CountTable = element(by.css('.form-group:nth-child(8)')); + var PendingCheckbox = element(by.css('#metaAlignmentStatusPending')); + var PendingLabel = element(by.css('.form-group:nth-child(8) > label:nth-child(7)')); + var NotAlignedLabelTwo = element(by.linkText('Not Aligned')); + var AlignmentStatusCount = element(by.css('.form-group:nth-child(8)')); + var AlignedLabel = element(by.linkText('Aligned')); + var NeedsReviewLabel = element(by.linkText('Needs Review')); + var PendingLabelTwo = element(by.linkText('Pending')); + //Reset All link + var ResetAllLink = element(by.linkText('Reset All')); + //Content Results + var HomeLink = element(by.linkText('Home')); + var ContentLabel = element(by.css('.breadcrumb-item:nth-child(2)')); + var ResultsCountLabel = element(by.css('.float-left:nth-child(5)')); + var AngleRelationshipsExampleVideo = element(by.linkText('Angle relationships example (Video)')); + var ContentDescriptionOne = element(by.css('.card:nth-child(8) .lo-descr')); + var ContentDescriptionOneAlt = element(by.css('.card:nth-child(7) .lo-descr')); + var ContentSetResultLabelOne = element(by.css('.card:nth-child(8) small')); + var ContentSetResultLabelOneAlt = element(by.css('.card:nth-child(7) small')); + var ContentViewDetailsButtonOne = element(by.css('.card:nth-child(8) > .card-body > div > .btn')); + var ViewDetatilsContentOne = element(by.css('#content873065502')); + var PendingIcon = element(by.css('.alignment-pending')); + var AlignmentPendingLabel = element(by.linkText('Alignment Pending')); + var ViewStandardsButtonOne = element(by.css('.card:nth-child(8) .well > .btn')); + var DecimalOperations = element(by.linkText('Decimal Operations')); + //View Standards DIV + var ViewStandardsDIVTitle = element(by.css('.modal-title')); + var ViewStandardsDIVXCloseIcon = element(by.css('span:nth-child(1)')); + var ViewStandardsDIVText = element(by.css('.mb-1:nth-child(1)')); + var ViewStandardsDIVStandardsLabel = element(by.css('label > b')); + var ViewStandardsDIVDropDown = element(by.css('#iStateIds')); + var ViewStandardsDIVViewStandardsButton = element(by.css('.form-group > .btn')); + //California Content Standards - Results + var SearchLink = element(by.linkText('Search')); + var ResultsLink = element(by.linkText('Results')); + var CorrelatedStandardsBreadcrumb = element(by.css('.breadcrumb-item:nth-child(3)')); + var ThreeVariableLinearSystemWordProblemDescription = element(by.css('.lo-descr')); + var ViewDetailsButton = element(by.css('.btn')); + var ViewDetailsData = element(by.css('#content873065502')); + var CaliforniaContentStandardsLabel = element(by.css('h4')); + //Grade9 - Results + var SubjectAndGradeLabelGrade9 = element(by.css('strong:nth-child(7)')); + var CAAIAlgebraICourseHeaderGrade9 = element(by.css('.card:nth-child(8) > .card-header')); + var CAAIAlgebraIStrandTitleGrade9 = element(by.xpath('//div[2]/div/b')); + var CAAIAlgebraIStrandDescriptionGrade9 = element(by.id('stdbox')); + var CAAIAlgebraIStandardParentDescriptionGrade9 = element(by.xpath('//div[2]/div[2]')); + var CAAIAlgebraIStandardGrade9 = element(by.xpath('//div[3]/b')); + var CAAIAlgebraIStandardDescriptionGrade9 = element(by.xpath('//div[2]/div[3]')); + var CAAIAlgebraIStandardDescriptionAddedBadgeGrade9 = element(by.css('.card:nth-child(8) .badge')); + //Grade10 - Results + var SubjectAndGradeLabelGrade10 = element(by.css('strong:nth-child(9)')); + var CAAIAlgebraICourseHeaderGrade10 = element(by.css('.card:nth-child(10) > .card-header')); + var CAAIAlgebraIStrandTitleGrade10 = element(by.xpath('//div[4]/div[2]/div/b')); + var CAAIAlgebraIStrandDescriptionGrade10 = element(by.xpath('//div[4]/div[2]/div')); + var CAAIAlgebraIStandardParentDescriptionGrade10 = element(by.xpath('//div[4]/div[2]/div[2]')); + var CAAIAlgebraIStandardGrade10 = element(by.xpath('//div[4]/div[2]/div[3]/b')); + var CAAIAlgebraIStandardDescriptionGrade10 = element(by.xpath('//div[4]/div[2]/div[3]')); + var CAAIAlgebraIStandardDescriptionAddedBadgeGrade10 = element(by.css('.card:nth-child(10) .badge')); + //Grade11 - Results + var SubjectAndGradeLabelGrade11 = element(by.css('strong:nth-child(11)')); + var CAAIAlgebraICourseHeaderGrade11 = element(by.css('.card:nth-child(12) > .card-header')); + var CAAIAlgebraIStrandTitleGrade11 = element(by.xpath('//div[5]/div[2]/div/b')); + var CAAIAlgebraIStrandDescriptionGrade11 = element(by.xpath('//div[5]/div[2]/div')); + var CAAIAlgebraIStandardParentDescriptionGrade11 = element(by.xpath('//div[5]/div[2]/div[2]')); + var CAAIAlgebraIStandardGrade11 = element(by.xpath('//div[5]/div[2]/div[3]/b')); + var CAAIAlgebraIStandardDescriptionGrade11 = element(by.xpath('//div[5]/div[2]/div[3]')); + var CAAIAlgebraIStandardDescriptionAddedBadgeGrade11 = element(by.css('.card:nth-child(12) .badge')); + //Grade12 - Results + var SubjectAndGradeLabelGrade12 = element(by.css('strong:nth-child(13)')); + var CAAIAlgebraICourseHeaderGrade12 = element(by.css('.card:nth-child(14) > .card-header')); + var CAAIAlgebraIStrandTitleGrade12 = element(by.xpath('//div[6]/div[2]/div/b')); + var CAAIAlgebraIStrandDescriptionGrade12 = element(by.xpath('//div[6]/div[2]/div')); + var CAAIAlgebraIStandardParentDescriptionGrade12 = element(by.xpath('//div[6]/div[2]/div[2]')); + var CAAIAlgebraIStandardGrade12 = element(by.xpath('//div[6]/div[2]/div[3]/b')); + var CAAIAlgebraIStandardDescriptionGrade12 = element(by.xpath('//div[6]/div[2]/div[3]')); + var CAAIAlgebraIStandardDescriptionAddedBadgeGrade12 = element(by.css('.card:nth-child(14) .badge')); + + //Verify Language - Only Four Results (saved search) + + browser.executeScript('window.scrollTo(0, 0);').then(function() { + browser.sleep(2500); + }); + await ProfileImage.click().then(function() { + browser.sleep(2500); + }); + browser.actions().mouseMove(SavedSearches).perform().then(function() { + browser.sleep(2500); + }); + await SavedSearches.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(MySavedSearchesTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await MySavedSearchesTitle.getText()).toEqual('My Saved Searches'); + expect(await SavedSearchTenthGradeAligned.getText()).toEqual('10th Grade Aligned'); + expect(await SavedSearchDateOne.getText()).toContain('Saved On: May 28, 2021 at 10:55 AM'); + expect(SavedSearchDeleteButtonOne.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonOne.getText()).toEqual('Delete'); + expect(await SavedSearchLanguageOnlyFourResults.getText()).toEqual('Language - Only Four Results'); + expect(await SavedSearchDateTwo.getText()).toContain('Saved On: Oct 15, 2021 at 11:12 AM'); + expect(SavedSearchDeleteButtonTwo.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonTwo.getText()).toEqual('Delete'); + expect(await SavedSearchMySavedAutomatedList.getText()).toEqual('My saved automated list'); + expect(await SavedSearchDateThree.getText()).toContain('Saved On: '); + expect(SavedSearchDeleteButtonThree.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonThree.getText()).toEqual('Delete'); + //Verify Saved Search Info + await SavedSearchMySavedAutomatedList.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(FilterResultsLabel), 30000).then(function() { + browser.sleep(2500); + }); + //Filter Results Table + expect(await FilterResultsLabel.getText()).toEqual('Filter Results'); + //Content Set + expect(await ContentSetLabel.getText()).toEqual('Content Set'); + expect(AlgebraCheckBox.isPresent()).toBe(true); + expect(await ContentSetLabelOne.getText()).toEqual('Algebra'); + expect(await ContentSetCount.getText()).toContain('Algebra (183)'); + //Grade + expect(await GradeLabel.getText()).toEqual('Grade'); + expect(NinethGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelOne.getText()).toEqual('9'); + expect(await GradeCount.getText()).toContain('9 (181)'); + expect(TenthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelTwo.getText()).toEqual('10'); + expect(await GradeCount.getText()).toContain('10 (180)'); + expect(EleventhGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelThree.getText()).toEqual('11'); + expect(await GradeCount.getText()).toContain('11 (170)'); + expect(TwelfthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelFour.getText()).toEqual('12'); + expect(await GradeCount.getText()).toContain('12 (170)'); + expect(EighthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelFive.getText()).toEqual('8'); + expect(await GradeCount.getText()).toContain('8 (15)'); + expect(await MoreLink.getText()).toEqual('More>>'); + //Subject + expect(await SubjectLabel.getText()).toEqual('Subject'); + expect(MathematicsCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelOne.getText()).toEqual('Mathematics'); + expect(await SubjectCount.getText()).toContain('Mathematics (183)'); + //Alignment Status + expect(await AlignmentStatusLabel.getText()).toEqual('Alignment Status'); + expect(NotAlignedCheckbox.isPresent()).toBe(true); + expect(await NotAlignedLabel.getText()).toEqual('Not Aligned'); + expect(await CountTable.getText()).toContain('Not Aligned (175)'); + expect(PendingCheckbox.isPresent()).toBe(true); + expect(await PendingLabel.getText()).toEqual('Pending'); + expect(await CountTable.getText()).toContain('Pending (8)'); + //Reset All link + expect(await ResetAllLink.getText()).toEqual('Reset All'); + //Content Results + expect(await HomeLink.getText()).toEqual('Home'); + expect(await ContentLabel.getText()).toEqual('Content'); + expect(await ResultsCountLabel.getText()).toEqual('Results 1 - 25 of 183'); + expect(await AngleRelationshipsExampleVideo.getText()).toEqual('Angle relationships example (Video)'); + expect(await ContentDescriptionOne.getText()).toContain('Explore the different types of angles'); + expect(await ContentDescriptionOne.getText()).toContain('Content Set: Algebra'); + expect(await ContentSetResultLabelOne.getText()).toEqual('Content Set: Algebra'); + expect(ContentViewDetailsButtonOne.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ContentViewDetailsButtonOne.getText()).toEqual('View Details'); + await ContentViewDetailsButtonOne.click().then(function() { + browser.sleep(2500); + }); + expect(await ViewDetatilsContentOne.getText()).toContain('Content Type: Tutorial'); + expect(await ViewDetatilsContentOne.getText()).toContain('Format: Online Video'); + expect(await ViewDetatilsContentOne.getText()).toContain('Free or Fee: Free'); + expect(await ViewDetatilsContentOne.getText()).toContain('Grade Range: 7 to 12'); + expect(await ViewDetatilsContentOne.getText()).toContain('Language: English'); + expect(await ViewDetatilsContentOne.getText()).toContain('Level-On Target: 9'); + expect(await ViewDetatilsContentOne.getText()).toContain('Login Required: No'); + expect(await ViewDetatilsContentOne.getText()).toContain('Printable: Yes'); + expect(await ViewDetatilsContentOne.getText()).toContain('Source: Khan Academy'); + expect(await ViewDetatilsContentOne.getText()).toContain('Subject(s): Mathematics'); + expect(await ViewDetatilsContentOne.getText()).toContain('Target Audience: Student'); + expect(await ViewDetatilsContentOne.getText()).toContain('Terms of Use: https://www.khanacademy.org/about/tos'); + expect(PendingIcon.isPresent()).toBe(true); + expect(await AlignmentPendingLabel.getText()).toEqual('Alignment Pending'); + expect(ViewStandardsButtonOne.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ViewStandardsButtonOne.getText()).toEqual('View Standards'); + await ViewStandardsButtonOne.click().then(function() { + browser.sleep(2500); + }); + expect(await ViewStandardsDIVTitle.getText()).toEqual('View Standards'); + expect(ViewStandardsDIVXCloseIcon.isPresent()).toBe(true); + expect(await ViewStandardsDIVText.getText()).toEqual('Please select which standards you wish to view:'); + expect(await ViewStandardsDIVStandardsLabel.getText()).toEqual('Standards'); + expect(await ViewStandardsDIVDropDown.getText()).toContain('Select standards'); + element(by.cssContainingText('option', 'California Standards')).click().then(function() { + browser.sleep(1000); + }); + await ViewStandardsDIVViewStandardsButton.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(SearchLink), 30000).then(function() { + browser.sleep(2500); + }); + //California Content Standards - Results + expect(await SearchLink.getText()).toEqual('Search'); + expect(await ResultsLink.getText()).toEqual('Results'); + expect(await CorrelatedStandardsBreadcrumb.getText()).toEqual('Correlated Standards'); + expect(await AngleRelationshipsExampleVideo.getText()).toEqual('Angle relationships example (Video)'); + expect(await ThreeVariableLinearSystemWordProblemDescription.getText()).toEqual('Explore the different types of angles'); + expect(ViewDetailsButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await ViewDetailsButton.getText()).toEqual('View Details'); + await ViewDetailsButton.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(ViewDetailsData), 30000).then(function() { + browser.sleep(2500); + }); + expect(await ViewDetailsData.getText()).toContain('Content Type: Tutorial'); + expect(await ViewDetailsData.getText()).toContain('Format: Online Video'); + expect(await ViewDetailsData.getText()).toContain('Free or Fee: Free'); + expect(await ViewDetailsData.getText()).toContain('Grade Range: 7 to 12'); + expect(await ViewDetailsData.getText()).toContain('Language: English'); + expect(await ViewDetailsData.getText()).toContain('Level-On Target: 9'); + expect(await ViewDetailsData.getText()).toContain('Login Required: No'); + expect(await ViewDetailsData.getText()).toContain('Printable: Yes'); + expect(await ViewDetailsData.getText()).toContain('Source: Khan Academy'); + expect(await ViewDetailsData.getText()).toContain('Subject(s): Mathematics'); + expect(await ViewDetailsData.getText()).toContain('Target Audience: Student'); + expect(await ViewDetailsData.getText()).toContain('Terms of Use: https://www.khanacademy.org/about/tos'); + await ViewDetailsButton.click().then(function() { + browser.sleep(2500); + }); + expect(await CaliforniaContentStandardsLabel.getText()).toEqual('California Content Standards'); + //Grade9 - Results + expect(await SubjectAndGradeLabelGrade9.getText()).toEqual('Mathematics - Grade 9'); + expect(await CAAIAlgebraICourseHeaderGrade9.getText()).toEqual('CA.AI. Algebra I'); + expect(await CAAIAlgebraIStrandTitleGrade9.getText()).toEqual('N-RN.'); + expect(await CAAIAlgebraIStrandDescriptionGrade9.getText()).toContain('Number and Quantity: The Real Number System'); + expect(await CAAIAlgebraIStandardParentDescriptionGrade9.getText()).toEqual('Extend the properties of exponents to rational exponents.'); + expect(CAAIAlgebraIStandardGrade9.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CAAIAlgebraIStandardGrade9.getText()).toEqual('N-RN.1.'); + expect(await CAAIAlgebraIStandardDescriptionGrade9.getText()).toContain('Explain how the definition of the meaning of rational exponents follows from extending the properties of integer exponents to those values, allowing for a notation for radicals in terms of rational exponents. For example, we define 5^(1/3) to be the cube root of 5 because we want (5^(1/3))^3 = 5^((1/3)3) to hold, so (5^(1/3))^3 must equal 5. added'); + expect(CAAIAlgebraIStandardDescriptionAddedBadgeGrade9.getCssValue('background-color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await CAAIAlgebraIStandardDescriptionAddedBadgeGrade9.getText()).toEqual('added'); + //Grade10 - Results + expect(await SubjectAndGradeLabelGrade10.getText()).toEqual('Mathematics - Grade 10'); + expect(await CAAIAlgebraICourseHeaderGrade10.getText()).toEqual('CA.AI. Algebra I'); + expect(await CAAIAlgebraIStrandTitleGrade10.getText()).toEqual('N-RN.'); + expect(await CAAIAlgebraIStrandDescriptionGrade10.getText()).toContain('Number and Quantity: The Real Number System'); + expect(await CAAIAlgebraIStandardParentDescriptionGrade10.getText()).toEqual('Extend the properties of exponents to rational exponents.'); + expect(CAAIAlgebraIStandardGrade10.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CAAIAlgebraIStandardGrade10.getText()).toEqual('N-RN.1.'); + expect(await CAAIAlgebraIStandardDescriptionGrade10.getText()).toContain('Explain how the definition of the meaning of rational exponents follows from extending the properties of integer exponents to those values, allowing for a notation for radicals in terms of rational exponents. For example, we define 5^(1/3) to be the cube root of 5 because we want (5^(1/3))^3 = 5^((1/3)3) to hold, so (5^(1/3))^3 must equal 5. added'); + expect(CAAIAlgebraIStandardDescriptionAddedBadgeGrade10.getCssValue('background-color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await CAAIAlgebraIStandardDescriptionAddedBadgeGrade10.getText()).toEqual('added'); + //Grade11 - Results + expect(await SubjectAndGradeLabelGrade11.getText()).toEqual('Mathematics - Grade 11'); + expect(await CAAIAlgebraICourseHeaderGrade11.getText()).toEqual('CA.AI. Algebra I'); + expect(await CAAIAlgebraIStrandTitleGrade11.getText()).toEqual('N-RN.'); + expect(await CAAIAlgebraIStrandDescriptionGrade11.getText()).toContain('Number and Quantity: The Real Number System'); + expect(await CAAIAlgebraIStandardParentDescriptionGrade11.getText()).toEqual('Extend the properties of exponents to rational exponents.'); + expect(CAAIAlgebraIStandardGrade11.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CAAIAlgebraIStandardGrade11.getText()).toEqual('N-RN.1.'); + expect(await CAAIAlgebraIStandardDescriptionGrade11.getText()).toContain('Explain how the definition of the meaning of rational exponents follows from extending the properties of integer exponents to those values, allowing for a notation for radicals in terms of rational exponents. For example, we define 5^(1/3) to be the cube root of 5 because we want (5^(1/3))^3 = 5^((1/3)3) to hold, so (5^(1/3))^3 must equal 5. added'); + expect(CAAIAlgebraIStandardDescriptionAddedBadgeGrade11.getCssValue('background-color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await CAAIAlgebraIStandardDescriptionAddedBadgeGrade11.getText()).toEqual('added'); + //Grade12 - Results + expect(await SubjectAndGradeLabelGrade12.getText()).toEqual('Mathematics - Grade 12'); + expect(await CAAIAlgebraICourseHeaderGrade12.getText()).toEqual('CA.AI. Algebra I'); + expect(await CAAIAlgebraIStrandTitleGrade12.getText()).toEqual('N-RN.'); + expect(await CAAIAlgebraIStrandDescriptionGrade12.getText()).toContain('Number and Quantity: The Real Number System'); + expect(await CAAIAlgebraIStandardParentDescriptionGrade12.getText()).toEqual('Extend the properties of exponents to rational exponents.'); + expect(CAAIAlgebraIStandardGrade12.getCssValue('color')).toBe('rgba(1, 160, 78, 1)'); //green + expect(await CAAIAlgebraIStandardGrade12.getText()).toEqual('N-RN.1.'); + expect(await CAAIAlgebraIStandardDescriptionGrade12.getText()).toContain('Explain how the definition of the meaning of rational exponents follows from extending the properties of integer exponents to those values, allowing for a notation for radicals in terms of rational exponents. For example, we define 5^(1/3) to be the cube root of 5 because we want (5^(1/3))^3 = 5^((1/3)3) to hold, so (5^(1/3))^3 must equal 5. added'); + expect(CAAIAlgebraIStandardDescriptionAddedBadgeGrade12.getCssValue('background-color')).toBe('rgba(40, 167, 69, 1)'); //green + expect(await CAAIAlgebraIStandardDescriptionAddedBadgeGrade12.getText()).toEqual('added'); + //Delete saved search + await ProfileImage.click().then(function() { + browser.sleep(2500); + }); + browser.actions().mouseMove(SavedSearches).perform().then(function() { + browser.sleep(2500); + }); + await SavedSearches.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(MySavedSearchesTitle), 30000).then(function() { + browser.sleep(2500); + }); + expect(await MySavedSearchesTitle.getText()).toEqual('My Saved Searches'); + expect(await SavedSearchTenthGradeAligned.getText()).toEqual('10th Grade Aligned'); + expect(await SavedSearchDateOne.getText()).toContain('Saved On: May 28, 2021 at 10:55 AM'); + expect(SavedSearchDeleteButtonOne.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonOne.getText()).toEqual('Delete'); + expect(await SavedSearchLanguageOnlyFourResults.getText()).toEqual('Language - Only Four Results'); + expect(await SavedSearchDateTwo.getText()).toContain('Saved On: Oct 15, 2021 at 11:12 AM'); + expect(SavedSearchDeleteButtonTwo.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonTwo.getText()).toEqual('Delete'); + expect(await SavedSearchMySavedAutomatedList.getText()).toEqual('My saved automated list'); + expect(await SavedSearchDateThree.getText()).toContain('Saved On: '); + expect(SavedSearchDeleteButtonThree.getCssValue('background-color')).toBe('rgba(220, 53, 69, 1)'); //red + expect(await SavedSearchDeleteButtonThree.getText()).toEqual('Delete'); + await SavedSearchDeleteButtonThree.click().then(function() { + browser.sleep(1500); + var alertDialog = browser.switchTo().alert(); + expect(alertDialog.getText()).toEqual('Are you sure you want to delete this saved search?'); + browser.switchTo().alert().accept(); + browser.sleep(1500); + }); + //Verify Language - Only Four Results (saved search) + await SavedSearchLanguageOnlyFourResults.click().then(function() { + browser.sleep(2500); + }); + //Filter Results Table + expect(await FilterResultsLabel.getText()).toEqual('Filter Results'); + //Content Set + expect(await ContentSetLabel.getText()).toEqual('Content Set'); + //expect(AlgebraCheckBox.isPresent()).toBe(true); + expect(await ContentSetLabelOne.getText()).toEqual('Demo - User Submitted Content'); + expect(await ContentSetCount.getText()).toContain('Demo - User Submitted Content (17)'); + //Grade + expect(await GradeLabel.getText()).toEqual('Grade'); + expect(NinethGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelOne.getText()).toEqual('5'); + expect(await GradeCount.getText()).toContain('5 (6)'); + expect(TenthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelTwo.getText()).toEqual('6'); + expect(await GradeCount.getText()).toContain('6 (5)'); + expect(EleventhGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelThree.getText()).toEqual('4'); + expect(await GradeCount.getText()).toContain('4 (4)'); + expect(TwelfthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelFour.getText()).toEqual('2'); + expect(await GradeCount.getText()).toContain('2 (3)'); + expect(EighthGradeCheckbox.isPresent()).toBe(true); + expect(await GradeLabelFive.getText()).toEqual('3'); + expect(await GradeCount.getText()).toContain('3 (3)'); + expect(await MoreLink.getText()).toEqual('More>>'); + //Subject + expect(await SubjectLabel.getText()).toEqual('Subject'); + expect(ScienceCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelOneTwo.getText()).toEqual('Science'); + expect(await SubjectCount.getText()).toContain('Science (12)'); + expect(MathematicsCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelTwo.getText()).toEqual('Mathematics'); + expect(await SubjectCount.getText()).toContain('Mathematics (8)'); + expect(LanguageArtsCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelThree.getText()).toEqual('Language Arts'); + expect(await SubjectCount.getText()).toContain('Language Arts (4)'); + expect(SocialStudiesCheckbox.isPresent()).toBe(true); + expect(await SubjectLabelFour.getText()).toEqual('Social Studies'); + expect(await SubjectCount.getText()).toContain('Social Studies (4)'); + //Alignment Status + expect(await AlignmentStatusLabel.getText()).toEqual('Alignment Status'); + expect(await NotAlignedLabelTwo.getText()).toEqual('Not Aligned'); + expect(await AlignmentStatusCount.getText()).toContain('Not Aligned (14)'); + expect(await AlignedLabel.getText()).toEqual('Aligned'); + expect(await AlignmentStatusCount.getText()).toContain('Aligned (1)'); + expect(await NeedsReviewLabel.getText()).toEqual('Needs Review'); + expect(await AlignmentStatusCount.getText()).toContain('Needs Review (1)'); + expect(await PendingLabelTwo.getText()).toEqual('Pending'); + expect(await AlignmentStatusCount.getText()).toContain('Pending (1)'); + //Reset All link + expect(await ResetAllLink.getText()).toEqual('Reset All'); + //Content Results + expect(await HomeLink.getText()).toEqual('Home'); + expect(await ContentLabel.getText()).toEqual('Content'); + expect(await ResultsCountLabel.getText()).toEqual('Results 1 - 17 of 17'); + expect(await DecimalOperations.getText()).toEqual('Decimal Operations'); + expect(await ContentDescriptionOneAlt.getText()).toContain('Students will review adding, subtracting, and dividing decimals. This lesson includes a review and a quiz.'); + expect(await ContentDescriptionOneAlt.getText()).toContain('Content Set: Demo - User Submitted Content'); + expect(await ContentSetResultLabelOneAlt.getText()).toEqual('Content Set: Demo - User Submitted Content'); + expect(ContentViewDetailsButtonOne.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green + }); +} + +function SignOut() { + it(': SignOut, should log out of ExACT.', async function () { + var ProfileImage = element(by.css('#navbarDropdown > span')); + var LogOutLinkText = element(by.linkText('Log Out')); + var EC = protractor.ExpectedConditions; + var ExACTLogo = element(by.css('#formLogin > img')); + + browser.executeScript('window.scrollTo(0, 0);').then(function() { + browser.sleep(2500); + }); + await ProfileImage.click().then(function() { + browser.sleep(2500); + }); + browser.actions().mouseMove(LogOutLinkText).perform().then(function() { + browser.sleep(2500); + }); + await LogOutLinkText.click().then(function() { + browser.sleep(2500); + }); + browser.wait(EC.visibilityOf(ExACTLogo), 30000).then(function() { + browser.sleep(2500); + }); + expect(ExACTLogo.isPresent()).toBe(true); + }); +} \ No newline at end of file