Files
EdGateAutomatedRegression/myStandardsWidget_spec.js
2023-07-05 15:37:00 -07:00

1034 lines
70 KiB
JavaScript

//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);
});
}