Files
EdGateAutomatedRegression/app_journeysmap_spec.js

2024 lines
119 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//app-journeysmap_spec.js
describe('Journeysmap script', function () {
//app-journeysmap landing page
var UserNameTextBox = element(by.css('.form-space-medium'));
var PasswordTextBox = element(by.css('.form-space-large'));
var SignInButton = element(by.css('.btn-block'));
//Open browser
browser.driver.manage().window().maximize();
browser.get('https://app-qa.journeysmap.com/Journey/index.html#/signin');
it('should have a title', async function () {
await expect(browser.getTitle()).toEqual('Journeys');
});
//Sign In
SignIn(UserNameTextBox, PasswordTextBox, SignInButton);
it('should have a title', async function () {
await expect(browser.getTitle()).toEqual('Journeys');
});
function SignIn(UserNameTextBox, PasswordTextBox, SignInButton) {
it('should sign into journeys', async function () {
var JourneysGreeting = element(by.css('.dropdown'));
await UserNameTextBox.sendKeys('QA_AutomatedRegression');
await PasswordTextBox.sendKeys('3Dm1nAuto');
await SignInButton.click();
browser.waitForAngular();
browser.getCurrentUrl();
expect(await JourneysGreeting.getText()).toEqual('Hi, Automated');
/*browser.refresh();
//browser.driver.navigate().refresh();
expect(await JourneysGreeting.getText()).toEqual('Hi, Automated');
browser.waitForAngular();
browser.getCurrentUrl();*/
});
}
//<<<<DASHBOARD>>>>
//Top Career
/*TopCareerWidget();
TopCareer();
AtAGlance();
Personality();
Wages();
Degrees();
Certificates();
Institutions();
TopResources();
FindOpportunities();
SubmitAResource();
NearbyPlaces();
Tasks();*/
Technology();
/*Knowledge();
Skills();
WorkActivities();
Ability();
//My Resources
MyResources();
//Institutions
Instititions();
//My Recommended Careers
MyRecommendedCareers();
//My Journeys
MyJourneys();
//<<<<Interest Survey>>>>
InterestSurvey();
//Interest Survey Results
InterestSurveyResults();
InterestSurveyResultsClusters();
InterestSurveyResultsCreateJourney();
//<<<<MY JOURNEYS>>>>
MyJourneysPage();
//<<<<MAP>>>>
MapInteraction();
//<<<<Account Profile>>>>
//Profile
AccountProfile();
//Portfolio
AccountPortfolio();
//Sign Out*/
SignOut();
});
function TopCareerWidget() {
it('should edit Top Career', async function () {
var WidgetTitle = element(by.css('.full-width > .widget-padding > .jrnys_lead-body-copy'));
var TopCareerEditIcon = element(by.css('.full-width .fa-pencil'));
var TopCareerDivTitle = element(by.css('h2'));
var TopCareerDivXRemoveLink = element(by.css('.glyphicon-remove'));
var TopCareerDivCancelButton = element(by.css('.row:nth-child(12) .btn-alt-info'));
var TopCareerGreenText = element(by.xpath('//div/div[2]/table/tbody/tr/td/div[2]/div[2]'));
var TopCareerGreenSubText = element(by.xpath('//td/div[2]/div[3]'));
var TopCareerDivAddButton = element(by.xpath('//button[contains(.,"Add Top Career")]'));
var TopCareerDivTextBox = element(by.id('searchBox'));
var TopCareerDivSelection = element(by.xpath('//div[2]/div/ul/li[3]/a/span'));
var TopCareerDivSaveButton = element(by.css('.row:nth-child(12) #photoBtn'));
var TopCareerDescription = element(by.css('.jrEllipsis3Lines'));
browser.actions().mouseMove(element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Top Career');
browser.actions().mouseMove(element(by.id('topCareerFull'))).perform().then(function() {
browser.sleep(1000);
});
await TopCareerEditIcon.click().then(function() {
browser.sleep(1000);
});
expect(await TopCareerDivTitle.getText()).toEqual('Dream big, reach higher!');
await TopCareerDivXRemoveLink.click().then(function() {
browser.sleep(1000);
});
await TopCareerDivCancelButton.click().then(function() {
browser.sleep(1000);
});
expect(await TopCareerGreenText.getText()).toEqual('Top Career');
expect(await TopCareerGreenSubText.getText()).toEqual("Head in the clouds? Share what Career you’re thinking about!");
await TopCareerDivAddButton.click().then(function() {
browser.sleep(1000);
});
await TopCareerDivTextBox.click().then(function() {
browser.sleep(1000);
});
await TopCareerDivTextBox.sendKeys('Computer');
await TopCareerDivSelection.click().then(function() {
browser.sleep(1000);
});
await TopCareerDivSaveButton.click().then(function() {
browser.sleep(1000);
});
expect(await TopCareerDescription.getText()).toEqual('Conduct research into fundamental computer and information science as theorists, designers, or inventors. Develop solutions to problems in the field of computer hardware and software.');
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function TopCareer() {
it('should click the Top Career link and interact with Learn More page', async function () {
var TopCareerLink = element(by.css('td>.jrnys_support-text'));
var LearnMoreTitle = element(by.css('td > div:nth-child(1) > .jrnys_lead-body-copy'));
var DescriptionDetail = element(by.css('.info-icon:nth-child(2) > .journey-info-circle'));
var DescriptionHeader = element(by.css('.col-lg-12 > .ng-binding'));
var DescriptionSubText = element(by.css('.col-lg-12:nth-child(3)'));
var XCloseLink = element(by.css('.close'));
var Video = element(by.css('.text-right .socialImgIcon .far'));
var Follow = element(by.css('.text-right .journey-follow:nth-child(2)'));
var Favorite = element(by.css('.text-right .journey-favorite:nth-child(3)'));
var JourneymanIcon = element(by.css('.text-right .socialImgIcon .socialImgIconJourneyableSvg'));
var AtAGlanceHeader = element(by.css('#atAGlanceWidget .jrnys_lead-body-copy'));
var WidgetHeaderOne = element(by.css('.row-height:nth-child(1) .jrnys_support-text'));
var WidgetStatOne = element(by.css('.row-height:nth-child(1) .col-sm-offset-4'));
var WidgetHeaderTwo = element(by.css('.row-height:nth-child(2) .jrnys_support-text'));
var WidgetStatTwo = element(by.css('.row-height:nth-child(2) .dataFontSize'));
var WidgetHeaderThree = element(by.css('.row-height:nth-child(3) .jrnys_support-text'));
var WidgetSubHeaderThree = element(by.css('.col-sm-offset-4 > span'));
var WidgetStatThree = element(by.css('.row-height:nth-child(3) .col-sm-offset-4'));
var WidgetHeaderFour = element(by.css('.row-height:nth-child(4) .jrnys_support-text'));
var WidgetStatFour = element(by.css('.row-height:nth-child(4) .dataFontSize'));
var WidgetHeaderFive = element(by.css('.row-height:nth-child(5) .jrnys_support-text'));
var WidgetStatFive = element(by.css('.row-height:nth-child(5) .dataFontSize'));
var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover'));
var PersonalityHeader = element(by.css('.widget-round-corners:nth-child(3) .fullHeight .jrnys_lead-body-copy'));
var WidgetDescriptionOne = element(by.css('.carouselHeight > .ng-scope > tbody > tr > td > .ng-binding'));
var WidgetDescriptionTwo = element(by.css('.ng-scope > tbody > tr:nth-child(2) div'));
var WidgetBulletOne = element(by.css('table:nth-child(1) .ng-scope:nth-child(1) > td:nth-child(1) > .ng-binding:nth-child(2)'));
var WidgetBulletTwo = element(by.css('.ng-scope:nth-child(1) > td:nth-child(2) > .ng-binding'));
var WidgetBulletThree = element(by.css('table:nth-child(1) .ng-scope:nth-child(2) > td:nth-child(1) > .ng-binding:nth-child(2)'));
var WidgetBulletFour = element(by.css('.ng-scope:nth-child(2) > td:nth-child(2) > .ng-binding'));
var WidgetBulletFive = element(by.css('table:nth-child(1) .ng-scope:nth-child(3) > td:nth-child(1) > .ng-binding:nth-child(2)'));
var WidgetBulletSix = element(by.css('.ng-scope:nth-child(3) > td:nth-child(2) > .ng-binding'));
var WagesHeader = element(by.css('.widget-round-corners:nth-child(4) .fullHeight .jrnys_lead-body-copy'));
var CurrentDataLocation = element(by.css('tr:nth-child(7) .ng-binding'));
var CurrentDataCountry = element(by.css('tr:nth-child(7) span:nth-child(2)'));
var ChangeLocationLinkText = element(by.css('.dropdown > .widgetRightControlContainer'));
var ZipCodeTextBox = element(by.css('.ng-valid-maxlength:nth-child(1)'));
var ApplyButton = element(by.css('tr:nth-child(1) > td > .btn'));
var DegreesHeader = element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy'));
var DegreesRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon'));
var CertificatesHeader = element(by.css('.widget-round-corners:nth-child(6) #id > .jrnys_lead-body-copy'));
var CertificatesRightScroll = element(by.xpath('//li[6]')).element(by.css('.glyphicon-chevron-right'));
var InstitutionsHeader = element(by.xpath('//li[7]/div/div/div[2]/div/div'));
var InstitutionsRightScroll = element(by.css('#recommendedColleges .right > .glyphicon'));
var TopResourcesHeader = element(by.css('#id > .fullHeight > .jrnys_lead-body-copy'));
var TopResourcesRightScroll = element(by.css('.table-height:nth-child(3) .right > .glyphicon'));
var FindOpportunitiesHeader = element(by.css('.widgetTitleContainerFindJob > .noPaddingCol'));
var FindOpportunitiesSubText = element(by.css('.col-sm-12:nth-child(2)'));
var JobTotals = element(by.css('.col-sm-4:nth-child(1) .col-sm-8 .jrnys_stand-out-text'));
var JobListingsDivHeader = element(by.css('.col-xs-12 > h6:nth-child(1) > .ng-binding'));
var Totals = element(by.css('#findJobsWidget > .text-color-7a:nth-child(4)'));
var ChangeLocationLink = element(by.css('.widgetTitleContainerFindJob > .col-sm-5'));
var ChangeLocationDivTitle = element(by.css('b'));
var ChangeLocationDivSubTitle = element(by.css('.col-xs-11:nth-child(2)'));
var ChnageLocationEnterZipCodeTextBox = element(by.css('#inputZip'));
var ChangeLocationApplyButton = element(by.css('#indeedQuery'));
var SubmitResourceWidgetTitle = element(by.css('.jrnys_lead-body-copy > .row > .col-xs-12'));
var SubmitResourceWidgetSubTextOne = element(by.css('.row:nth-child(2) > .jrnys_body-copy:nth-child(1)'));
var TotalInJourneys = element(by.css('.col-xs-offset-1 .col-xs-offset-1'));
var MySubmittedResourcesLink = element(by.css('.col-xs-offset-1 > .row .jrnys_lead-body-copy'));
var MySubmittedResourcesHeader = element(by.css('.col-sm-12 > .ng-binding'));
var EllipsisResource = element(by.css('.glyphicon-option-vertical:nth-child(1)'));
var ForThisMapPoint = element(by.css('.display-right .col-xs-offset-1'));
var SubmitResourceWidgetSubTextTwo = element(by.css('.row:nth-child(4) > .col-sm-12'));
var SubmitAResourceWidgetButton = element(by.css('.col-sm-12 > .jrnys_support-text'));
var SubmitAResourceDivTitle = element(by.css('h3'));
var SubmitAResourceDivCancelButton = element(by.css('.btn-blue-RoundTabsinfo'));
var TasksHeader = element(by.css('#tasksid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var TechnologyHeader = element(by.css('#technologyid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var KnowledgeHeader = element(by.css('#knowledgeid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var SkillsHeader = element(by.css('#skillsid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var WorkActivitiesHeader = element(by.css('#workActivitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var AbilityHeader = element(by.css('#abilitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy'));
var NearbyPlacesHeader = element(by.css('#nearByid > .jrnys_lead-body-copy'));
var NearbyPlacesRightScroll = element(by.xpath('//li[17]')).element(by.css('.glyphicon-chevron-right'));
await TopCareerLink.click().then(function() {
browser.sleep(20000);
});
//Description
expect(await LearnMoreTitle.getText()).toEqual('Computer and Information Research Scientists');
await DescriptionDetail.click().then(function() {
browser.sleep(1000);
});
expect(await DescriptionHeader.getText()).toEqual('Computer and Information Research Scientists');
expect(await DescriptionSubText.getText()).toContain('Conduct research into fundamental computer and information science as theorists, designers, or inventors. Develop solutions to problems in the field of computer hardware and software.');
expect(await DescriptionSubText.getText()).toContain('Other Jobs:');
expect(await DescriptionSubText.getText()).toContain('Computer Scientist; Control System Computer Scientist; Scientific Programmer Analyst');
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(Video).perform().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(Follow).perform().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(Favorite).perform().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(JourneymanIcon).perform().then(function() {
browser.sleep(1000);
});
//At A Glance
expect(await AtAGlanceHeader.getText()).toEqual('At A Glance');
expect(await WidgetHeaderOne.getText()).toEqual('Typical Degree');
expect(await WidgetStatOne.getText()).toContain("Master's degree - 59%");
expect(await WidgetStatOne.getText()).toContain("Associate's degree - 0%");
expect(await WidgetStatOne.getText()).toContain('College (4 Year) - 0%');
expect(await WidgetHeaderTwo.getText()).toEqual('Average Annual Salary');
expect(await WidgetStatTwo.getText()).toEqual('$114,520');
expect(await WidgetHeaderThree.getText()).toEqual('Projected Growth');
expect(await WidgetSubHeaderThree.getText()).toEqual(' ABOVE AVERAGE');
expect(await WidgetStatThree.getText()).toContain(' ABOVE AVERAGE');
expect(await WidgetStatThree.getText()).toContain('19.2%');
expect(await WidgetHeaderFour.getText()).toEqual('Projected Job Openings');
expect(await WidgetStatFour.getText()).toEqual('2,500');
expect(await WidgetHeaderFive.getText()).toEqual('Currently Employed');
expect(await WidgetStatFive.getText()).toEqual('27,900');
browser.actions().mouseMove(DegreesHeader).perform().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
//Personality
expect(await PersonalityHeader.getText()).toEqual('Personality');
expect(await WidgetDescriptionOne.getText()).toEqual('People interested in this work like activities that include ideas, thinking, and figuring things out.');
expect(await WidgetDescriptionTwo.getText()).toEqual('They do well at jobs that need:');
expect(await WidgetBulletOne.getText()).toEqual('Initiative');
expect(await WidgetBulletTwo.getText()).toEqual('Persistence');
expect(await WidgetBulletThree.getText()).toEqual('Achievement/Effort');
expect(await WidgetBulletFour.getText()).toEqual('Independence');
expect(await WidgetBulletFive.getText()).toEqual('Adaptability/Flexibility');
expect(await WidgetBulletSix.getText()).toEqual('Dependability');
//Wages
expect(await WagesHeader.getText()).toContain('Wages');
expect(await WagesHeader.getText()).toContain('Change Location');
expect(await CurrentDataLocation.getText()).toEqual('San Diego-Carlsbad-San Marcos, CA MSA');
expect(await CurrentDataCountry.getText()).toEqual('United States');
await ChangeLocationLinkText.click().then(function() {
browser.sleep(1000);
});
await ZipCodeTextBox.click();
await ZipCodeTextBox.clear();
await ZipCodeTextBox.sendKeys('85013').then(function() {
browser.sleep(1000);
});
await ApplyButton.click().then(function() {
browser.sleep(2500);
});
expect(await CurrentDataLocation.getText()).toEqual('Phoenix-Mesa-Scottsdale, AZ MSA');
expect(await CurrentDataCountry.getText()).toEqual('United States');
browser.actions().mouseMove(CertificatesHeader).perform().then(function() {
browser.sleep(1000);
});
//Degrees
expect(await DegreesHeader.getText()).toEqual('Degrees');
await DegreesRightScroll.click();
browser.sleep(1000);
browser.actions().mouseMove(InstitutionsHeader).perform().then(function() {
browser.sleep(1000);
});
//Certificates
expect(await CertificatesHeader.getText()).toEqual('Certificates');
await CertificatesRightScroll.click();
browser.sleep(1000);
browser.actions().mouseMove(TopResourcesHeader).perform().then(function() {
browser.sleep(1000);
});
//Institutions
expect(await InstitutionsHeader.getText()).toEqual('Institutions View All');
await InstitutionsRightScroll.click();
browser.actions().mouseMove(FindOpportunitiesHeader).perform().then(function() {
browser.sleep(1000);
});
//Top Resources
expect(await TopResourcesHeader.getText()).toEqual('Top Resources View All');
await TopResourcesRightScroll.click();
browser.sleep(1000);
browser.actions().mouseMove(TasksHeader).perform().then(function() {
browser.sleep(1000);
});
//Find Opportunities
expect(await FindOpportunitiesHeader.getText()).toEqual('Find Opportunities');
expect(await FindOpportunitiesSubText.getText()).toEqual('Great News! We found lots of opportunities within a 50 mile radius of you.');
expect(await Totals.getText()).toContain('Jobs');
//expect(await Totals.getText()).toContain('85');//stored value needed
expect(await Totals.getText()).toContain('Internships');
expect(await Totals.getText()).toContain('0');
expect(await Totals.getText()).toContain('Apprenticeships');
expect(await Totals.getText()).toContain('0');
await ChangeLocationLink.click().then(function() {
browser.sleep(1000);
});
expect(await ChangeLocationDivTitle.getText()).toEqual('Change Location');
expect(await ChangeLocationDivSubTitle.getText()).toEqual("Let's search the location you're most interested in.");
await ChnageLocationEnterZipCodeTextBox.sendKeys('85013');
browser.sleep(1000);
element(by.cssContainingText('option', '1000')).click().then(function() {
browser.sleep(1000);
});
await ChangeLocationApplyButton.click().then(function() {
browser.sleep(1000);
});
expect(await FindOpportunitiesSubText.getText()).toEqual('Great News! We found lots of opportunities within a 1000 mile radius of you.');
await JobTotals.click().then(function() {
browser.sleep(1000);
});
expect(await JobListingsDivHeader.getText()).toContain('Job Listings:');//stored value needed
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
expect(await Totals.getText()).toContain('Jobs');
//expect(await Totals.getText()).toContain('68');//stored value needed
expect(await Totals.getText()).toContain('Internships');
expect(await Totals.getText()).toContain('0');
expect(await Totals.getText()).toContain('Apprenticeships');
expect(await Totals.getText()).toContain('0');
//Submit A Resource
expect(await SubmitResourceWidgetTitle.getText()).toEqual('Submit a Resource');
expect(await SubmitResourceWidgetSubTextOne.getText()).toEqual("Here's a summary of your submitted Resources");
expect(await TotalInJourneys.getText()).toContain('Total in Journeys');
expect(await TotalInJourneys.getText()).toContain('1');
await MySubmittedResourcesLink.click().then(function() {
browser.sleep(1000);
});
expect(await MySubmittedResourcesHeader.getText()).toContain('My Submitted Resources');
await EllipsisResource.click().then(function() {
browser.sleep(1000);
});
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
expect(await ForThisMapPoint.getText()).toContain('For this map point');
expect(await ForThisMapPoint.getText()).toContain('0');
expect(await SubmitResourceWidgetSubTextTwo.getText()).toEqual('Help expand the system by submitting a resource.');
await SubmitAResourceWidgetButton.click().then(function() {
browser.sleep(1000);
});
expect(await SubmitAResourceDivTitle.getText()).toEqual('Submit a Resource');
await SubmitAResourceDivCancelButton.click().then(function() {
browser.sleep(1000);
});
browser.actions().mouseMove(KnowledgeHeader).perform().then(function() {
browser.sleep(1000);
});
//Tasks
expect(await TasksHeader.getText()).toEqual('Tasks View All');
//Technology
expect(await TechnologyHeader.getText()).toEqual('Technology View All');
browser.sleep(1000);
browser.actions().mouseMove(WorkActivitiesHeader).perform().then(function() {
browser.sleep(1000);
});
//Knowledge
expect(await KnowledgeHeader.getText()).toEqual('Knowledge View All');
//Skills
expect(await SkillsHeader.getText()).toEqual('Skills View All');
browser.sleep(1000);
browser.actions().mouseMove(NearbyPlacesHeader).perform().then(function() {
browser.sleep(1000);
});
//Work Activities
expect(await WorkActivitiesHeader.getText()).toEqual('Work Activities View All');
//Ability
expect(await AbilityHeader.getText()).toEqual('Ability View All');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
//Nearby Places
expect(await NearbyPlacesHeader.getText()).toEqual('Nearby Places');
await NearbyPlacesRightScroll.click();
browser.sleep(1000);
await DashboardHeaderLink.click();
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function AtAGlance() {
it('should click the At A Glance link and read pop-up title', async function () {
var AtAGlanceLink = element(by.css('tr:nth-child(3) > td:nth-child(1) > .text-color-7a'));
var WidgetTitle = element(by.css('.widgetHeaderContainer > .jrnys_lead-body-copy'));
var WidgetHeaderOne = element(by.css('.row-height:nth-child(1) .jrnys_support-text'));
var WidgetStatOne = element(by.css('.row-height:nth-child(1) .col-sm-offset-4'));
var WidgetHeaderTwo = element(by.css('.row-height:nth-child(2) .jrnys_support-text'));
var WidgetStatTwo = element(by.css('.row-height:nth-child(2) .dataFontSize'));
var WidgetHeaderThree = element(by.css('.row-height:nth-child(3) .jrnys_support-text'));
var WidgetSubHeaderThree = element(by.css('.col-sm-offset-4 > span'));
var WidgetStatThree = element(by.css('.row-height:nth-child(3) .col-sm-offset-4'));
var WidgetHeaderFour = element(by.css('.row-height:nth-child(4) .jrnys_support-text'));
var WidgetStatFour = element(by.css('.row-height:nth-child(4) .dataFontSize'));
var WidgetHeaderFive = element(by.css('.row-height:nth-child(5) .jrnys_support-text'));
var WidgetStatFive = element(by.css('.row-height:nth-child(5) .dataFontSize'));
var XCloseLink = element(by.css('.close'));
await AtAGlanceLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('At A Glance');
expect(await WidgetHeaderOne.getText()).toEqual('Typical Degree');
expect(await WidgetStatOne.getText()).toContain("Master's degree - 59%");
expect(await WidgetStatOne.getText()).toContain("Associate's degree - 0%");
expect(await WidgetStatOne.getText()).toContain('College (4 Year) - 0%');
expect(await WidgetHeaderTwo.getText()).toEqual('Average Annual Salary');
expect(await WidgetStatTwo.getText()).toEqual('$114,520');
expect(await WidgetHeaderThree.getText()).toEqual('Projected Growth');
expect(await WidgetSubHeaderThree.getText()).toContain(' ABOVE AVERAGE');
expect(await WidgetStatThree.getText()).toContain(' ABOVE AVERAGE');
expect(await WidgetStatThree.getText()).toContain('19.2%');
expect(await WidgetHeaderFour.getText()).toEqual('Projected Job Openings');
expect(await WidgetStatFour.getText()).toEqual('2,500');
expect(await WidgetHeaderFive.getText()).toEqual('Currently Employed');
expect(await WidgetStatFive.getText()).toEqual('27,900');
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Personality() {
it('should click the Personality link and read pop-up title', async function() {
var PersonatlityLink = element(by.css('tr:nth-child(4) > td:nth-child(1) > .text-color-7a'));
var WidgetTitle = element(by.css('.ng-isolate-scope:nth-child(3) > .fullHeight .jrnys_lead-body-copy'));
var WidgetDescriptionOne = element(by.css('.carouselHeight > .ng-scope td > .ng-binding'));
var WidgetDescriptionTwo = element(by.css('.carouselHeight > .ng-scope tr:nth-child(2) div'));
var WidgetBulletOne = element(by.css('.ng-scope > tbody > .ng-scope:nth-child(3) .ng-binding'));
var WidgetBulletTwo = element(by.css('.ng-scope > tbody > .ng-scope:nth-child(4) .ng-binding'));
var WidgetBulletThree = element(by.css('.ng-scope > tbody > .ng-scope:nth-child(5) .ng-binding'));
var WidgetBulletFour = element(by.css('.ng-scope > tbody > .ng-scope:nth-child(6) .ng-binding'));
var WidgetBulletFive = element(by.css('.ng-scope:nth-child(7) > td .ng-binding'));
var WidgetBulletSix = element(by.css('.ng-scope:nth-child(8) > td .ng-binding'));
var XCloseLink = element(by.css('.close'));
await PersonatlityLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Personality');
expect(await WidgetDescriptionOne.getText()).toEqual('People interested in this work like activities that include ideas, thinking, and figuring things out.');
expect(await WidgetDescriptionTwo.getText()).toEqual('They do well at jobs that need:');
expect(await WidgetBulletOne.getText()).toEqual('Initiative');
expect(await WidgetBulletTwo.getText()).toEqual('Persistence');
expect(await WidgetBulletThree.getText()).toEqual('Achievement/Effort');
expect(await WidgetBulletFour.getText()).toEqual('Independence');
expect(await WidgetBulletFive.getText()).toEqual('Adaptability/Flexibility');
expect(await WidgetBulletSix.getText()).toEqual('Dependability');
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Wages() {
it('should click the Wages link and change zip code to 85013(AZ)', async function () {
var WagesLink = element(by.css('tr:nth-child(5) > td:nth-child(1) > .text-color-7a'));
var CurrentDataLocation = element(by.css('tr:nth-child(7) .ng-binding'));
var CurrentDataCountry = element(by.css('tr:nth-child(7) span:nth-child(2)'));
var XCloseLink = element(by.css('.close'));
var ChangeLocationLink = element(by.css('.dropdown > .widgetRightControlContainer'));
var ZipCodeTextBox = element(by.css('.ng-valid-maxlength:nth-child(1)'));
var ApplyButton = element(by.css('tr:nth-child(2) .btn-xs'));
await WagesLink.click().then(function() {
browser.sleep(1000);
});
expect(await CurrentDataLocation.getText()).toEqual('San Diego-Carlsbad-San Marcos, CA MSA');
expect(await CurrentDataCountry.getText()).toEqual('United States');
await ChangeLocationLink.click().then(function() {
browser.sleep(1000);
});
element(by.cssContainingText('option', 'Nevada')).click().then(function() {
browser.sleep(1000);
});
await ApplyButton.click().then(function() {
browser.sleep(2500);
});
expect(await CurrentDataLocation.getText()).toEqual('Nevada');
expect(await CurrentDataCountry.getText()).toEqual('United States');
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Degrees() {
it('should click the Degrees link, expand/collapse first career card by title', async function () {
var DegreesLink = element(by.css('tr:nth-child(3) > td:nth-child(2) > .text-color-7a'));
var WidgetTitle = element(by.css('#id > .jrnys_lead-body-copy'));
var ExpandDegreeCard = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .textSize'));
var CollapseDegreeCard = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .col-xs-1'));
var CarrouselRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon'));
var XCloseLink = element(by.css('.close'));
await DegreesLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Degrees');
await ExpandDegreeCard.click();
browser.sleep(1000);
await CollapseDegreeCard.click();
browser.sleep(1000);
await CarrouselRightScroll.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Certificates() {
it('should click the Certificate link, expand/collapse first card by ellipsis and scroll to second set', async function () {
var CertificatesLink = element(by.css('tr:nth-child(4) > td:nth-child(2) > .text-color-7a'));
var WidgetTitle = element(by.css('#id > .jrnys_lead-body-copy'));
var EllipsisCertificate = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(2) .col-sm-1'));
var CarrouselRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon'));
var XCloseLink = element(by.css('.close'));
await CertificatesLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Certificates');
await EllipsisCertificate.click();
browser.sleep(1000);
await EllipsisCertificate.click();
browser.sleep(1000);
await CarrouselRightScroll.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Institutions() {
it('should click the Institutions link, navigate to next set, expand by ellipsis, favorite second card, collapse by ellipsis, then scroll back to first set', async function () {
var InstitutionsLink = element(by.css('tr:nth-child(5) > td:nth-child(2) > .text-color-7a'));
var WidgetTitle = element(by.xpath('//recommended-colleges/div/div[2]/div/div'));
var EllipsisInstitutions = element(by.css('.item:nth-child(2) > .col-xs-12:nth-child(2) .col-sm-1'));
var InstitutionFavoriteButton = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-favorite'));
var InstitutionDetailsButton = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-info'));
var InstitutionFollowButton = element(by.css('.social-panel-spacing > .journey-follow-selected'));
var CarrouselRightScroll = element(by.css('#recommendedColleges .right > .glyphicon'));
var CarrouselLeftScroll = element(by.css('#recommendedColleges .left > .glyphicon'));
var XCloseLink = element(by.css('.close'));
await InstitutionsLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Institutions');
await CarrouselRightScroll.click();
await EllipsisInstitutions.click();
browser.sleep(1000);
await InstitutionFavoriteButton.click();
await InstitutionDetailsButton.click();
browser.sleep(2500);
await InstitutionFollowButton.click();
browser.sleep(2500);
await EllipsisInstitutions.click();
browser.sleep(1000);
await CarrouselLeftScroll.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function TopResources() {
it('should click Top Resources link and expand fourth and first card', async function () {
var TopResourcesLink = element(by.css('tr:nth-child(3) > td:nth-child(3) > .text-color-7a'));
var ExpandFourthResourceCard = element(by.css('.panel:nth-child(4) .ng-binding'));
var ExpandFirstResourceCard = element(by.css('.panel:nth-child(1) .ng-binding'));
var XCloseLink = element(by.css('.close'));
await TopResourcesLink.click().then(function() {
browser.sleep(1000);
});
await ExpandFourthResourceCard.click();
browser.sleep(1000);
await ExpandFirstResourceCard.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function FindOpportunities() {
it('should click Find Opportunities link', async function () {
var FindOpportunitiesLink = element(by.css('tr:nth-child(4) > td:nth-child(3) > .text-color-7a'));
var WidgetTitle = element(by.css('.col-xs-12 > h6:nth-child(1) > .ng-binding'));
var XCloseLink = element(by.css('.close'));
await FindOpportunitiesLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toContain('Job Listings: 88');//stored value needed
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function SubmitAResource() {
it('should click Find Resources link', async function () {
var SubmitAResourceLink = element(by.css('tr:nth-child(5) > td:nth-child(3) > .text-color-7a'));
var WidgetTitle = element(by.css('.jrnys_lead-body-copy > .col-xs-12'));
var SubmitAResourceButton = element(by.css('.row:nth-child(7) .btn'));
var WidgetDivTitle = element(by.css('h3'));
var WebsiteURLLink = element(by.css('.Tag:nth-child(2) > label'));
var XCloseDivLink = element(by.css('.modal-header > .close'));
var XCloseLink = element(by.css('.close'));
await SubmitAResourceLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Submit a Resource');
browser.waitForAngular();
await SubmitAResourceButton.click();
browser.waitForAngular();
expect(await WidgetDivTitle.getText()).toEqual('Submit a Resource');
browser.waitForAngular();
WebsiteURLLink.click();
await XCloseDivLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function NearbyPlaces() {
it('should click Nearby Places link, expand 3rd card and play video', async function () {
var NearbyPlacesLink = element(by.css('tr:nth-child(3) > td:nth-child(4) > .text-color-7a'));
var WidgetTitle = element(by.css('#nearByid > .jrnys_lead-body-copy'));
var EllipsisNearyByPlaces = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(3) .col-sm-1'));
var DetailsButton = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .row:nth-child(6) > .col-xs-9'));
var VideoButton = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .far'));
var VideoTitle = element(by.css('.modal-content > .ng-scope > div > .ng-binding'));
var XCloseVideoDivLink = element(by.css('.close:nth-child(2)'));
var XCloseLink = element(by.css('.close'));
browser.actions().mouseMove(element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
await NearbyPlacesLink.click();
browser.waitForAngular();
expect(await WidgetTitle.getText()).toEqual('Nearby Places');
browser.waitForAngular();
await EllipsisNearyByPlaces.click();
browser.sleep(2500);
await DetailsButton.click();
browser.sleep(2500);
await VideoButton.click();
browser.sleep(15000);
expect(await VideoTitle.getText()).toEqual('Computer and Information Research Scientists');
await XCloseVideoDivLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Tasks() {
it('should click Tasks link', async function () {
var TasksLink = element(by.css('tr:nth-child(4) > td:nth-child(4) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var ImportanceHeader = element(by.css('th:nth-child(2) > .text-color-7a'));
var CategoryHeader = element(by.css('th:nth-child(3) > .text-color-7a'));
var TasksRowOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var ImportanceStatOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a:nth-child(2)'));
var CategoryStatOne = element(by.css('.ng-scope:nth-child(1) > .text-center:nth-child(3)'));
var TasksRowTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)'));
var ImportanceStatTwo = element(by.css('.ng-scope:nth-child(2) > .text-color-7a:nth-child(2)'));
var CategoryStatTwo = element(by.css('.ng-scope:nth-child(2) > .text-center:nth-child(3)'));
var TasksRowThree = element(by.css('.ng-scope:nth-child(3) > .ng-binding:nth-child(1)'));
var ImportanceStatThree = element(by.css('.ng-scope:nth-child(3) > .text-color-7a:nth-child(2)'));
var CategoryStatThree = element(by.css('.ng-scope:nth-child(3) > .text-center:nth-child(3)'));
var TasksRowFour = element(by.css('.ng-scope:nth-child(4) > .ng-binding:nth-child(1)'));
var ImportanceStatFour = element(by.css('.ng-scope:nth-child(4) > .text-color-7a:nth-child(2)'));
var CategoryStatFour = element(by.css('.ng-scope:nth-child(4) > .text-center:nth-child(3)'));
var TasksRowFive = element(by.css('.ng-scope:nth-child(5) > .ng-binding:nth-child(1)'));
var ImportanceStatFive = element(by.css('.ng-scope:nth-child(5) > .text-color-7a:nth-child(2)'));
var CategoryStatFive = element(by.css('.ng-scope:nth-child(5) > .text-center:nth-child(3)'));
var TasksRowSix = element(by.css('.ng-scope:nth-child(6) > .ng-binding:nth-child(1)'));
var ImportanceStatSix = element(by.css('.ng-scope:nth-child(6) > .text-color-7a:nth-child(2)'));
var CategoryStatSix = element(by.css('.ng-scope:nth-child(6) > .text-center:nth-child(3)'));
var TasksRowSeven = element(by.css('.ng-scope:nth-child(7) > .ng-binding:nth-child(1)'));
var ImportanceStatSeven = element(by.css('.ng-scope:nth-child(7) > .text-color-7a:nth-child(2)'));
var CategoryStatSeven = element(by.css('.ng-scope:nth-child(7) > .text-center:nth-child(3)'));
var TasksRowEight = element(by.css('.ng-scope:nth-child(8) > .ng-binding:nth-child(1)'));
var ImportanceStatEight = element(by.css('.ng-scope:nth-child(8) > .text-color-7a:nth-child(2)'));
var CategoryStatEight = element(by.css('.ng-scope:nth-child(8) > .text-center:nth-child(3)'));
var TasksRowNine = element(by.css('.ng-scope:nth-child(9) > .ng-binding:nth-child(1)'));
var ImportanceStatNine = element(by.css('.ng-scope:nth-child(9) > .text-color-7a:nth-child(2)'));
var CategoryStatNine = element(by.css('.ng-scope:nth-child(9) > .text-center:nth-child(3)'));
var TasksRowTen = element(by.css('.ng-scope:nth-child(10) > .ng-binding:nth-child(1)'));
var ImportanceStatTen = element(by.css('.ng-scope:nth-child(10) > .text-color-7a:nth-child(2)'));
var CategoryStatTen= element(by.css('.ng-scope:nth-child(10) > .text-center:nth-child(3)'));
var TasksRowEleven = element(by.css('.ng-scope:nth-child(11) > .ng-binding:nth-child(1)'));
var ImportanceStatEleven = element(by.css('.ng-scope:nth-child(11) > .text-color-7a:nth-child(2)'));
var CategoryStatEleven = element(by.css('.ng-scope:nth-child(11) > .text-center:nth-child(3)'));
var TasksRowTwelve = element(by.css('.ng-scope:nth-child(12) > .ng-binding:nth-child(1)'));
var ImportanceStatTwelve = element(by.css('.ng-scope:nth-child(12) > .text-color-7a:nth-child(2)'));
var CategoryStatTwelve = element(by.css('.ng-scope:nth-child(12) > .text-center:nth-child(3)'));
var TasksRowThirteen = element(by.css('.ng-scope:nth-child(13) > .ng-binding:nth-child(1)'));
var ImportanceStatThirteen = element(by.css('.ng-scope:nth-child(13) > .text-color-7a:nth-child(2)'));
var CategoryStatThirteen = element(by.css('.ng-scope:nth-child(13) > .text-center:nth-child(3)'));
var TasksRowFourteen = element(by.css('.ng-scope:nth-child(14) > .ng-binding:nth-child(1)'));
var ImportanceStatFourteen = element(by.css('.ng-scope:nth-child(14) > .text-color-7a:nth-child(2)'));
var CategoryStatFourteen = element(by.css('.ng-scope:nth-child(14) > .text-center:nth-child(3)'));
var TasksRowFifteen = element(by.css('.ng-scope:nth-child(15) > .ng-binding:nth-child(1)'));
var ImportanceStatFifteen = element(by.css('.ng-scope:nth-child(15) > .text-color-7a:nth-child(2)'));
var CategoryStatFifteen = element(by.css('.ng-scope:nth-child(15) > .text-center:nth-child(3)'));
var XCloseLink = element(by.css('.close'));
await TasksLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Tasks');
expect(await ImportanceHeader.getText()).toEqual('Importance');
expect(await CategoryHeader.getText()).toEqual('Category');
expect(await TasksRowOne.getText()).toEqual('Analyze problems to develop solutions involving computer hardware and software.');
expect(await ImportanceStatOne.getText()).toEqual('82%');
expect(await CategoryStatOne.getText()).toEqual('Core');
expect(await TasksRowTwo.getText()).toEqual('Assign or schedule tasks to meet work priorities and goals.');
expect(await ImportanceStatTwo.getText()).toEqual('71%');
expect(await CategoryStatTwo.getText()).toEqual('Core');
expect(await TasksRowThree.getText()).toEqual('Evaluate project plans and proposals to assess feasibility issues.');
expect(await ImportanceStatThree.getText()).toEqual('70%');
expect(await CategoryStatThree.getText()).toEqual('Core');
expect(await TasksRowFour.getText()).toEqual('Apply theoretical expertise and innovation to create or apply new technology, such as adapting principles for applying computers to new uses.');
expect(await ImportanceStatFour.getText()).toEqual('66%');
expect(await CategoryStatFour.getText()).toEqual('Core');
expect(await TasksRowFive.getText()).toEqual('Consult with users, management, vendors, and technicians to determine computing needs and system requirements.');
expect(await ImportanceStatFive.getText()).toEqual('66%');
expect(await CategoryStatFive.getText()).toEqual('Core');
expect(await TasksRowSix.getText()).toEqual('Meet with managers, vendors, and others to solicit cooperation and resolve problems.');
expect(await ImportanceStatSix.getText()).toEqual('64%');
expect(await CategoryStatSix.getText()).toEqual('Core');
expect(await TasksRowSeven.getText()).toEqual('Conduct logical analyses of business, scientific, engineering, and other technical problems, formulating mathematical models of problems for solution by computers.');
expect(await ImportanceStatSeven.getText()).toEqual('63%');
expect(await CategoryStatSeven.getText()).toEqual('Core');
expect(await TasksRowEight.getText()).toEqual('Develop and interpret organizational goals, policies, and procedures.');
expect(await ImportanceStatEight.getText()).toEqual('59%');
expect(await CategoryStatEight.getText()).toEqual('Core');
expect(await TasksRowNine.getText()).toEqual('Participate in staffing decisions and direct training of subordinates.');
expect(await ImportanceStatNine.getText()).toEqual('54%');
expect(await CategoryStatNine.getText()).toEqual('Core');
expect(await TasksRowTen.getText()).toEqual('Develop performance standards, and evaluate work in light of established standards.');
expect(await ImportanceStatTen.getText()).toEqual('51%');
expect(await CategoryStatTen.getText()).toEqual('Core');
expect(await TasksRowEleven.getText()).toEqual('Design computers and the software that runs them.');
expect(await ImportanceStatEleven.getText()).toEqual('74%');
expect(await CategoryStatEleven .getText()).toEqual('Supplemental');
expect(await TasksRowTwelve.getText()).toEqual('Maintain network hardware and software, direct network security measures, and monitor networks to ensure availability to system users.');
expect(await ImportanceStatTwelve.getText()).toEqual('65%');
expect(await CategoryStatTwelve.getText()).toEqual('Supplemental');
expect(await TasksRowThirteen.getText()).toEqual('Participate in multidisciplinary projects in areas such as virtual reality, human-computer interaction, or robotics.');
expect(await ImportanceStatThirteen.getText()).toEqual('62%');
expect(await CategoryStatThirteen.getText()).toEqual('Supplemental');
expect(await TasksRowFourteen.getText()).toEqual('Approve, prepare, monitor, and adjust operational budgets.');
expect(await ImportanceStatFourteen.getText()).toEqual('58%');
expect(await CategoryStatFourteen.getText()).toEqual('Supplemental');
expect(await TasksRowFifteen.getText()).toEqual('Direct daily operations of departments, coordinating project activities with other departments.');
expect(await ImportanceStatFifteen.getText()).toEqual('50%');
expect(await CategoryStatFifteen.getText()).toEqual('Supplemental');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Technology() {
it('should click Technology link', async function () {
var TechnologyLink = element(by.css('tr:nth-child(5) > td:nth-child(4) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var TechnologyTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding'));
var TechnologyDataOne = element(by.css('.ng-scope:nth-child(1) > .text-left > .ng-binding:nth-child(1)'));
//var TechnologyDataOneB = element(by.css('.ng-scope:nth-child(1) > .text-left > .ng-binding:nth-child(2)'));
var TechnologyTitleTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)'));
var TechnologyDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleThree = element(by.css('.ng-scope:nth-child(3) > .ng-binding'));
var TechnologyDataThree = element(by.css('.ng-scope:nth-child(3) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleFour = element(by.css('.ng-scope:nth-child(4) > .ng-binding'));
var TechnologyDataFour = element(by.css('.ng-scope:nth-child(4) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleFive = element(by.css('.ng-scope:nth-child(5) > .ng-binding'));
var TechnologyDataFive = element(by.css('.ng-scope:nth-child(5) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleSix = element(by.css('.ng-scope:nth-child(6) > .ng-binding'));
var TechnologyDataSix = element(by.css('.ng-scope:nth-child(6) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleSeven = element(by.css('.ng-scope:nth-child(7) > .ng-binding'));
var TechnologyDataSeven = element(by.css('.ng-scope:nth-child(7) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleEight = element(by.css('.ng-scope:nth-child(8) > .ng-binding'));
var TechnologyDataEight = element(by.css('.ng-scope:nth-child(8) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleNine = element(by.css('.ng-scope:nth-child(9) > .ng-binding'));
var TechnologyDataNine = element(by.css('.ng-scope:nth-child(9) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTen = element(by.css('.ng-scope:nth-child(10) > .ng-binding'));
var TechnologyDataTen = element(by.css('.ng-scope:nth-child(10) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleEleven = element(by.css('.ng-scope:nth-child(11) > .ng-binding'));
var TechnologyDataEleven = element(by.css('.ng-scope:nth-child(11) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwelve = element(by.css('.ng-scope:nth-child(12) > .ng-binding'));
var TechnologyDataTwelve = element(by.css('.ng-scope:nth-child(12) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleThirteen = element(by.css('.ng-scope:nth-child(13) > .ng-binding'));
var TechnologyDataThirteen = element(by.css('.ng-scope:nth-child(13) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleFourteen = element(by.css('.ng-scope:nth-child(14) > .ng-binding'));
var TechnologyDataFourteen = element(by.css('.ng-scope:nth-child(14) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleFifteen = element(by.css('.ng-scope:nth-child(15) > .ng-binding'));
var TechnologyDataFifteen = element(by.css('.ng-scope:nth-child(15) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleSixteen = element(by.css('.ng-scope:nth-child(16) > .ng-binding'));
var TechnologyDataSixteen = element(by.css('.ng-scope:nth-child(16) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleSeventeen = element(by.css('.ng-scope:nth-child(17) > .ng-binding'));
var TechnologyDataSeventeen = element(by.css('.ng-scope:nth-child(17) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleEighteen = element(by.css('.ng-scope:nth-child(18) > .ng-binding'));
var TechnologyDataEighteen = element(by.css('.ng-scope:nth-child(18) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleNineteen = element(by.css('.ng-scope:nth-child(19) > .ng-binding'));
var TechnologyDataNineteen = element(by.css('.ng-scope:nth-child(19) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwenty = element(by.css('.ng-scope:nth-child(20) > .ng-binding'));
var TechnologyDataTwenty = element(by.css('.ng-scope:nth-child(20) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyOne = element(by.css('.ng-scope:nth-child(21) > .ng-binding'));
var TechnologyDataTwentyOne = element(by.css('.ng-scope:nth-child(21) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyTwo = element(by.css('.ng-scope:nth-child(22) > .ng-binding'));
var TechnologyDataTwentyTwo = element(by.css('.ng-scope:nth-child(22) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyThree = element(by.css('.ng-scope:nth-child(23) > .ng-binding'));
var TechnologyDataTwentyThree = element(by.css('.ng-scope:nth-child(23) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyFour = element(by.css('.ng-scope:nth-child(24) > .ng-binding'));
var TechnologyDataTwentyFour = element(by.css('.ng-scope:nth-child(24) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyFive = element(by.css('.ng-scope:nth-child(25) > .ng-binding'));
var TechnologyDataTwentyFive = element(by.css('.ng-scope:nth-child(25) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentySix = element(by.css('.ng-scope:nth-child(26) > .ng-binding'));
var TechnologyDataTwentySix = element(by.css('.ng-scope:nth-child(26) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentySeven = element(by.css('.ng-scope:nth-child(27) > .ng-binding'));
var TechnologyDataTwentySeven = element(by.css('.ng-scope:nth-child(27) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyEight = element(by.css('.ng-scope:nth-child(28) > .ng-binding'));
var TechnologyDataTwentyEight = element(by.css('.ng-scope:nth-child(28) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleTwentyNine = element(by.css('.ng-scope:nth-child(29) > .ng-binding'));
var TechnologyDataTwentyNine = element(by.css('.ng-scope:nth-child(29) > .text-left > .ng-binding:nth-child(1)'));
var TechnologyTitleThirty = element(by.css('.ng-scope:nth-child(30) > .ng-binding'));
//var TechnologyDataThirty = element(by.css('.ng-scope:nth-child(30) > .text-left > .ng-binding:nth-child(1)'));
var XCloseLink = element(by.css('.close'));
await TechnologyLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Technology');
expect(await TechnologyTitleOne.getText()).toEqual('Development environment software');
expect(await TechnologyDataOne.getText()).toEqual('Ada ;');
expect(await TechnologyTitleTwo.getText()).toEqual('Analytical or scientific software');
expect(await TechnologyDataTwo.getText()).toEqual('Advanced numerical software ;');
expect(await TechnologyTitleThree.getText()).toEqual('Data base management system software');
expect(await TechnologyDataThree.getText()).toEqual('Apache Cassandra ;');
expect(await TechnologyTitleFour.getText()).toEqual('Operating system software');
expect(await TechnologyDataFour.getText()).toEqual('Bash ;');
expect(await TechnologyTitleFive.getText()).toEqual('Business intelligence and data analysis software');
expect(await TechnologyDataFive.getText()).toEqual('IBM Cognos Impromptu ;');
expect(await TechnologyTitleSix.getText()).toEqual('Web platform development software');
expect(await TechnologyDataSix.getText()).toEqual('Django ;');
expect(await TechnologyTitleSeven.getText()).toEqual('Graphics or photo imaging software');
expect(await TechnologyDataSeven.getText()).toEqual('Graphics pipelines ;');
expect(await TechnologyTitleEight.getText()).toEqual('Object or component oriented development software');
expect(await TechnologyDataEight.getText()).toEqual('C# ;');
expect(await TechnologyTitleNine.getText()).toEqual('Data base user interface and query software');
expect(await TechnologyDataNine.getText()).toEqual('Apache Hive ;');
expect(await TechnologyTitleTen.getText()).toEqual('Compiler and decompiler software');
expect(await TechnologyDataTen.getText()).toEqual('Greenhills Ada compilers ;');
expect(await TechnologyTitleEleven.getText()).toEqual('Configuration management software');
expect(await TechnologyDataEleven.getText()).toEqual('IBM Rational Apex ;');
expect(await TechnologyTitleTwelve.getText()).toEqual('Clustering software');
expect(await TechnologyDataTwelve.getText()).toEqual('Clustermatic ;');
expect(await TechnologyTitleThirteen.getText()).toEqual('Enterprise application integration software');
expect(await TechnologyDataThirteen .getText()).toEqual('Extensible markup language XML ;');
expect(await TechnologyTitleFourteen.getText()).toEqual('Computer aided design CAD software');
expect(await TechnologyDataFourteen.getText()).toEqual('Computer aided design and drafting CADD software ;');
expect(await TechnologyTitleFifteen.getText()).toEqual('Spreadsheet software');
expect(await TechnologyDataFifteen.getText()).toEqual('Microsoft Excel ');
expect(await TechnologyTitleSixteen.getText()).toEqual('Metadata management software');
expect(await TechnologyDataSixteen.getText()).toEqual('CA Erwin Data Modeler ');
expect(await TechnologyTitleSeventeen.getText()).toEqual('Enterprise system management software');
expect(await TechnologyDataSeventeen.getText()).toEqual('Splunk Enterprise ');
expect(await TechnologyTitleEighteen.getText()).toEqual('Object oriented data base management software');
expect(await TechnologyDataEighteen.getText()).toEqual('PostgreSQL ');
expect(await TechnologyTitleNineteen.getText()).toEqual('Enterprise resource planning ERP software');
expect(await TechnologyDataNineteen.getText()).toEqual('SAP Business Objects ');
expect(await TechnologyTitleTwenty.getText()).toEqual('Communications server software');
expect(await TechnologyDataTwenty.getText()).toEqual('IBM Domino ');
expect(await TechnologyTitleTwentyOne.getText()).toEqual('Portal server software');
expect(await TechnologyDataTwentyOne.getText()).toEqual('Apache HTTP Server ');
expect(await TechnologyTitleTwentyTwo.getText()).toEqual('Video creation and editing software');
expect(await TechnologyDataTwentyTwo.getText()).toEqual('Video editing software');
expect(await TechnologyTitleTwentyThree.getText()).toEqual('File versioning software');
expect(await TechnologyDataTwentyThree.getText()).toEqual('Git ');
expect(await TechnologyTitleTwentyFour.getText()).toEqual('Office suite software');
expect(await TechnologyDataTwentyFour.getText()).toEqual('Microsoft Office');
expect(await TechnologyTitleTwentyFive.getText()).toEqual('Graphical user interface development software');
expect(await TechnologyDataTwentyFive.getText()).toEqual('Waikato Environment for Knowledge Analysis Weka');
expect(await TechnologyTitleTwentySix.getText()).toEqual('Presentation software');
expect(await TechnologyDataTwentySix.getText()).toEqual('Microsoft PowerPoint ');
expect(await TechnologyTitleTwentySeven.getText()).toEqual('Map creation software');
expect(await TechnologyDataTwentySeven.getText()).toEqual('ESRI ArcGIS software ');
expect(await TechnologyTitleTwentyEight.getText()).toEqual('Web page creation and editing software');
expect(await TechnologyDataTwentyEight.getText()).toEqual('Plug-in file software');
expect(await TechnologyTitleTwentyNine.getText()).toEqual('Requirements analysis and system architecture software');
expect(await TechnologyDataTwentyNine.getText()).toEqual('Unified modeling language UML ');
expect(await TechnologyTitleThirty.getText()).toEqual('Data mining software');
//expect(await TechnologyDataThirty.getText()).toEqual('30');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Knowledge() {
it('should click Technology link', async function () {
var KnowledgeLink = element(by.css('tr:nth-child(3) > td:nth-child(5) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var ImportanceHeader = element(by.css('.text-right > .text-color-7a'));
var KnowledgeRow = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var ImportanceStat = element(by.css('.ng-scope:nth-child(1) > .text-color-7a'));
var XCloseLink = element(by.css('.close'));
await KnowledgeLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Knowledge');
expect(await ImportanceHeader.getText()).toEqual('Importance');
expect(await KnowledgeRow.getText()).toEqual('Computers and Electronics');
expect(await ImportanceStat.getText()).toEqual('90%');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Skills() {
it('should click Skills link', async function () {
var SkillsLink = element(by.css('tr:nth-child(4) > td:nth-child(5) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var ImportanceHeader = element(by.css('.text-right > .text-color-7a'));
var SkillsRow = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var SkillsStat = element(by.css('.ng-scope:nth-child(1) > .text-color-7a'));
var XCloseLink = element(by.css('.close'));
await SkillsLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Skills');
expect(await ImportanceHeader.getText()).toEqual('Importance');
expect(await SkillsRow.getText()).toEqual('Complex Problem Solving');
expect(await SkillsStat.getText()).toEqual('72%');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function WorkActivities() {
it('should click Work Activities link', async function () {
var WorkActivitiesLink = element(by.css('tr:nth-child(5) > td:nth-child(5) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var ImportanceHeader = element(by.css('.text-right > .text-color-7a'));
var WorkActivitiesRow = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var WorkActivitiesStat = element(by.css('.ng-scope:nth-child(1) > .text-color-7a'));
var XCloseLink = element(by.css('.close'));
await WorkActivitiesLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Work Activities');
expect(await ImportanceHeader.getText()).toEqual('Importance');
expect(await WorkActivitiesRow.getText()).toEqual('Interacting With Computers');
expect(await WorkActivitiesStat.getText()).toEqual('92%');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Ability() {
it('should click Work Activities link', async function () {
var AbilityLink = element(by.css('td:nth-child(6) > .text-color-7a'));
var WidgetTitle = element(by.css('h6 > .ng-binding'));
var ImportanceHeader = element(by.css('.text-right > .text-color-7a'));
var AbilityRow = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var AbilityStat = element(by.css('.ng-scope:nth-child(1) > .text-color-7a'));
var XCloseLink = element(by.css('.close'));
await AbilityLink.click().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Ability');
expect(await ImportanceHeader.getText()).toEqual('Importance');
expect(await AbilityRow.getText()).toEqual('Deductive Reasoning');
expect(await AbilityStat.getText()).toEqual('72%');
browser.waitForAngular();
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function MyResources() {
it('should click My Resources View All link, expand and collapse resource', async function () {
var WidgetTitle = element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'));
var ViewAllLink = element(by.css('#id > .ng-scope .text-color-7a'));
var WidgetDivTitle = element(by.css('.col-sm-12 > .ng-binding'));
var MyResourceTitle = element(by.css('.col-xs-9 > .ng-binding'));
var EllipsisMyResources = element(by.css('.glyphicon-option-vertical'));
var XCloseLink = element(by.css('.close'));
browser.actions().mouseMove(element(by.css('#myInstitutionsFull #id .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('My Resources View All');
await ViewAllLink.click();
browser.waitForAngular();
browser.getCurrentUrl();
expect(await WidgetDivTitle.getText()).toEqual('My Resources');
expect(await MyResourceTitle.getText()).toEqual('Test Doc');
await MyResourceTitle.click();
browser.sleep(1000);
await EllipsisMyResources.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function Instititions() {
it('should click Institution View All link', async function () {
var WidgetTitle = element(by.css('#myInstitutionsFull #id .jrnys_lead-body-copy'));
var ViewAllLink = element(by.css('#myInstitutionsFull .text-color-7a'));
var PageTitle = element(by.css('.panel-with-page > .row > b'));
var BackLink = element(by.css('.btn-primary-back-mod'));
browser.actions().mouseMove(element(by.css('#recommendedCareersFull .fullHeight .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
expect(await WidgetTitle.getText()).toEqual('Institutions View All');
await ViewAllLink.click();
browser.waitForAngular();
browser.getCurrentUrl();
expect(await PageTitle.getText()).toEqual('Edit Search');
browser.sleep(2500);
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
await BackLink.click();
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function MyRecommendedCareers() {
it('should cycle through Recommended Careers carousel and click the View More link', async function () {
var WidgetTitle = element(by.css('#recommendedCareersFull .fullHeight .jrnys_lead-body-copy'));
var CarrouselRightScroll = element(by.xpath('//div[3]/table/tbody/tr/td/div/div/a[2]/span'));
var ViewMoreLink = element(by.linkText('View More'));
var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1'));
var InfoIcon = element(by.css('.ng-scope:nth-child(1) > .col-md-3 > .panel > div:nth-child(1) .fa'));
var DegreeRequiredHeader = element(by.css('.ng-scope:nth-child(1) > .col-md-3 .detail-row:nth-child(2) > td:nth-child(2)'));
var AverageSalaryHeader = element(by.css('.ng-scope:nth-child(1) > .col-md-3 .detail-row:nth-child(3) > td:nth-child(2)'));
var CurrentlyEmployedHeader = element(by.css('.ng-scope:nth-child(1) > .col-md-3 .detail-row:nth-child(4) > td:nth-child(2)'));
var ProjectedGrowthHeader = element(by.css('.ng-scope:nth-child(1) > .col-md-3 .detail-row:nth-child(5) > td:nth-child(2)'));
var BackOfCardInfoIcon = element(by.css('.ng-scope:nth-child(1) > .col-md-3 .card-detail tr:nth-child(1) .fa'));
var FilterIcon = element(by.css('.widgetControlContainer'));
var FilterTitle = element(by.css('tr:nth-child(1) > .ng-binding'));
var RequiredJobPrepHeader = element(by.css('tbody:nth-child(1) > tr:nth-child(2) > td'));
var MayRequireHighSchoolDiplomaOrGED = element(by.css('tr:nth-child(3) .ng-pristine'));
var FitHeader = element(by.css('tr:nth-child(9) > td'));
var Best = element(by.css('.ng-scope:nth-child(10) > td > input'));
var Good = element(by.css('.ng-scope:nth-child(12) > td > input'));
var ShowResultsByHeader = element(by.css('tr:nth-child(13) > td'));
var BrightOutlook = element(by.css('tr:nth-child(14) .ng-pristine'));
var Following = element(by.css('tr:nth-child(17) .ng-pristine'));
var MyFavorites = element(by.css('tr:nth-child(18) .ng-pristine'));
var SortHeader = element(by.css('tr:nth-child(20) > td'));
var ZtoA = element(by.css('tr:nth-child(22) .ng-pristine'));
var FilterButton = element(by.css('td > .btn-info'));
var NoResultsFoundAppliedFilters = element(by.css('.col-md-10'));
var BackLink = element(by.css('.btn-primary-back-mod'));
var NoResultsFound = element(by.css('.table-height:nth-child(1) td'));
var ZtoAFilterButton = element(by.css('.statusBtn:nth-child(4) > .xIcon'));
var ShowResultsByFilterButton = element(by.css('.statusBtn:nth-child(3) > .xIcon'));
var FitFilterButton = element(by.css('.statusBtn:nth-child(2) > .xIcon'));
var RequiredJobPrepFilterButton = element(by.css('.xIcon'));
expect(await WidgetTitle.getText()).toEqual('My Recommended Careers View All');
browser.actions().mouseMove(element(by.linkText('View Results'))).perform().then(function() {
browser.sleep(1000);
});
await CarrouselRightScroll.click();
browser.sleep(1000);
await CarrouselRightScroll.click();
browser.sleep(1000);
await CarrouselRightScroll.click();
browser.sleep(1000);
await CarrouselRightScroll.click();
browser.sleep(1000);
await ViewMoreLink.click();
browser.sleep(2500);
expect(await PageTitle.getText()).toEqual('My Recommended Careers');
await InfoIcon.click();
browser.sleep(1000);
expect(await DegreeRequiredHeader.getText()).toContain('Degree Required');
expect(await AverageSalaryHeader.getText()).toContain('Average Salary');
expect(await CurrentlyEmployedHeader.getText()).toContain('Currently Employed');
expect(await ProjectedGrowthHeader.getText()).toContain('Projected Growth');
await BackOfCardInfoIcon.click();
browser.sleep(1000);
await FilterIcon.click();
browser.sleep(1000);
expect(await FilterTitle.getText()).toEqual('Filter');
expect(await RequiredJobPrepHeader.getText()).toEqual('Required Job Prep');
await MayRequireHighSchoolDiplomaOrGED.click();
browser.sleep(1000);
expect(await FitHeader.getText()).toEqual('Fit');
await Best.click();
browser.sleep(1000);
await Good.click();
browser.sleep(1000);
expect(await ShowResultsByHeader.getText()).toEqual('Show Results By');
await Following.click();
browser.sleep(1000);
expect(await SortHeader.getText()).toEqual('Sort');
await ZtoA.click();
browser.sleep(1000);
await FilterButton.click();
browser.sleep(2500);
expect(await NoResultsFoundAppliedFilters.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.');
await BackLink.click();
browser.sleep(2500);
browser.actions().mouseMove(element(by.linkText('View Results'))).perform().then(function() {
browser.sleep(2500);
});
expect(await NoResultsFound.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.');
await ZtoAFilterButton.click();
browser.sleep(2500);
await ShowResultsByFilterButton.click();
browser.sleep(2500);
await FitFilterButton.click();
browser.sleep(2500);
await RequiredJobPrepFilterButton.click();
browser.sleep(2500);
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function MyJourneys() {
it('should jump to latest created journey learn more page', async function () {
var WidgetTitle = element(by.css('#myjourneys > .jrnys_lead-body-copy > span:nth-child(1)'));
var JourneySteps = element(by.css('.journeyListWidgetJourneyContainer:nth-child(4) > div'));
var LearnMoreLink = element(by.css('.journeyListWidgetJourneyContainer:nth-child(4) #appendHere > .jrnys_support-text'));
var JourneyLearnMoreTitle = element(by.css('.col-md-12 > .ng-binding'));
var JourneyWayPoint = element(by.css('.select-waypointTitle'));
var JourneyResource = element(by.css('.relatedResourceTitleRow'));
var JourneyNoResource = element(by.css('.col-md-12 > .col-md-12'));
var RightScroll = element(by.css('.glyphicon-menu-right'));
var BackLink = element(by.css('.btn-primary-back-mod'));
browser.actions().mouseMove(element(by.id('journeyListWidget'))).perform();
browser.sleep(2500);
expect(await WidgetTitle.getText()).toEqual('My Journeys');
expect(await JourneySteps.getText()).toContain('10 to First-Line Supervisors of Aquacultural Workers through Sustainable Food Systems Graduate Certificate');
expect(await JourneySteps.getText()).toContain('Learn More');
expect(await JourneySteps.getText()).toContain('5 steps (0 Complete)');
await LearnMoreLink.click();
browser.sleep(2500);
expect(await JourneyLearnMoreTitle.getText()).toEqual('10 to First-Line Supervisors of Aquacultural Workers through Sustainable Food Systems Graduate Certificate');
expect(await JourneyWayPoint.getText()).toEqual('10');
expect(await JourneyResource.getText()).toEqual('cnn');
await RightScroll.click();
browser.sleep(2500);
expect(await JourneyWayPoint.getText()).toEqual('11');
expect(await JourneyResource.getText()).toEqual('This is CNN');
await RightScroll.click();
browser.sleep(2500);
expect(await JourneyWayPoint.getText()).toEqual('12');
expect(await JourneyResource.getText()).toEqual('cnn');
await RightScroll.click();
browser.sleep(2500);
expect(await JourneyWayPoint.getText()).toEqual('Sustainable Food Systems Graduate Certificate');
expect(await JourneyNoResource.getText()).toEqual('Sorry, no related resources!');
await RightScroll.click();
browser.sleep(2500);
expect(await JourneyWayPoint.getText()).toEqual('First-Line Supervisors of Aquacultural Workers');
expect(await JourneyResource.getText()).toEqual('First-Line Supervisors of Aquacultural Workers (Agriculture, Food and Natural Resources)');
await BackLink.click();
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function InterestSurvey() {
it('should navigate to Interest Survey, toggle language to Spanish then back to English and take survey', async function () {
var WidgetTitle = element(by.css('#interests .jrnys_lead-body-copy'));
var RealisticTitle = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .jrnys_support-tex > .ng-binding'));
var RealisticDescription = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .color3a-color'));
var InvestigativeTitle = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .jrnys_support-tex > .ng-binding'));
var InvestigativeDescription = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .color3a-color'));
var ArtisticTitle = element(by.css('.ng-scope:nth-child(3) > .row-padding-mobile .jrnys_support-tex > .ng-binding'));
var ArtisticDescription = element(by.css('.ng-scope:nth-child(3) > .row-padding-mobile .color3a-color'));
var SocialTitle = element(by.css('.ng-scope:nth-child(4) .jrnys_support-tex > .ng-binding'));
var SocialDescription = element(by.css('.ng-scope:nth-child(4) > .row-padding-mobile .color3a-color'));
var EnterprisingTitle = element(by.css('.ng-scope:nth-child(5) .jrnys_support-tex > .ng-binding'));
var EnterprisingDescription = element(by.css('.ng-scope:nth-child(5) > .row-padding-mobile .color3a-color'));
var ConventionalTitle = element(by.css('.ng-scope:nth-child(6) .jrnys_support-tex > .ng-binding'));
var ConventionalDescription = element(by.css('.ng-scope:nth-child(6) .color3a-color'));
var TakeTheSurveyButton = element(by.css('.btn-info:nth-child(2)'));
var InterestSurveyTitle = element(by.css('.jrnys_lead-body-copy'));
var TextOne = element(by.css('.col-md-4:nth-child(1) > .ng-binding:nth-child(1)'));
var TextTwo = element(by.css('.col-md-4:nth-child(2) > .ng-binding:nth-child(1)'));
var TextThree = element(by.css('.col-md-4:nth-child(3) > .ng-binding:nth-child(1)'));
var EspanolButton = element(by.linkText('Español'));
var EnglishButton = element(by.linkText('English'));
var LanguageAlertDiv = element(by.css('p:nth-child(7)'));
var LanguageAlterConfirmButton = element(by.css('.confirm'));
var DislikeEmoji = element(by.id('emoji_0_0'));
var MehEmoji = element(by.id('emoji_0_1'));
var UnsureEmoji = element(by.id('emoji_0_2'));
var LikeItEmoji = element(by.id('emoji_0_3'));
var LoveItEmoji = element(by.id('emoji_0_4'));
var PreviousQuestion = element(by.linkText('< Previous Question'));
var CancelSurveyButton = element(by.css('.btn-md'));
//dashboard - Interests
expect(await WidgetTitle.getText()).toEqual('Interests');
expect(await RealisticTitle.getText()).toEqual('Realistic');
expect(await RealisticDescription.getText()).toEqual('You see things as they are and rely most heavily on your sense of sight and touch.');
expect(await InvestigativeTitle.getText()).toEqual('Investigative');
expect(await InvestigativeDescription.getText()).toEqual('You’re a super sleuth who loves to solve math and science problems.');
expect(await ArtisticTitle.getText()).toEqual('Artistic');
expect(await ArtisticDescription.getText()).toEqual('Your electives are full of art, drama, creative writing, and music classes.');
expect(await SocialTitle.getText()).toEqual('Social');
expect(await SocialDescription.getText()).toEqual('You’re a friend to everyone. You like to help, interact and share information.');
expect(await EnterprisingTitle.getText()).toEqual('Enterprising');
expect(await EnterprisingDescription.getText()).toEqual('You’re persuasive and could sell just about anything to anyone.');
expect(await ConventionalTitle.getText()).toEqual('Conventional');
expect(await ConventionalDescription.getText()).toEqual('People might call you TYPE A, but they’re just jealous of your ability to get things done.');
await TakeTheSurveyButton.click();
browser.sleep(2500);
//Interest Survey page - validate English & Spanish text
expect(await InterestSurveyTitle.getText()).toEqual('Interest Survey');
expect(await TextOne.getText()).toEqual("In less than 10 minutes you'll be matched to some exciting careers!");
expect(await TextTwo.getText()).toEqual('For each option, select the emotion that matches how you feel about the activity.');
expect(await TextThree.getText()).toEqual('Say how you really feel, there are no wrong answers!');
await LikeItEmoji.click();
await PreviousQuestion.click();
await EspanolButton.click();
browser.sleep(2500);
expect(await LanguageAlertDiv.getText()).toEqual('Changing the language setting will result in starting the survey over again. Do you want to change languages and start at question 1?');
await LanguageAlterConfirmButton.click();
expect(await TextOne.getText()).toEqual('¡En menos de 10 minutos te conectamos con las mejores carreras para ti!');
expect(await TextTwo.getText()).toEqual('Por cada opción, selecciona la emocion que indica como te siendes sobre este tema.');
expect(await TextThree.getText()).toEqual('Indica cómo te sientes realmente, se sincero. ¡no hay respuesta incorrecta!');
await LikeItEmoji.click();
await LikeItEmoji.click();
await LikeItEmoji.click();
await CancelSurveyButton.click();
browser.waitForAngular();
//Take Interest Survey
await TakeTheSurveyButton.click();
browser.waitForAngular();
await EnglishButton.click();
browser.waitForAngular();
await DislikeEmoji.click();
await MehEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();//5
await LoveItEmoji.click();
await MehEmoji.click();
await UnsureEmoji.click();
await LoveItEmoji.click();
await DislikeEmoji.click();//10
await DislikeEmoji.click();
await LikeItEmoji.click();
await LikeItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();//15
await LoveItEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();
await DislikeEmoji.click();//20
await DislikeEmoji.click();
await LoveItEmoji.click();
await DislikeEmoji.click();
await LikeItEmoji.click();
await LikeItEmoji.click();//25
await LoveItEmoji.click();
await DislikeEmoji.click();
await LikeItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();//30
await DislikeEmoji.click();
await MehEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();//35
await LoveItEmoji.click();
await MehEmoji.click();
await LikeItEmoji.click();
await LoveItEmoji.click();
await DislikeEmoji.click();//40
await DislikeEmoji.click();
await LikeItEmoji.click();
await LikeItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();//45
await DislikeEmoji.click();
await LoveItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();
await DislikeEmoji.click();//50
await DislikeEmoji.click();
await MehEmoji.click();
await DislikeEmoji.click();
await LikeItEmoji.click();
await LikeItEmoji.click();//55
await LoveItEmoji.click();
await MehEmoji.click();
await LikeItEmoji.click();
await LoveItEmoji.click();
await MehEmoji.click();//60
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function InterestSurveyResults() {
it('should verify the Interest Survey Results and share results', async function () {
var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1'));
var TopThreeTraitsHeader = element(by.css('.fullHeight > .jrnys_lead-body-copy'));
var TopThreeTraitsOne = element(by.css('.col-md-4:nth-child(1) .jrnys_lead-body-copy'));
var TopThreeTraitsDescriptionOne = element(by.css('.col-md-4:nth-child(1) .ng-binding:nth-child(2)'));
var TopThreeTraitsTwo = element(by.css('.col-md-4:nth-child(2) .jrnys_lead-body-copy'));
var TopThreeTraitsDescriptionTwo = element(by.css('.col-md-4:nth-child(2) .ng-binding:nth-child(2)'));
var TopThreeTraitsThree = element(by.css('.col-md-4:nth-child(3) .jrnys_lead-body-copy'));
var TopThreeTraitsDescriptionThree = element(by.css('.col-md-4:nth-child(3) .ng-binding:nth-child(2)'));
var ViewAllLink = element(by.linkText('View All'));
var TopTraitsOne = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy'));
var TopTraitsOneDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)'));
var TopTraitsTwo = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy'));
var TopTraitsTwoDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)'));
var TopTraitsThree = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy'));
var TopTraitsThreeDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)'));
var TopTraitsFour = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy'));
var TopTraitsFourDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)'));
var TopTraitsFive = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy'));
var TopTraitsFiveDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)'));
var TopTraitsSix = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy'));
var TopTraitsSixDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)'));
var XCloseLink = element(by.css('.close'));
var ShareResultsIcon = element(by.css('.fa-share-alt'));
var ShareResultsDivTitle = element(by.css('#interestSurveyShareResult > .jrnys_lead-body-copy'));
var ToTextBox = element(by.css('tr:nth-child(2) .form-control'));
var FromTextBox = element(by.css('tr:nth-child(1) .form-control'));
var CancelButton = element(by.css('.btn-alt-info'));
var SendButton = element(by.css('tr:nth-child(7) .btn-info'));
var DivAlertTitle = element(by.css('h2'));
var DivAlertMessage = element(by.css('p:nth-child(7)'));
var DivOKButton = element(by.css('.confirm'));
expect(await PageTitle.getText()).toEqual('Interest Survey Result');
expect(await TopThreeTraitsHeader.getText()).toContain('Your top 3 traits View All');
await ViewAllLink.click();
browser.sleep(1000);
await XCloseLink.click().then(function() {
browser.sleep(1000);
});
browser.waitForAngular();
await ShareResultsIcon.click();
expect(await ShareResultsDivTitle.getText()).toEqual('Email Your Results');
await SendButton.click();
browser.sleep(1000);
expect(await DivAlertTitle.getText()).toEqual('No Email');
expect(await DivAlertMessage.getText()).toEqual('Please provide at least one email address to send.');
await DivOKButton.click();
browser.waitForAngular();
await ToTextBox.sendKeys('jhuerta@edmin');
await SendButton.click();
browser.sleep(1000);
expect(await DivAlertTitle.getText()).toEqual('Invalid Email');
expect(await DivAlertMessage.getText()).toEqual('jhuerta@edmin is not a valid email address.');
await DivOKButton.click();
browser.sleep(1000);
await CancelButton.click();
browser.waitForAngular();
await ShareResultsIcon.click();
await FromTextBox.clear();
await FromTextBox.sendKeys('Automated Regression');
await ToTextBox.sendKeys('jhuerta@edmin.com');
browser.sleep(1000);
await SendButton.click();
browser.sleep(2500);
await expect(DivAlertTitle.getText()).toEqual('Your interest survey results are in flight!');
await expect(DivAlertMessage.getText()).toEqual('Trouble receiving the email? Have your recipient check their spam folder for an email from hi@journeysmap.com');
await DivOKButton.click().then(function(EC) {
var EC = protractor.ExpectedConditions;
browser.waitForAngular();
browser.sleep(5000);
browser.wait(EC.elementToBeClickable(by.css('.fa-share-alt')), 5000);
});
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function InterestSurveyResultsClusters() {
it('should verify the Interest Survey Clusters widget and jump to learn more page', async function () {
var WidgetTitle = element(by.css('.row > .jrnys_lead-body-copy'));
var WidgetDescription = element(by.css('.row > span:nth-child(2)'));
var SelectedButton = element(by.css('.row:nth-child(1) > .col-md-4:nth-child(1) .btn:nth-child(1)'));
var PathwaysLink = element(by.linkText('Pathways'));
var ClustersLink = element(by.linkText('Clusters'));
var BestMatch = element(by.css('tr:nth-child(4) > td'));
var InfoIcon = element(by.css('tr:nth-child(1) > td > i'));
var DegreeRequiredHeader = element(by.css('tr:nth-child(2) > td.ng-binding'));
var AverageSalaryHeader = element(by.css('tr:nth-child(3) > td.ng-binding'));
var CurrentlyEmployedHeader = element(by.css('tr:nth-child(4) > td.ng-binding'));
var ProjectedGrowthHeader = element(by.css('tr:nth-child(5) > td.ng-binding'));
var LearnMoreButton = element(by.css('tr:nth-child(3) > td > div:nth-child(2) > div > button'));
var EC = protractor.ExpectedConditions;
var JourneymanIcon = element(by.css('.text-right .socialImgIcon .socialImgIconJourneyableSvg'));
expect(await WidgetTitle.getText()).toEqual('Clusters');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.');
await SelectedButton.click();
browser.sleep(2500);
expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.');
await SelectedButton.click();
browser.sleep(2500);
expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways > Occupations');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select an occupation below.');
await PathwaysLink.click();
browser.sleep(2500);
expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.');
await ClustersLink.click();
browser.sleep(2500);
expect(await WidgetTitle.getText()).toEqual('Clusters');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.');
await SelectedButton.click();
browser.sleep(2500);
await SelectedButton.click();
browser.sleep(2500);
expect(await BestMatch.getText()).toEqual('Best Match');
await InfoIcon.click();
browser.sleep(2500);
expect(DegreeRequiredHeader.getText()).toContain('Degree Required');
expect(AverageSalaryHeader.getText()).toContain('Average Annual Salary');
expect(CurrentlyEmployedHeader.getText()).toContain('Currently Employed');
expect(ProjectedGrowthHeader.getText()).toContain('Projected Growth');
await InfoIcon.click();
browser.sleep(2500);
await LearnMoreButton.click();
browser.waitForAngular();
browser.wait(EC.elementToBeClickable(JourneymanIcon));
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function InterestSurveyResultsCreateJourney() {
it('should create a Journey to Top Interest Survey Result', async function () {
var JourneymanIcon = element(by.css('.text-right .socialImgIcon .socialImgIconJourneyableSvg'));
var JourneySideBarHeader = element(by.css('.side-bar-child-text > span'));
var JourneyIIcon = element(by.css('.journey-info-circle'));
var JourneyInfoDivTitle = element(by.css('.col-lg-12 > .ng-binding'));
var JourneyInfoDivSubText = element(by.css('.col-lg-12:nth-child(3)'));
var JourneyInfoDivXCloseLink = element(by.css('.fa-times'));
var JourneyEntryPoint = element(by.css('.journeyInput'));
var SelectEntryPointDropDown = element(by.css('.ng-scope:nth-child(1) > .sidebarScrollListTxt > .ng-binding'));
var StartYourJourneyButton = element(by.css('.journeyStartBtnEnable'));
var JourneyDetailsIcon = element(by.css('#journeyitem0 .journey-info-circle'));
var ExpandGradeSubJourney = element(by.css('.ng-scope:nth-child(4) .side-bar-journey-detail-child-txt'));
var ExpandSubjectSubJourney = element(by.css('.ng-scope:nth-child(11) .side-bar-journey-detail-child-txt'));
var ExpandStrandSubJourney = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) .side-bar-journey-detail-child-txt'));
var ExpandStandardSubJourney = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) .side-bar-journey-detail-child-txt'));
var ExpandBenchmarkSubJourney = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) .side-bar-journey-detail-child-txt'));
var UpOneLevelLink = element(by.css('div:nth-child(1) > .sidebarBackTxt'));
var JourneySaveIcon = element(by.css('#journeyCardIdx0 > .fas'));
var JourneySaveDivTitle = element(by.css('h2'));
var JourneySaveDivDescription = element(by.css('p:nth-child(7)'));
var JourneyPersistButton = element(by.css('.confirm'));
await JourneymanIcon.click().then(function() {
browser.sleep(1000);
});
expect(await JourneySideBarHeader.getText()).toEqual('Create Your Journey');
await JourneyIIcon.click();
browser.sleep(1000);
expect(await JourneyInfoDivTitle.getText()).toEqual('Create Your Journey');
expect(await JourneyInfoDivSubText.getText()).toEqual('A Journey is your driving direction. Enter a starting location, such as your current grade, as well as the destination you are trying to reach, like an occupation. From there we will provide you with possible pathways to reach your goal.');
await JourneyInfoDivXCloseLink.click().then(function() {
browser.sleep(1000);
});
await JourneyEntryPoint.click();
browser.waitForAngular();
await JourneyEntryPoint.sendKeys('6');
await SelectEntryPointDropDown.click();
browser.waitForAngular();
await StartYourJourneyButton.click();
browser.waitForAngular();
await JourneyDetailsIcon.click();
browser.sleep(5000);
await ExpandGradeSubJourney.click();
browser.sleep(5000);
await ExpandSubjectSubJourney.click();
browser.sleep(5000);
await ExpandStrandSubJourney.click();
browser.sleep(5000);
await ExpandStandardSubJourney.click();
browser.sleep(5000);
await ExpandBenchmarkSubJourney.click();
browser.sleep(5000);
await UpOneLevelLink.click();
browser.sleep(5000);
await UpOneLevelLink.click();
browser.sleep(5000);
await JourneySaveIcon.click();
browser.sleep(5000);
expect(await JourneySaveDivTitle.getText()).toEqual('Journey saved!');
expect(await JourneySaveDivDescription.getText()).toEqual('Would you like this journey to persist on the map?');
await JourneyPersistButton.click();
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function MyJourneysPage() {
it('should navigate to My Journeys and delete 3rd journey', async function () {
var MyJourneysHeaderLink = element(by.css('#nbMyJourneys .span-navbar-hover'));
var PageTitle = element(by.css('.jrnys_lead-body-copy'));
var PageSubTitle = element(by.css('.col-md-10 .ng-scope:nth-child(1)'));
var Select3rdJourney = element(by.xpath('//div[3]/div[4]/div/div/span'));
var JourneyLearnMoreSubTitle = element(by.css('.details-resourceRowTitle'));
var ViewOnMapButton = element(by.css('.col-md-4 > .btn-info'));
var RemoveJourneyButton = element(by.css('#saveJourneyButton'));
var RemoveDivTitle = element(by.css('h2'));
var RemoveDivSubTitle = element(by.css('p:nth-child(7)'));
var RemoveDivDeleteButton = element(by.css('.confirm'));
var EC = protractor.ExpectedConditions;
await MyJourneysHeaderLink.click().then(function() {
browser.sleep(1000);
});
await expect(PageTitle.getText()).toEqual('My Saved Journeys');
expect(await PageSubTitle.getText()).toEqual('Select a Journey to show it on the map');
await Select3rdJourney.click();
expect(await JourneyLearnMoreSubTitle.getText()).toEqual('Try these resources');
await ViewOnMapButton.click();
browser.sleep(20000);
await MyJourneysHeaderLink.click();
await Select3rdJourney.click();
browser.sleep(1000);
await RemoveJourneyButton.click();
browser.sleep(1000);
expect(await RemoveDivTitle.getText()).toEqual('Are you sure?');
expect(await RemoveDivSubTitle.getText()).toEqual('You will not be able to recover this journey!');
await RemoveDivDeleteButton.click();
browser.sleep(1000);
expect(await RemoveDivTitle.getText()).toEqual('Deleted!');
expect(await RemoveDivSubTitle.getText()).toEqual('Your journey has been deleted.');
await RemoveDivDeleteButton.click();
browser.wait(EC.invisibilityOf(ViewOnMapButton));
browser.waitForAngular();
await MyJourneysHeaderLink.click();
browser.waitForAngular();
browser.wait(EC.visibilityOf(Select3rdJourney));
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function MapInteraction() {
it('should navigate to map and iteract with it', async function () {
var MapHeaderLink = element(by.css('.ng-scope:nth-child(2) .span-navbar-hover'));
var HideJourneyButton = element(by.css('#persistJourneyButton > .ng-binding'));
var CollapseIcon = element(by.css('div > .fa-angle-left'));
var ExpandIcon = element(by.css('div:nth-child(2) > .back-btn-mod'));
var CollegeTabLink = element(by.xpath('//md-tab-item[2]/span'));
var CertificationTabLink = element(by.xpath('//md-tab-item[3]/span'));
var K12TabLink = element(by.xpath('//md-tab-item[4]/span'));
var MilitaryTabLink = element(by.xpath('//md-tab-item[5]/span'));
var CTETabLlink = element(by.xpath('//md-tab-item[6]/span'));
var ArrowTabLink = element(by.css('.ng-scope:nth-child(2) > md-icon'));
var CareerTabLink = element(by.xpath('//md-tab-item[1]/span'));
var MapSearchTextBox = element(by.css('#searchBox'));
var MapSearchIcon = element(by.css('.glyphicon-search'));
var SearchCareerFour = element(by.css('#searchitem3 .side-bar-child-text'));
var ObjectPath = element(by.css('.sidebarDescriptionAncestorTxt:nth-child(1)'));
var ObjectTitle = element(by.css('.side-bar-child-text:nth-child(2)'));
var ItemDescription = element(by.css('.sidebarDescription'));
var ItemReadMoreLink = element(by.css('.sidebarLinkTxt'));
var ItemTitle = element(by.css('.col-lg-12 > .ng-binding'));
var ItemDescriptionReadMore = element(by.css('.col-lg-12:nth-child(3)'));
var ItemDetailCloseLink = element(by.css('.fa-times'));
var ItemDegreeHeader = element(by.css('.ng-scope > .panel-heading'));
var ItemDegree = element(by.css('.panel-body > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)'));
var ItemDegreeOneStat = element(by.css('.ng-scope > .panel-body > .ng-scope:nth-child(1) > .ng-binding:nth-child(2)'));
var ItemDegreeTwo = element(by.css('.panel-body > .ng-scope:nth-child(2) > .ng-binding:nth-child(1)'));
var ItemDegreeTwoStat = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(2)'));
var ItemDegreeThree = element(by.css('.panel-body > .ng-scope:nth-child(3) > .ng-binding:nth-child(1)'));
var ItemDegreeThreeStat = element(by.css('.ng-scope:nth-child(3) > .ng-binding:nth-child(2)'));
var ItemSalaryHeader = element(by.css('.ng-scope:nth-child(2) > .panel > .sidebarPanelHeading'));
var ItemSalaryStat = element(by.css('.ng-scope:nth-child(2) > .panel > .panel-body > .ng-binding'));
var ItemGrowthHeader = element(by.css('.ng-scope:nth-child(3) > .panel > .sidebarPanelHeading'));
var ItemGrowthStat = element(by.css('.sidebarPanelBody > .ng-scope > .ng-scope'));
var ItemGrowthStatTwo = element(by.css('.panel-body > .ng-binding:nth-child(2)'));
var ItemGrowthStatThree = element(by.css('.ng-scope > .panel > .panel-body > .ng-scope:nth-child(3)'));
var ItemJobOpeningsHeader = element(by.css('.ng-scope:nth-child(4) > .panel > .sidebarPanelHeading'));
var ItemJobOpeningsStat = element(by.css('.ng-scope:nth-child(4) > .panel > .panel-body > .ng-binding'));
var ItemEmployedHeader = element(by.css('.ng-scope:nth-child(5) .sidebarPanelHeading'));
var ItemEmployedStat = element(by.css('.ng-scope:nth-child(5) .panel-body > .ng-binding'));
var ItemViewOnMapIcon = element(by.css('#searchitem3 .fas'));
var BackToResultsLink = element(by.css('div:nth-child(2) > .sidebarBackTxt'));
var SearchCareerOne = element(by.css('#searchitem0 .side-bar-child-text'));
var ItemViewOnMapIconTwo = element(by.css('#searchitem0 .fas'));
var MapSearchClearIcon = element(by.css('.glyphicon-remove'));
var MapZoomOutIcon = element(by.css('.glyphicon-minus'));
var MapZoomInIcon = element(by.css('.glyphicon-plus'));
var CollegeObjectTitle = element(by.css('#journeyitem0 .side-bar-child-text'));
MapHeaderLink.click().then(function() {
browser.sleep(5000);
});
await MapSearchTextBox.sendKeys('Software Quality Assurance Analyst');
await MapSearchIcon.click();
browser.sleep(20000);
await SearchCareerFour.click();
browser.sleep(2500);
expect(await ItemDescription.getText()).toEqual('Analyze science, engineering, business, and other data processing problems to implement and improve computer systems. Analyze user requirements, procedures, and problems to automate or improve existing systems and review computer system cap...');
await ItemReadMoreLink.click();
browser.sleep(2500);
expect(await ItemTitle.getText()).toEqual('Computer Systems Analysts');
expect(await ItemDescriptionReadMore.getText()).toEqual('Analyze science, engineering, business, and other data processing problems to implement and improve computer systems. Analyze user requirements, procedures, and problems to automate or improve existing systems and review computer system capabilities, workflow, and scheduling limitations. May analyze or recommend commercially available software.');
await ItemDetailCloseLink.click().then(function() {
browser.sleep(1000);
});
expect(await ItemDegreeHeader.getText()).toEqual('TYPICAL DEGREE');
expect(await ItemDegree.getText()).toEqual('College (4 Year)');
expect(await ItemDegreeOneStat.getText()).toEqual('33%');
expect(await ItemDegreeTwo.getText()).toEqual("Associate's degree");
expect(await ItemDegreeTwoStat.getText()).toEqual('29%');
expect(await ItemDegreeThree.getText()).toEqual("Master's degree");
expect(await ItemDegreeThreeStat.getText()).toEqual('14%');
expect(await ItemSalaryHeader.getText()).toEqual('AVERAGE ANNUAL SALARY');
expect(await ItemSalaryStat.getText()).toEqual('$88,270');
expect(await ItemGrowthHeader.getText()).toEqual('PROJECTED GROWTH');
expect(await ItemGrowthStat.getText()).toEqual('ABOUT AVERAGE');
expect(await ItemGrowthStatTwo.getText()).toEqual('9.1');
expect(await ItemGrowthStatThree.getText()).toEqual('%');
expect(await ItemJobOpeningsHeader.getText()).toEqual('PROJECTED JOB OPENINGS');
expect(await ItemJobOpeningsStat.getText()).toEqual('44,900');
expect(await ItemEmployedHeader.getText()).toEqual('CURRENTLY EMPLOYED');
expect(await ItemEmployedStat.getText()).toEqual('600,500');
await ItemViewOnMapIcon.click();
browser.sleep(5000);
expect(await ObjectPath.getText()).toEqual('IT > Interactive Media >');
expect(await ObjectTitle.getText()).toEqual('Computer Systems Analysts');
expect(await ItemDescription.getText()).toEqual('Analyze science, engineering, business, and other data processing problems to implement and improve computer systems. Analyze user requirements, procedures, and problems to automate or improve existing systems and review computer system cap...');
await CollapseIcon.click();
browser.sleep(2500);
await MapZoomOutIcon.click();
browser.sleep(1000);
await MapZoomOutIcon.click();
browser.sleep(1000);
await MapZoomOutIcon.click();
browser.sleep(1000);
await MapZoomOutIcon.click();
browser.sleep(1000);
await MapZoomOutIcon.click();
browser.sleep(1000);
await MapZoomOutIcon.click();
browser.sleep(1000);
await HideJourneyButton.click();
browser.sleep(2500);
await MapZoomInIcon.click();
browser.sleep(1000);
await ExpandIcon.click();
browser.sleep(2500);
await BackToResultsLink.click();
browser.sleep(20000);
await CollegeTabLink.click();
browser.sleep(30000);
/*await SearchCareerOne.click();
browser.sleep(2500);
expect(await SearchCareerOne.getText()).toEqual('College path');
expect(await CollegeObjectTitle.getText()).toEqual('College desc');*/
await CertificationTabLink.click();
browser.sleep(30000);
/*await SearchCareerOne.click();
browser.sleep(2500);
expect(await CollegeObjectTitle.getText()).toEqual('College3');
expect(await ObjectPath.getText()).toEqual('Certification1');
expect(await ObjectTitle.getText()).toEqual('Certification2');
expect(await ItemDescription.getText()).toEqual('Certification3');*/
await K12TabLink.click();
browser.sleep(30000);
/*can't find correct path -await SearchCareerOne.click();
browser.sleep(2500);
expect(await ObjectPath.getText()).toEqual('K121');
expect(await ObjectTitle.getText()).toEqual('K122');
expect(await ItemDescription.getText()).toEqual('K123');*/
await MilitaryTabLink.click();
browser.sleep(30000);
/*can't find correct path -await SearchCareerOne.click();
browser.sleep(2500);
expect(await ObjectPath.getText()).toEqual('Military1');
expect(await ObjectTitle.getText()).toEqual('Military2');
expect(await ItemDescription.getText()).toEqual('Military3');*/
await CTETabLlink.click();
browser.sleep(30000);
/*can't find correct path -await SearchCareerOne.click();
browser.sleep(2500);
expect(await ObjectPath.getText()).toEqual('CTE1');
expect(await ObjectTitle.getText()).toEqual('CTE2');
expect(await ItemDescription.getText()).toEqual('CTE3');*/
await ArrowTabLink.click();
browser.sleep(2500);
await CareerTabLink.click();
browser.sleep(30000);
await SearchCareerOne.click();
browser.sleep(2500);
expect(await ItemDescription.getText()).toEqual('Develop and execute software test plans in order to identify software problems and their causes.');
expect(await ItemDegreeHeader.getText()).toEqual('TYPICAL DEGREE');
expect(await ItemDegree.getText()).toEqual('College (4 Year)');
expect(await ItemDegreeOneStat.getText()).toEqual('70%');
expect(await ItemDegreeTwo.getText()).toEqual("Associate's degree");
expect(await ItemDegreeTwoStat.getText()).toEqual('15%');
expect(await ItemDegreeThree.getText()).toEqual('Professional degree certificate');
expect(await ItemDegreeThreeStat.getText()).toEqual('7%');
expect(await ItemSalaryHeader.getText()).toEqual('AVERAGE ANNUAL SALARY');
expect(await ItemSalaryStat.getText()).toEqual('$88,510');
expect(await ItemGrowthHeader.getText()).toEqual('PROJECTED GROWTH');
expect(await ItemGrowthStatTwo.getText()).toEqual('9.3');
expect(await ItemGrowthStatThree.getText()).toEqual('%');
expect(await ItemJobOpeningsHeader.getText()).toEqual('PROJECTED JOB OPENINGS');
expect(await ItemJobOpeningsStat.getText()).toEqual('22,400');
expect(await ItemEmployedHeader.getText()).toEqual('CURRENTLY EMPLOYED');
expect(await ItemEmployedStat.getText()).toEqual('287,200');
await ItemViewOnMapIconTwo.click();
browser.sleep(5000);
expect(await ObjectPath.getText()).toEqual('IT > Programming & Software Development >');
expect(await ObjectTitle.getText()).toEqual('Software Quality Assurance Engineers and Testers');
expect(await ItemDescription.getText()).toEqual('Develop and execute software test plans in order to identify software problems and their causes.');
await MapSearchClearIcon.click();
browser.sleep(2500);
await HideJourneyButton.click();
browser.sleep(2500);
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function AccountProfile() {
it('should navigate to Account Profile', async function () {
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
var ProfileLink = element(by.linkText('Profile'));
var PageTitle = element(by.css('.view-title'));
var UserName = element(by.css('.only-bottom-margin'));
var Email = element(by.css('.col-md-8'));
var Birthday = element(by.css('.col-md-8'));
var ActiveRole = element(by.css('.col-md-8'));
var ZipCode = element(by.css('.col-md-8'));
var EditAccount = element(by.css('.btn:nth-child(12)'));
var EditPageTitle = element(by.css('.view-title'));
var FirstNameTextBox = element(by.xpath('//input[@name="first"]'));
var LastNameTextBox = element(by.xpath('//input[@name="lastname"]'));
var EmailAddressTextBox = element(by.xpath('//input[@name="email"]'));
var ZipCodeTextBox = element(by.xpath('//input[@name="zip"]'));
var BirthdayTextBox = element(by.css('#datepicker'));
var ChangePasswordButton = element(by.css('.btn-lg:nth-child(1)'));
var ChangePageTitle = element(by.css('h3'));
var ChangePasswordValidation = element(by.css('.requiredMark'));
var OldPasswordTextBox = element(by.xpath('//input[@name="password"]'));
var NewPasswordTextBox = element(by.css('.form-control:nth-child(6)'));
var ConfirmPasswordTextBox = element(by.css('.form-control:nth-child(9)'));
var ChangePasswordSaveButton = element(by.css('.modal-footer > .btn'));
var SaveButton = element(by.name('submit'));
var ManageSecurityQuestions = element(by.css('.btn:nth-child(15)'));
var ManageSecurityTitle = element(by.css('.security-question-header'));
var ManageSecuritySubTitle = element(by.css('.col-md-9:nth-child(2)'));
var SecurityValidationOne = element(by.css('.ng-scope:nth-child(1) > .row:nth-child(2) > .col-md-12'));
var SecurityValidationTwo = element(by.css('.ng-scope:nth-child(1) > .row:nth-child(5) > .col-md-12'));
var SecurityQuestionOne = element(by.css('#secQuestion0'));
var SecuritySelectionOne = element(by.css('#secQuestion0 > option:nth-child(2)'));
var SecurityAnswerOne = element(by.css('.ng-scope:nth-child(1) > .row .ng-pristine'));
var SecurityQuestionTwo = element(by.css('#secQuestion1'));
var SecuritySelectionTwo = element(by.css('#secQuestion1 > option:nth-child(3)'));
var SecurityAnswerTwo = element(by.css('.ng-scope:nth-child(2) .ng-pristine'));
var SecurityQuestionThree = element(by.css('#secQuestion2'));
var SecuritySelectionThree = element(by.css('#secQuestion2 > option:nth-child(5)'));
var SecurityAnswerThree = element(by.css('.ng-pristine'));
var SecurityQuestionSave = element(by.css('.col-lg-4 > #photoBtn'));
var ManageSecurityValidation = element(by.css('.row:nth-child(11) > .col-lg-9'));
await ProfileImage.click().then(function() {
browser.sleep(1000);
});
await ProfileLink.click().then(function() {
browser.sleep(1000);
});
expect(await PageTitle.getText()).toEqual('Account Information');
expect(await UserName.getText()).toEqual('Automated Regression');
expect(await Email.getText()).toContain('Email: jhuerta@edmin.com');
expect(await Birthday.getText()).toContain('Birthday: 2000-02-15');
expect(await ActiveRole.getText()).toContain('Active Role: Student');
expect(await ZipCode.getText()).toContain('ZIP Code: 92123');
await EditAccount.click();
browser.sleep(1000);
expect(await EditPageTitle.getText()).toEqual('Edit Account Information');
/*expect(await FirstNameTextBox.getAttribute()).toEqual('1 Automated');
expect(await LastNameTextBox.getAttribute()).toEqual('2 Regression');
expect(await EmailAddressTextBox.getAttribute()).toEqual('3 jhuerta@edmin.com');
expect(await ZipCodeTextBox.getAttribute()).toEqual('4 92123');
expect(await BirthdayTextBox.getAttribute()).toEqual('5 2000-02-15');*/
await ChangePasswordButton.click();
browser.sleep(1000);
expect(await ChangePageTitle.getText()).toEqual('Change your password...');
await ChangePasswordSaveButton.click();
browser.sleep(1000);
expect(await ChangePasswordValidation.getText()).toEqual('Please provide Old Password and ensure two New Passwords are matched.');
await OldPasswordTextBox.sendKeys('123Auto123');
await NewPasswordTextBox.sendKeys('3Dm1nAuto');
await ConfirmPasswordTextBox.sendKeys('3Dm1nAuto');
await ChangePasswordSaveButton.click();
browser.sleep(1000);
expect(await ChangePasswordValidation.getText()).toEqual('Your old password was incorrect. Try again.');
await OldPasswordTextBox.sendKeys('3Dm1nAuto');
await NewPasswordTextBox.sendKeys('EDminAuto');
await ConfirmPasswordTextBox.sendKeys('3Dm1nAuto');
await ChangePasswordSaveButton.click();
browser.sleep(1000);
expect(await ChangePasswordValidation.getText()).toEqual('Please provide Old Password and ensure two New Passwords are matched.');
await NewPasswordTextBox.sendKeys('3Dm1nAuto');
await ConfirmPasswordTextBox.sendKeys('3Dm1nAuto');
await ChangePasswordSaveButton.click();
browser.sleep(1000);
await SaveButton.click();
browser.sleep(1000);
await ManageSecurityQuestions.click();
browser.sleep(1000);
expect(await ManageSecurityTitle.getText()).toEqual('We care about your security');
expect(await ManageSecuritySubTitle.getText()).toEqual('To help you recover your account in the future please provide additional recovery information.');
await SecurityQuestionSave.click();
browser.sleep(1000);
expect(await SecurityValidationOne.getText()).toEqual(' Please select security question');
await SecurityQuestionOne.click();
await SecuritySelectionOne.click();
await SecurityQuestionSave.click();
browser.sleep(1000);
expect(await SecurityValidationTwo.getText()).toEqual(' Missing security answer');
await SecurityAnswerOne.click();
await SecurityAnswerOne.sendKeys('6194222927');
await SecurityQuestionTwo.click();
await SecuritySelectionTwo.click();
await SecurityAnswerTwo.click();
await SecurityAnswerTwo.sendKeys('Rosario');
await SecurityQuestionThree.click();
await SecuritySelectionThree.click();
await SecurityAnswerThree.click();
await SecurityAnswerThree.sendKeys('Seamus');
await SecurityQuestionSave.click();
browser.sleep(1000);
expect(await ManageSecurityValidation.getText()).toEqual('Security questions are updated');
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function AccountPortfolio() {
it('should navigate to portfolio', async function () {
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
var PortfolioLink = element(by.linkText('Portfolio'));
var SubmittedResourcesTitle = element(by.css('.ng-scope > .jrnys_lead-body-copy'));
var GoogleDriveTitle = element(by.css('.default-color:nth-child(2)'));
var GoogleDriveSubTitle = element(by.css('.default-color:nth-child(3)'));
browser.waitForAngular();
browser.sleep(1000);
await ProfileImage.click();
browser.sleep(1000);
await PortfolioLink.click();
browser.sleep(5000);
expect(await SubmittedResourcesTitle.getText()).toEqual('My Submitted Resources View All');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await GoogleDriveTitle.getText()).toEqual('Google Drive');
expect(await GoogleDriveSubTitle.getText()).toContain('Sign in to your Google Drive account to access all your files!');
browser.waitForAngular();
browser.getCurrentUrl();
});
}
function SignOut() {
it('should log out', async function () {
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
browser.waitForAngular();
browser.sleep(1000);
await ProfileImage.click();
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
await SignOutButton.click();
});
}