//myContentWidget_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); }); /*browser.wait(EC.visibilityOf(CorrelationCoverageSubText), 30000).then(function() { browser.sleep(2500); }); expect(CorrelationCoverageSubText.isPresent()).toBe(true);*/ }); } //Dashboard Dashboard(); MyContentWidget(); Algebra(); ResultsPanel(); DeleteSavedSearch(); //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 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 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 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'); 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 MyContentWidget() { it(': MyContentWidget, should verify widget default information.', async function () { var MyContentWidgetTitle = element(by.css('.row:nth-child(2) > .col-lg-6:nth-child(1) .card-header')); var ExportButton = element(by.css('.col-lg-6:nth-child(1) .btn')); var EC = protractor.ExpectedConditions; var ExportDIVTitle = element(by.css('.modal-header:nth-child(4) > .modal-title')); var ExportDIVXCloseIcon = element(by.css('.modal-header:nth-child(4) span')); var ExportDIVSubText = element(by.css('#content-export-container > h5')); var ExportDIVDropdownLabel = element(by.css('.form-label')); var ExportDIVDropdown = element(by.css('.multiselect-selected-text')); var ExportDIVDropdownMagnifyingGlassIcon = element(by.css('.input-group-text > .fa')); var ExportDIVDropdownSearchTextBox = element(by.css('.multiselect-search')); var SearchOptionCheckBoxOne = element(by.css('.multiselect-all input')); var SearchOptionLabelOne = element(by.css('.multiselect-all > .checkbox')); var SearchOptionCheckBoxTwo = element(by.css('li:nth-child(3) .checkbox > input')); var SearchOptionLabelTwo = element(by.css('li:nth-child(3) .checkbox')); var SearchOptionCheckBoxThree = element(by.css('li:nth-child(4) input')); var SearchOptionLabelThree = element(by.css('li:nth-child(4) .checkbox')); var SearchOptionCheckBoxFour = element(by.css('li:nth-child(5) input')); var SearchOptionLabelFour = element(by.css('li:nth-child(5) .checkbox')); var SearchOptionCheckBoxFive = element(by.css('li:nth-child(6) input')); var SearchOptionLabelFive = element(by.css('li:nth-child(6) .checkbox')); var SearchOptionCheckBoxSix = element(by.css('li:nth-child(7) input')); var SearchOptionLabelSix = element(by.css('li:nth-child(7) .checkbox')); var SearchOptionCheckBoxSeven = element(by.css('li:nth-child(8) input')); var SearchOptionLabelSeven = element(by.css('li:nth-child(8) .checkbox')); var SearchOptionCheckBoxEight = element(by.css('li:nth-child(9) input')); var SearchOptionLabelEight = element(by.css('li:nth-child(9) .checkbox')); var SearchOptionCheckBoxNine = element(by.css('li:nth-child(10) input')); var SearchOptionLabelNine = element(by.css('li:nth-child(10) .checkbox')); var SearchOptionCheckBoxTen = element(by.css('li:nth-child(11) input')); var SearchOptionLabelTen = element(by.css('li:nth-child(11) .checkbox')); var SearchOptionCheckBoxEleven = element(by.css('li:nth-child(12) input')); var SearchOptionLabelEleven = element(by.css('li:nth-child(12) .checkbox')); var ExportDIVDropdownXClearIcon = element(by.css('.fa-times-circle')); var ExportDIVExportButton = element(by.css('.btn-primary')); var ExporDIVCloseButton = element(by.css('.btn-secondary')); var ContentLabelOne = element(by.css('.list-group-item:nth-child(1)')); var ContentCountOne = element(by.css('.list-group-item:nth-child(1) .badge')); var ContentLabelTwo = element(by.css('.list-group-item:nth-child(2)')); var ContentCountTwo = element(by.css('.list-group-item:nth-child(2) .badge')); var ContentLabelThree = element(by.css('.list-group-item:nth-child(3) > a')); var ContentCountThree = element(by.css('.list-group-item:nth-child(3) .badge')); var ContentLabelFour = element(by.css('.list-group-item:nth-child(4)')); var ContentCountFour = element(by.css('.list-group-item:nth-child(4) .badge')); var ContentLabelFive = element(by.css('.list-group-item:nth-child(5)')); var ContentCountFive = element(by.css('.list-group-item:nth-child(5) .badge')); var ContentLabelSix = element(by.css('.list-group-item:nth-child(6)')); var ContentCountSix = element(by.css('.list-group-item:nth-child(6) .badge')); var ContentLabelSeven = element(by.css('.list-group-item:nth-child(7)')); var ContentCountSeven = element(by.css('.list-group-item:nth-child(7) .badge')); var ContentLabelEight = element(by.css('.list-group-item:nth-child(8)')); var ContentCountEight = element(by.css('.list-group-item:nth-child(8) .badge')); var ContentLabelNine = element(by.css('.list-group-item:nth-child(9)')); var ContentCountNine = element(by.css('.list-group-item:nth-child(9) .badge')); var ContentLabelTen = element(by.css('.list-group-item:nth-child(10)')); var ContentCountTen = element(by.css('.list-group-item:nth-child(10) .badge')); var ExportPageTitle = element(by.css('h2')); var ExportPageSubText = element(by.css('b')); var ExportPageDownloadExportButton = element(by.css('.btn')); var DashboardMenuIcon = element(by.linkText('Dashboard')); expect(await MyContentWidgetTitle.getText()).toContain('My Content'); expect(ExportButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ExportButton.getText()).toEqual('Export'); expect(await ContentLabelOne.getText()).toContain('Biology'); expect(ContentCountOne.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountOne.getText()).toEqual('1043'); expect(await ContentLabelTwo.getText()).toContain('Geometry'); expect(ContentCountTwo.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountTwo.getText()).toEqual('979'); expect(await ContentLabelThree.getText()).toContain('English I'); expect(ContentCountThree.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountThree.getText()).toEqual('407'); expect(await ContentLabelFour.getText()).toContain('Algebra'); expect(ContentCountFour.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountFour.getText()).toEqual('183'); expect(await ContentLabelFive.getText()).toContain('US History'); expect(ContentCountFive.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountFive.getText()).toEqual('62'); expect(await ContentLabelSix.getText()).toContain('Demo - User Submitted Content'); expect(ContentCountSix.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountSix.getText()).toEqual('17'); expect(await ContentLabelSeven.getText()).toContain('Upload Demo'); expect(ContentCountSeven.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountSeven.getText()).toEqual('0'); expect(await ContentLabelEight.getText()).toContain('Exploring - Access'); expect(ContentCountEight.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountEight.getText()).toEqual('0'); expect(await ContentLabelNine.getText()).toContain('Exploring - PowerPoint'); expect(ContentCountNine.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountNine.getText()).toEqual('0'); expect(await ContentLabelTen.getText()).toContain('Exploring - Word'); expect(ContentCountTen.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ContentCountTen.getText()).toEqual('0'); await ExportButton.click().then(function() { browser.sleep(2500); }); browser.wait(EC.visibilityOf(ExportDIVTitle), 30000).then(function() { browser.sleep(2500); }); expect(await ExportDIVTitle.getText()).toEqual('Export Content'); expect(ExportDIVXCloseIcon.isPresent()).toBe(true); expect(await ExportDIVSubText.getText()).toEqual('Please select one or more content sets to export:'); expect(await ExportDIVDropdownLabel.getText()).toEqual('Content Set'); expect(await ExportDIVDropdown.getText()).toEqual('Please select a Content Set'); expect(ExportDIVExportButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ExportDIVExportButton.getAttribute('value')).toEqual('Export'); expect(ExporDIVCloseButton.getCssValue('background-color')).toBe('rgba(108, 117, 125, 1)'); //grey expect(await ExporDIVCloseButton.getText()).toEqual('Close'); await ExportDIVDropdown.click().then(function() { browser.sleep(2500); }); browser.wait(EC.visibilityOf(ExportDIVDropdownMagnifyingGlassIcon), 30000).then(function() { browser.sleep(2500); }); expect(await ExportDIVDropdownSearchTextBox.getAttribute('placeholder')).toEqual('Search'); expect(ExportDIVDropdownXClearIcon.isPresent()).toBe(true); await ExportDIVDropdownSearchTextBox.click().then(function() { browser.sleep(2500); }); browser.wait(EC.visibilityOf(SearchOptionCheckBoxOne), 30000).then(function() { browser.sleep(2500); }); expect(SearchOptionCheckBoxOne.isPresent()).toBe(true); expect(await SearchOptionLabelOne.getText()).toEqual('Select all'); expect(SearchOptionCheckBoxTwo.isPresent()).toBe(true); expect(await SearchOptionLabelTwo.getText()).toEqual('Demo - User Submitted Content'); expect(SearchOptionCheckBoxThree.isPresent()).toBe(true); expect(await SearchOptionLabelThree.getText()).toEqual('Algebra'); expect(SearchOptionCheckBoxFour.isPresent()).toBe(true); expect(await SearchOptionLabelFour.getText()).toEqual('Biology'); expect(SearchOptionCheckBoxFive.isPresent()).toBe(true); expect(await SearchOptionLabelFive.getText()).toEqual('English I'); expect(SearchOptionCheckBoxSix.isPresent()).toBe(true); expect(await SearchOptionLabelSix.getText()).toEqual('Geometry'); expect(SearchOptionCheckBoxSeven.isPresent()).toBe(true); expect(await SearchOptionLabelSeven.getText()).toEqual('US History'); expect(SearchOptionCheckBoxEight.isPresent()).toBe(true); expect(await SearchOptionLabelEight.getText()).toEqual('Upload Demo'); expect(SearchOptionCheckBoxNine.isPresent()).toBe(true); expect(await SearchOptionLabelNine.getText()).toEqual('Exploring - Access'); expect(SearchOptionCheckBoxTen.isPresent()).toBe(true); expect(await SearchOptionLabelTen.getText()).toEqual('Exploring - PowerPoint'); expect(SearchOptionCheckBoxEleven.isPresent()).toBe(true); expect(await SearchOptionLabelEleven.getText()).toEqual('Exploring - Word'); await SearchOptionCheckBoxThree.click().then(function() { browser.sleep(2500); }); await SearchOptionLabelSix.click().then(function() { browser.sleep(2500); }); await ExportDIVExportButton.click().then(function() { browser.sleep(2500); }); browser.wait(EC.visibilityOf(ExportPageTitle), 30000).then(function() { browser.sleep(2500); }); expect(await ExportPageTitle.getText()).toEqual('Export'); expect(await ExportPageSubText.getText()).toEqual('Export complete!'); expect(ExportPageDownloadExportButton.getCssValue('background-color')).toBe('rgba(1, 160, 78, 1)'); //green expect(await ExportPageDownloadExportButton.getText()).toEqual('Download Export'); expect(await DashboardMenuIcon.getText()).toEqual('Dashboard'); await DashboardMenuIcon.click().then(function() { browser.sleep(2500); }); }); } 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); }); }