diff --git a/createAccount_spec.js b/createAccount_spec.js index ecde20f..91417ff 100644 --- a/createAccount_spec.js +++ b/createAccount_spec.js @@ -6,7 +6,7 @@ describe('OnBoarding script', function () { browser.get('https://app-qa.journeysmap.com/Journey/index.html#/signup'); it('should have a title', async function () { - await expect(browser.getTitle()).toEqual('Journeys'); + await expect(browser.getTitle()).toEqual('Sign up'); }); var FirstNameTextBox = element(by.css('#txtFirstName')); @@ -20,18 +20,21 @@ describe('OnBoarding script', function () { function SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox) { it('OnBoarding; should complete the OnBoarding process and create a new account.', async function () { //Page 1 - First & Last Name - var PageOneGreetingText = element(by.css('tr:nth-child(2) > td > div > div:nth-child(1) > div:nth-child(1)')); - var PageOneValidationText = element(by.css('div:nth-child(1) > .ng-binding:nth-child(5)')); + var EC = protractor.ExpectedConditions; + var PageCloseXIcon = element(by.css('.fa-times-circle:nth-child(2)')); + var PageOneGreetingText = element(by.css('table:nth-child(3) .jmLoginBox > div:nth-child(1) > .jmLoginTitle')); var PageOneNextButton = element(by.css('tr:nth-child(2) > td > div > div:nth-child(1) > div > div:nth-child(1)')); + var PageOneValidationText = element(by.css('.jmLoginMsg:nth-child(6) > .ng-binding')); //Page 2 - Username var PageTwoGreetingText = element(by.css('td > div > div:nth-child(2) > div:nth-child(1)')); - var PageTwoSubText = element(by.css('div:nth-child(2) > div:nth-child(2) > div')); + var PageTwoSubText = element(by.css('div:nth-child(2) > .jmLoginInput:nth-child(3)')); var PageTwoNextButton = element(by.css('div:nth-child(2) > div > div > .btn')); - var PageTwoValidationText = element(by.css('div:nth-child(2) > .ng-scope:nth-child(4)')); + var PageTwoValidationText = element(by.css('div:nth-child(2) > .ng-scope > .ng-binding')); var UsernameLinkText = element(by.linkText('with a username')); var PageTwoAltGreetingText = element(by.css('td > div > div:nth-child(3) > div:nth-child(1)')); - var PageTwoAltNextButton = element(by.css('div:nth-child(3) > div:nth-child(3) .btn')); - var PageTwoAltValidationText = element(by.css('div:nth-child(3) > .ng-binding')); + var PageTwoAltSubText = element(by.css('div:nth-child(3) > .jmLoginInput:nth-child(3)')); + var PageTwoAltNextButton = element(by.css('div:nth-child(3) > .jmLoginAction .btn')); + var PageTwoAltValidationText = element(by.css('div:nth-child(3) > .jmLoginMsg > .ng-binding')); var EmailLinkText = element(by.linkText('with your email')); //Page 3 Password var PageThreeGreetingText = element(by.css('td > div > div:nth-child(4) > div:nth-child(1)')); @@ -39,7 +42,7 @@ describe('OnBoarding script', function () { var EyeIconOne = element(by.css('div:nth-child(2) > .fa-eye')); var PasswordTextBoxTwo = element(by.css('#txtPw2')); var PageThreeNextButton = element(by.css('#btnPwNext')); - var PageThreeValidationText = element(by.css('div:nth-child(4) > .ng-binding')); + var PageThreeValidationText = element(by.css('div:nth-child(4) > .jmLoginMsg > .ng-binding')); //Page 4 Birthday var PageFourGreetingText = element(by.css('td > div > div:nth-child(5) > div:nth-child(1)')); var DOBMonth = element(by.css('#txtDobMonth')); @@ -48,21 +51,18 @@ describe('OnBoarding script', function () { var today = new Date(); var yyyy = today.getFullYear()-5; //var Under13 = today.getFullYear()-5;delete - var PageFourValidationText = element(by.css('div:nth-child(5) > .ng-binding')); + var PageFourValidationText = element(by.css('div:nth-child(5) > .jmLoginMsg > .ng-binding')); var PermissionButton = element(by.css('div:nth-child(1) > div:nth-child(1) > .btn')); //Page 5 Connection Code var PageFiveGreetingText = element(by.css('div:nth-child(6) > div:nth-child(1) > div:nth-child(1)')); - var PageFiveSubText = element(by.css('.ng-binding:nth-child(3) > div')); + var PageFiveSubText = element(by.css('.jmLoginMsg:nth-child(3) > div:nth-child(1)')); var CodeButton = element(by.css('.btn:nth-child(2)')); var ConnectionGreetingText = element(by.css('div:nth-child(6) > div:nth-child(2) > div:nth-child(1)')); var ConnectionCodeTextBox = element(by.css('#txtConnection')); - var ConnectionCodeSubText = element(by.css('div:nth-child(2) > .ng-binding > div')); + var ConnectionCodeSubText = element(by.css('div:nth-child(2) > .jmLoginMsg > div:nth-child(1)')); var ConnectionCodeNextButton = element(by.css('div:nth-child(6) > div:nth-child(2) > div:nth-child(3)')); - var ConnectionCodeValidationText = element(by.css('div:nth-child(6) > div:nth-child(2) > .ng-binding')); - //Processing Page - var ProcessingPageText = element(by.css('.ng-binding:nth-child(2)')); + var ConnectionCodeValidationText = element(by.css('div:nth-child(2) > .jmLoginMsg:nth-child(4) > .ng-binding')); //What Do you want to explore? (page) - var EC = protractor.ExpectedConditions; var WhatDoYouWantToExplorePage = element(by.css('#divMyProgressBlocker > div:nth-child(3) > div:nth-child(1) > div')); var DiscoverMyInterestButton = element(by.css('.col-xs-10 > div > div:nth-child(1) > .btn')); var LearnMySkillsButton = element(by.css('div:nth-child(2) > .btn')); @@ -81,8 +81,8 @@ describe('OnBoarding script', function () { var SecurityQuestionSaveButton = element(by.css('.col-lg-4 > #photoBtn')); //Page 1 - First & Last Name + browser.wait(EC.elementToBeClickable(PageCloseXIcon)); expect(await PageOneGreetingText.getText()).toEqual("Let's start with the basics."); - expect(await PageOneValidationText.getText()).toEqual("Press enter when you're done."); await FirstNameTextBox.sendKeys('J').then(function() { browser.sleep(1000); }); @@ -125,6 +125,7 @@ describe('OnBoarding script', function () { await UsernameTextBox.sendKeys('JHZ').then(function() { browser.sleep(1000); }); + expect(await PageTwoAltSubText.getText()).toEqual('Create an account with your email instead.'); await PageTwoAltNextButton.click().then(function() { browser.sleep(2500); }); @@ -180,7 +181,7 @@ describe('OnBoarding script', function () { DOBYear.sendKeys(yyyy); browser.sleep(1000); }); - expect(await PageFourValidationText.getText()).toEqual("Looks like you're younger than 13. Get your gaurdian's permission before moving ahead!"); + expect(await PageFourValidationText.getText()).toEqual("Looks like you're younger than 13. Get your guardian's permission before moving ahead!"); await PermissionButton.click().then(function() { browser.sleep(2500); }); @@ -203,14 +204,12 @@ describe('OnBoarding script', function () { ConnectionCodeTextBox.sendKeys(browser.params.code); }); await ConnectionCodeNextButton.click().then(function() { - browser.sleep(5000); + browser.sleep(2500); }); - /*Processing Page - expect(await ProcessingPageText.getText()).toEqual('wtf').then(function() { - browser.sleep(20000); - });*/ //What do you want to explore? (page) - browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage)); + browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage)).then(function() { + browser.sleep(2500); + }); expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?'); expect(await DiscoverMyInterestButton.getText()).toEqual('Discover My Interests'); expect(await LearnMySkillsButton.getText()).toEqual('Learn My Skills'); @@ -268,22 +267,23 @@ function SignOut() { function Login() { it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () { - var LoginPageGreetingText = element(by.css('td > div > div:nth-child(1)')); - var UsernameTextBox = element(by.css('#txtUsername')); - var PasswordTextBox = element(by.css('#txtPassword')); - var LoginPageSubTextOne = element(by.css('div:nth-child(5) > div:nth-child(1)')); - var LoginPageSubTextTwo = element(by.css('div:nth-child(5) > div:nth-child(2)')); + var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope')); + var UsernameTextBoxOne = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); var NextButton = element(by.css('.btn')); - var ValidationText = element(by.css('.ng-scope:nth-child(5)')); + var ValidationText = element(by.css('.ng-binding:nth-child(1)')); var PasswordEyeIcon = element(by.css('.fa-eye')); - var ClickHereLinkText = element(by.css('div:nth-child(2) > a')); + var ClickHereLinkText = element(by.css('.ng-scope > a')); + var UsernameTextBoxTwo = element(by.css('#txtUsername')); //Account Recovery - var PageGreetingText = element(by.css('td .ng-scope > div:nth-child(1)')); - var PageOneValidationText = element(by.css('.ng-scope:nth-child(4)')); + var PageGreetingText = element(by.css('.jmLoginTitle')); + var PageOneValidationText = element(by.css('.jmLoginMsg')); //Select Recovery Option var PageTwoEmailButton = element(by.css('.btn:nth-child(2)')); var PageTwoSecurityQuestionButton = element(by.css('.btn:nth-child(1)')); - var SecurityQuestionText = element(by.css('.ng-binding')); + var SecurityQuestionText = element(by.css('.ng-binding:nth-child(2)')); var SecurityAnswerTextBox = element(by.css('#txtSecurityAnswer')); //Reset Password var NewPasswordTextBoxOne = element(by.css('#txtNewPassword')); @@ -303,7 +303,7 @@ function Login() { browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); browser.sleep(2500); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); - await UsernameTextBox.sendKeys('AutomatedTest332020913@edmin.com'); + await UsernameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com'); await PasswordTextBox.sendKeys('edmin123').then(function() { browser.sleep(1000); }); @@ -328,14 +328,14 @@ function Login() { }); //Account Recovery expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); - await UsernameTextBox.sendKeys('AutomatedTest332020913@edmin.com'); + await UsernameTextBoxTwo.sendKeys('AutomatedTest332020913@edmin.com'); await NextButton.click().then(function() { browser.sleep(2500); }); expect(await PageOneValidationText.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); - await UsernameTextBox.clear().then(function() { + await UsernameTextBoxTwo.clear().then(function() { browser.sleep(1000); - UsernameTextBox.sendKeys(browser.params.username); + UsernameTextBoxTwo.sendKeys(browser.params.username); }); await NextButton.click().then(function() { browser.sleep(2500); @@ -354,7 +354,7 @@ function Login() { browser.sleep(2500); }); expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); - await UsernameTextBox.sendKeys(browser.params.username); + await UsernameTextBoxTwo.sendKeys(browser.params.username); await NextButton.click().then(function() { browser.sleep(2500); }); @@ -368,7 +368,7 @@ function Login() { await NextButton.click().then(function() { browser.sleep(2500); }); - expect(await ValidationText.getText()).toEqual("Sorry! Your answers don't match what we have on file. Please contact help@journeysmap.com."); + expect(await PageOneValidationText.getText()).toEqual("Sorry! Your answers don't match what we have on file. Please contact help@journeysmap.com."); await SecurityAnswerTextBox.clear().then(function() { browser.sleep(1000); SecurityAnswerTextBox.sendKeys('War Games'); @@ -383,7 +383,7 @@ function Login() { await NextButton.click().then(function() { browser.sleep(2500); }); - expect(await ValidationText.getText()).toEqual('Oops. Looks like both passwords not match. Use 1 uppercase letter or 1 number. Please try again.'); + expect(await PageOneValidationText.getText()).toEqual('Oops. Looks like both passwords not match. Use 1 uppercase letter or 1 number. Please try again.'); await NewPasswordTextBoxOne.clear().then(function() { browser.sleep(1000); NewPasswordTextBoxOne.sendKeys(browser.params.password); @@ -400,6 +400,7 @@ function Login() { await ExploreCareersButton.click().then(function() { browser.sleep(2500); }); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); expect(await CareerExplorationPageTitle.getText()).toEqual('Career Exploration'); await ClusterCardThreeSelectButton.click().then(function() { browser.sleep(2500); @@ -410,20 +411,20 @@ function Login() { await OccupationCardOneLearnMoreIcon.click().then(function() { browser.sleep(5000); }); - expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA'); - //Dashboard - browser.waitForAngular(); - expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); + browser.executeScript('window.scrollTo(0, 395);').then(function() { + browser.sleep(5000); + }); + //expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA'); Hank reviewing bug - adding message }); } function LoginWithNewPassword() { - it(': Login; should log in with new password.', async function () { + it(': LoginWithNewPassword; should log in with new password.', async function () { var LoginPageGreetingText = element(by.css('td > div > div:nth-child(1)')); - var UsernameTextBox = element(by.css('#txtUsername')); - var PasswordTextBox = element(by.css('#txtPassword')); - var LoginPageSubTextOne = element(by.css('div:nth-child(5) > div:nth-child(1)')); - var LoginPageSubTextTwo = element(by.css('div:nth-child(5) > div:nth-child(2)')); + var UsernameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); var NextButton = element(by.css('.btn')); //EDM-1748 var EC = protractor.ExpectedConditions; diff --git a/config.js b/journeysmap_config.js similarity index 100% rename from config.js rename to journeysmap_config.js diff --git a/journeysmap_spec.js b/journeysmap_spec.js index cdf06b0..2f9acff 100644 --- a/journeysmap_spec.js +++ b/journeysmap_spec.js @@ -22,14 +22,14 @@ describe('Journeysmap script', function () { function SignIn(UserNameTextBox, PasswordTextBox) { it('should sign into journeysmap.com', async function () { - var PageGreetingText = element(by.css('.onboardingHeader')); - var PageSubText = element(by.css('div:nth-child(5)')); + var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); + var PageSubTextOne = element(by.css('div:nth-child(5) > div:nth-child(1)')); + var PageSubTextTwo = element(by.css('div:nth-child(5) > div:nth-child(2)')); var NextButton = element(by.css('.btn')); - var PageValidationText = element(by.css('div:nth-child(2) > div > .ng-scope')); var EC = protractor.ExpectedConditions; - var EyeIcon = element(by.css('div:nth-child(2) > div > div .fa-eye')); - var PasswordRecoveryLinkText = element(by.linkText('forget your password?')); - var CloseXIcon = element(by.css('.overrideButtonColor')); + var InvalidIcon = element(by.css('.far:nth-child(4)')); + var PageValidationText = element(by.css('.ng-scope:nth-child(5)')); + var EyeIcon = element(by.css('.fa-eye')); var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); @@ -40,10 +40,12 @@ describe('Journeysmap script', function () { await PasswordTextBox.sendKeys('edmin123').then(function() { browser.sleep(2500); }); - expect(await PageSubText.getText()).toEqual('Did you forget your password?'); + expect(await PageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await PageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); await NextButton.click().then(function() { browser.sleep(2500); }); + browser.wait(EC.visibilityOf(InvalidIcon)); expect(await PageValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); await PasswordTextBox.click().then(function() { browser.sleep(2500); @@ -53,43 +55,10 @@ describe('Journeysmap script', function () { browser.sleep(2500); }); await PasswordTextBox.clear().then(function() { - browser.sleep(2500); - PasswordTextBox.sendKeys('EDmin123'); browser.sleep(1000); - }); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - expect(await PageValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); - await PasswordRecoveryLinkText.click().then(function() { - browser.sleep(2500); - }); - browser.getAllWindowHandles().then(function (handles) { - browser.driver.switchTo().window(handles[1]).then(async function () { - browser.sleep(5000); - expect(await browser.driver.getCurrentUrl()).toEqual('https://qa.journeysmap.com/login_recovery#/findAccount'); - browser.driver.close(); - browser.sleep(2500); - browser.driver.switchTo().window(handles[0]); - expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - }); - }); - await CloseXIcon.click().then(function() { - browser.sleep(1000); - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); - browser.sleep(2500); - }); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { - browser.sleep(2500); - }); - await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { - browser.sleep(2500); - }); - /*await PasswordTextBox.clear().then(function() { - browser.sleep(2500); PasswordTextBox.sendKeys('3Dm!nAuto'); browser.sleep(1000); - });*/ + }); await NextButton.click().then(function() { browser.sleep(5000); browser.waitForAngular(); @@ -101,7 +70,7 @@ describe('Journeysmap script', function () { }); } - //<<<>>> + /*<<<>>> ProfileWidget(); MyProgressWidget(); @@ -117,9 +86,9 @@ describe('Journeysmap script', function () { MyCareersCarousel(); //Top Career Widget - EditTopCareer(); + EditTopCareer();*/ TopCareerWidget(); - NearbyPlacesOccupationCard(); + /*NearbyPlacesOccupationCard(); FollowingPage(); AtAGlance(); Personality(); @@ -144,14 +113,14 @@ describe('Journeysmap script', function () { MyJourneys(); - //<<<>>> + /*<<<>>> MyJourneysPage(); //<<<>>> MapInteraction(); //<<<>>> - /*MyActivityJourneys(); + MyActivityJourneys(); SurveyMetrics(); Logins(); InstitutionMetrics(); @@ -225,7 +194,7 @@ function ProfileWidget() { browser.sleep(2500); }); await ProfileWidgetExpandCollapseIcon.click().then(function() { - browser.sleep(5000); + browser.sleep(2500); }); browser.waitForAngular(); browser.getCurrentUrl(); @@ -294,8 +263,9 @@ function MyProgressWidget() { 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); + await EspanolButton.click().then(function() { + browser.sleep(5000) + }); 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!'); @@ -303,7 +273,9 @@ function MyProgressWidget() { 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 LikeItEmoji.click().then(function() { + browser.sleep(5000) + }); await CancelSurveyButton.click().then(function() { browser.sleep(5000); browser.waitForAngular(); @@ -501,6 +473,7 @@ function InterestSurveyResultsWidget() { var DivAlertTitle = element(by.css('h2')); var DivAlertMessage = element(by.css('p:nth-child(7)')); var DivOKButton = element(by.css('.confirm')); + var EC = protractor.ExpectedConditions; /*browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); @@ -639,8 +612,8 @@ function InterestSurveyResultsWidget() { await DivOKButton.click(); browser.sleep(1000); await CancelButton.click(); - /*browser.waitForAngular(); - await ShareResultsIcon.click();//INCONSISTENT + browser.waitForAngular(); + /*await ShareResultsIcon.click();//INCONSISTENT await FromTextBox.clear(); await FromTextBox.sendKeys("Juan's Automated Regression"); await ToTextBox.sendKeys('jhuerta@edmin.com'); @@ -649,18 +622,11 @@ function InterestSurveyResultsWidget() { 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.getCurrentUrl(); - browser.sleep(10000); - browser.wait(EC.elementToBeClickable(by.css('.fa-share-alt')), 10000); - browser.waitForAngular(); - browser.getCurrentUrl(); - });*/ + await DivOKButton.click(); browser.waitForAngular(); - browser.getCurrentUrl(); + browser.wait(EC.elementToBeClickable(ShareResultsIcon)); + browser.waitForAngular(); + browser.getCurrentUrl();*/ }); } @@ -676,7 +642,7 @@ function InterestSurveyResultsClusters() { var AtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); var AtAGlanceBackOfCardXCloseLink = element(by.xpath('//div[2]/div/div[2]/span')); var OccupationCardEllipsis = element(by.xpath('//div/div/div[2]/div/i')); - var JourneymanIcon = element(by.xpath('//div[4]/div[2]')) + var JourneymanIcon = element(by.xpath('//div[5]/div[2]')) var LearnMoreButton = element(by.xpath('//div/div/div/div/div[2]/div[2]')); var EC = protractor.ExpectedConditions; var JourneyInfoIcon = element(by.css('.journey-info-circle')); @@ -1007,7 +973,7 @@ function InterestSurveyResultsCreateJourney() { browser.sleep(1000); }); expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); - expect(await ThirteenthWayPoint.getText()).toEqual('Certified Audio Engineer'); + expect(await ThirteenthWayPoint.getText()).toEqual('National Chief Engineer'); expect(await FourteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); await ActionBarSaveIconTwo.click().then(function() { @@ -1062,7 +1028,7 @@ function InterestSurveyResultsCreateJourney() { }); expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); expect(await ThirteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); - expect(await FourteenthWayPoint.getText()).toEqual('Certified Audio Engineer'); + expect(await FourteenthWayPoint.getText()).toEqual('National Chief Engineer'); expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); await ActionBarSaveIconOne.click().then(function() { browser.sleep(2500); @@ -1733,9 +1699,19 @@ function TopCareerWidget() { var CertificatesCardThreeSubHeader = element(by.xpath('//div[3]/div/div/table/tbody/tr/td/span')); var CertificatesRightScroll = element(by.css('.widget-round-corners:nth-child(6) .right:nth-child(4) > .glyphicon:nth-child(1)')); var InstitutionsWidgetTitle = element(by.xpath('//recommended-colleges/div/div/div')); - var InstitutionsCardOneHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) > .internat-carouse-padding > .full-width .jrnys_body-copy')); - var InstitutionsCardTwoHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(2) > .internat-carouse-padding > .full-width .jrnys_body-copy')); - var InstitutionsCardThreeHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(3) > .internat-carouse-padding > .full-width .jrnys_body-copy')); + var InstitutionsCardOneHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) .territoryCardTitleText:nth-child(2) > .ng-binding:nth-child(1)')); + var InstitutionsCardOneAtAGlance = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) div:nth-child(1) > .territoryCardIcon:nth-child(1) > .fas:nth-child(1)')); + var InstitutionsBackOfCardOneHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) div:nth-child(2) .territoryCardTitleText')); + var InstitutionsBackOfCard4YearHeader = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(1) > td:nth-child(2) > div:nth-child(1)')); + var InstitutionsBackOfCard4YearData = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(1) > td:nth-child(2) > div:nth-child(2)')); + var InstitutionsBackOfCardUndergradHeader = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(3) > td:nth-child(2) > div:nth-child(1)')); + var InstitutionsBackOfCardUndergradData = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(3) > td:nth-child(2) > div.territoryCardBackOfCardItemText.ng-binding')); + var InstitutionsBackOfCardLocationHeader = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(5) > td.territoryCardBackOfCardItemText')); + var InstitutionsBackOfCardLocationData = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(5) > td.territoryCardBackOfCardItemText > div')); + var InstitutionsBackOfCardClassroomHeader = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(7) > td.territoryCardBackOfCardItemText')); + var InstitutionsBackOfCardClassroomData = element(by.css('#territoryCardContainer > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back > div > div > div > div.ng-scope > div > table > tbody > tr:nth-child(7) > td.territoryCardBackOfCardItemText > div')); + var InstitutionsCardTwoHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(2) .territoryCardTitleText:nth-child(2) > .ng-binding:nth-child(1)')); + var InstitutionsCardThreeHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(3) .territoryCardTitleText:nth-child(2) > .ng-binding:nth-child(1)')); var InstitutionsRightScroll = element(by.css('#recommendedColleges .right > .glyphicon')); var TopResourcesWidgetTitle = element(by.css('#id .jrnys_lead-body-copy')); var TopResourcesCardOneHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) .hotTitles')); @@ -1788,14 +1764,14 @@ function TopCareerWidget() { //var NearbyPlacesRightScroll = element(by.xpath('//li[17]')).element(by.css('.glyphicon-chevron-right')); //var NearbyPlacesLeftScroll = element(by.xpath('//li[17]')).element(by.css('.glyphicon-chevron-left')); - /*browser.executeScript('window.scrollTo(0, 1880);').then(function() { + browser.executeScript('window.scrollTo(0, 1880);').then(function() { browser.sleep(2500); });//remove*/ await TopCareerLink.click().then(function() { browser.sleep(10000); }); - //Description + /*Description remove expect(await LearnMoreTitle.getText()).toEqual('Computer and Information Research Scientists'); await DescriptionDetail.click().then(function() { browser.sleep(1000); @@ -1841,7 +1817,7 @@ function TopCareerWidget() { browser.actions().mouseMove(element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); });*/ - //Personality + /*Personality remove expect(await PersonalityWidgetTitle.getText()).toEqual('Personality'); expect(await PersonalityDescriptionOne.getText()).toEqual('People interested in this work like activities that include ideas, thinking, and figuring things out.'); expect(await PersonalityDescriptionTwo.getText()).toEqual('They do well at jobs that need:'); @@ -1889,7 +1865,7 @@ function TopCareerWidget() { /*browser.actions().mouseMove(CertificatesWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 882);').then(function() { + /*browser.executeScript('window.scrollTo(0, 882);').then(function() { remove browser.sleep(2495); }); //Degrees @@ -1902,7 +1878,7 @@ function TopCareerWidget() { /*browser.actions().mouseMove(InstitutionsWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 1360);').then(function() { + /*browser.executeScript('window.scrollTo(0, 1360);').then(function() { remove browser.sleep(2500); }); //Certificates @@ -1918,12 +1894,24 @@ function TopCareerWidget() { /*browser.actions().mouseMove(TopResourcesWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 1836);').then(function() { + /*browser.executeScript('window.scrollTo(0, 1995);').then(function() { remove browser.sleep(2500); }); //Institutions expect(await InstitutionsWidgetTitle.getText()).toEqual('Institutions View All'); expect(await InstitutionsCardOneHeader.getText()).toEqual('University of San Diego'); + await InstitutionsCardOneAtAGlance.click().then(function() { + browser.sleep(2500) + }); + expect(await InstitutionsBackOfCardOneHeader.getText()).toEqual('University of San Diego'); + expect(await InstitutionsBackOfCard4YearHeader.getText()).toEqual('4 Year'); + expect(await InstitutionsBackOfCard4YearData.getText()).toEqual('Private nonprofit'); + expect(await InstitutionsBackOfCardUndergradHeader.getText()).toEqual('Undergraduate Students'); + expect(await InstitutionsBackOfCardUndergradData.getText()).toEqual('5,677'); + expect(await InstitutionsBackOfCardLocationHeader.getText()).toContain('Location'); + expect(await InstitutionsBackOfCardLocationData.getText()).toEqual('City'); + expect(await InstitutionsBackOfCardClassroomHeader.getText()).toContain('Classrooms'); + expect(await InstitutionsBackOfCardClassroomData.getText()).toEqual('Medium'); expect(await InstitutionsCardTwoHeader.getText()).toEqual('National University'); expect(await InstitutionsCardThreeHeader.getText()).toEqual('Point Loma Nazarene University'); await InstitutionsRightScroll.click(); @@ -1931,7 +1919,7 @@ function TopCareerWidget() { /*browser.actions().mouseMove(FindOpportunitiesWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 2313);').then(function() { + /*browser.executeScript('window.scrollTo(0, 2470);').then(function() { remove browser.sleep(2500); }); //Top Resources @@ -1953,7 +1941,7 @@ function TopCareerWidget() { /*browser.actions().mouseMove(TasksWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 2790);').then(function() { + /*browser.executeScript('window.scrollTo(0, 2947);').then(function() { remove browser.sleep(2500); }); //Find Opportunities @@ -1993,7 +1981,7 @@ function TopCareerWidget() { await XCloseLink.click().then(function() { browser.sleep(1000); });*/ - expect(await JobsTotalsLink.getText()).toEqual('Jobs'); + /*expect(await JobsTotalsLink.getText()).toEqual('Jobs'); remove //expect(await JobsTotalsLink.getText()).toContain('68');//stored value needed expect(await InternshipsTotalsLink.getText()).toEqual('Internships'); //expect(await InternshipsTotalsLink.getText()).toContain('0');//stored value needed @@ -2030,8 +2018,8 @@ function TopCareerWidget() { /*browser.actions().mouseMove(KnowledgeWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 3108);').then(function() { - browser.sleep(2500); + browser.executeScript('window.scrollTo(0, 3225);').then(function() { + browser.sleep(25000); }); //Tasks expect(await TasksWidgetTitle.getText()).toEqual('Tasks View All'); @@ -2044,8 +2032,8 @@ function TopCareerWidget() { /*browser.actions().mouseMove(WorkActivitiesWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 3426);').then(function() { - browser.sleep(2500); + browser.executeScript('window.scrollTo(0, 3600);').then(function() { + browser.sleep(25000); }); //Knowledge expect(await KnowledgeWidgetTitle.getText()).toEqual('Knowledge View All'); @@ -2055,7 +2043,7 @@ function TopCareerWidget() { /*browser.actions().mouseMove(NearbyPlacesWidgetTitle).perform().then(function() { browser.sleep(1000); });*/ - browser.executeScript('window.scrollTo(0, 3743);').then(function() { + /*browser.executeScript('window.scrollTo(0, 3743);').then(function() { remove browser.sleep(2500); }); //Work Activities @@ -2073,7 +2061,7 @@ function TopCareerWidget() { await NearbyPlacesRightScroll.click(); browser.sleep(2500); await NearbyPlacesLeftScroll.click(); - browser.sleep(2500); + browser.sleep(2500);*/ browser.waitForAngular(); browser.getCurrentUrl(); });