diff --git a/app_journeysmap_spec.js b/app_journeysmap_spec.js index 57539b5..468bf05 100644 --- a/app_journeysmap_spec.js +++ b/app_journeysmap_spec.js @@ -183,8 +183,13 @@ function TopCareer() { 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 WagesInfoIcon = element(by.css('.jrnys_lead-body-copy > .journey-info-circle')); + var WagesSubTextOne = element(by.css('table:nth-child(2) > tbody > tr:nth-child(2) div:nth-child(1)')); + var WagesSubTextTwo = element(by.xpath('//occupation-wages/div/div[2]/table/tbody/tr[2]/td/div[2]')); + var WagesSubTextThree = element(by.linkText('https://beta.bls.gov/dataQuery/find?st=0&r=20&fq=cg:[Occupation]&more=0')); + var WagesCloseBackOfCardIcon = element(by.css('.fa-times-rectangle')); + var CurrentDataNational = element(by.css('g:nth-child(2) > g:nth-child(2) > text')); + var CurrentDataLocal = element(by.css('g:nth-child(3) > g > text')); 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')); @@ -287,9 +292,18 @@ function TopCareer() { expect(await WidgetBulletSix.getText()).toEqual('Dependability'); //Wages expect(await WagesHeader.getText()).toContain('Wages'); + await WagesInfoIcon.click().then(function() { + browser.sleep(1000); + }); + expect(await WagesSubTextOne.getText()).toContain('Data provided by the Bureau of Labor Statistics.'); + expect(await WagesSubTextTwo.getText()).toContain('For more information please visit'); + expect(await WagesSubTextThree.getText()).toContain('https://beta.bls.gov/dataQuery/find?st=0&r=20&fq=cg:[Occupation]&more=0'); + await WagesCloseBackOfCardIcon.click().then(function() { + browser.sleep(1000); + }); 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'); + expect(await CurrentDataNational.getText()).toEqual('National'); + expect(await CurrentDataLocal.getText()).toEqual('San Diego-Carlsbad, CA'); await ChangeLocationLinkText.click().then(function() { browser.sleep(1000); }); @@ -301,8 +315,8 @@ function TopCareer() { 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'); + expect(await CurrentDataNational.getText()).toEqual('National'); + expect(await CurrentDataLocal.getText()).toEqual('Phoenix-Mesa-Scottsdale, AZ'); browser.actions().mouseMove(CertificatesHeader).perform().then(function() { browser.sleep(1000); }); @@ -508,20 +522,19 @@ function Personality() { } function Wages() { - it('should click the Wages link and change zip code to 85013(AZ)', async function () { + it('should click the Wages link and change State drop down to Nevada', 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 CurrentDataNational = element(by.css('g:nth-child(2) > g:nth-child(2) > text')); + var CurrentDataLocal = element(by.css('g:nth-child(3) > g > text')); 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'); + expect(await CurrentDataNational.getText()).toEqual('National'); + expect(await CurrentDataLocal.getText()).toEqual('San Diego-Carlsbad, CA'); await ChangeLocationLink.click().then(function() { browser.sleep(1000); }); @@ -531,8 +544,8 @@ function Wages() { await ApplyButton.click().then(function() { browser.sleep(2500); }); - expect(await CurrentDataLocation.getText()).toEqual('Nevada'); - expect(await CurrentDataCountry.getText()).toEqual('United States'); + expect(await CurrentDataNational.getText()).toEqual('National'); + expect(await CurrentDataLocal.getText()).toEqual('Nevada'); await XCloseLink.click().then(function() { browser.sleep(1000); }); @@ -1836,7 +1849,7 @@ 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 JourneyInfoIcon = 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')); @@ -1859,7 +1872,7 @@ function InterestSurveyResultsCreateJourney() { browser.sleep(1000); }); expect(await JourneySideBarHeader.getText()).toEqual('Create Your Journey'); - await JourneyIIcon.click(); + await JourneyInfoIcon.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.');