diff --git a/createJourney_spec.js b/createJourney_spec.js index 5e0e0e3..a07c55a 100644 --- a/createJourney_spec.js +++ b/createJourney_spec.js @@ -1,6 +1,6 @@ //createJourney_spec.js -describe('Journeysmap script', function () { +describe('Create Journey Script', function () { //app-journeysmap landing page var UserNameTextBox = element(by.css('#txtU')); var PasswordTextBox = element(by.css('#txtP')); diff --git a/interestSurveyResultsWidget_spec.js b/interestSurveyResultsWidget_spec.js index f1f9f43..b9a1748 100644 --- a/interestSurveyResultsWidget_spec.js +++ b/interestSurveyResultsWidget_spec.js @@ -1,6 +1,6 @@ //interestSurveyResultsWidget_spec.js -describe('Journeysmap script', function () { +describe('Interest Survey Results Widget Script', function () { //app-journeysmap landing page var UserNameTextBox = element(by.css('#txtU')); var PasswordTextBox = element(by.css('#txtP')); diff --git a/loginWithInstitution_config.js b/loginWithInstitution_config.js index 202a072..e2deba9 100644 --- a/loginWithInstitution_config.js +++ b/loginWithInstitution_config.js @@ -1,12 +1,5 @@ //loginWithInstitution_config.js -var today = new Date(); -var mm = today.getMonth()+1; //January is 0 -var dd = today.getDate(); -var yyyy = today.getFullYear(); -var hour = today.getHours(); -var minute = today.getMinutes(); - exports.config = { framework: 'jasmine', seleniumAddress: 'http://localhost:4444/wd/hub', @@ -25,12 +18,6 @@ exports.config = { browser.driver.manage().window().maximize(); }, - params: { - username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com', - code: 'N0R7Y7RO', - password: '3Dm!nAuto' - } - /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/loginWithInstitution_spec.js b/loginWithInstitution_spec.js index 91417ff..660cbb9 100644 --- a/loginWithInstitution_spec.js +++ b/loginWithInstitution_spec.js @@ -1,253 +1,133 @@ -//createAccount_spec.js +//loginWithInstitution_spec.js -describe('OnBoarding script', function () { +describe('Login With Institution Script', function () { //Open browser - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/signup'); + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); it('should have a title', async function () { - await expect(browser.getTitle()).toEqual('Sign up'); + await expect(browser.getTitle()).toEqual('Login'); }); - var FirstNameTextBox = element(by.css('#txtFirstName')); - var LastNameTextBox = element(by.css('#txtLastName')); - var EmailTextBox = element(by.css('#txtEmail')); - var UsernameTextBox = element(by.css('#txtUsername')); + var CloseIcon = element(by.css('.fas')); + var UsernameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + var NextButton = element(by.css('.btn')); //Sign Up - SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox); + SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton); - 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 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) > .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 > .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 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)')); - var PasswordTextBoxOne = element(by.css('#txtPw1')); - 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) > .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')); - var DOBDay = element(by.css('#txtDobDate')); - var DOBYear = element(by.css('#txtDobYear')); - var today = new Date(); - var yyyy = today.getFullYear()-5; - //var Under13 = today.getFullYear()-5;delete - 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('.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) > .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(2) > .jmLoginMsg:nth-child(4) > .ng-binding')); - //What Do you want to explore? (page) - 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')); - var ExploreCareersButton = element(by.css('div:nth-child(3) > .btn')); - var CloseXIcon = element(by.css('.fas')); + function SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) { + it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () { + var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope')); + var InstitutionTextBox = element(by.css('#txtZ')); + var SubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)')); + var SubTextTwo = element(by.css('.jmLoginMsg:nth-child(7) > .ng-scope')); + var InstitutionDropDownList = element(by.css('.ng-scope > .ng-binding')); + var ValidationMessage = element(by.css('.ng-binding:nth-child(1)')); + var FogotPasswordLink = element(by.css('.ng-scope > a')); + //Reset Password + var ResetPasswordInstitutionTextBox = element(by.css('#txtZone')); + var ResetPasswordInstitutionDropDownList = element(by.css('.ng-binding:nth-child(1)')); + var ResetPasswordGreetingText = element(by.css('.jmLoginTitle')); + var ResetPasswordUsernameTextBox = element(by.css('#txtUsername')); + var ResetPasswordValidationMessage = element(by.css('.jmLoginMsg')); //Journeys Dashboard var JourneysDashboardGreeting = element(by.css('.dropdown')); - //Update Security Question - var ProfileImageIcon = element(by.css('.roundCenterBackgroundImage')); - var ProfileLinkText = element(by.linkText('Profile')); - var AccountInformation = element(by.css('.view-title')); - var ManageSecurityQuestionsButton = element(by.css('.btn:nth-child(15)')); - var SecurityQuestion = element(by.css('#secQuestion0')); - var SecuritySelection = element(by.css('option:nth-child(8)')); - var SecurityAnswer = element(by.css('.ng-pristine')); - 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."); - await FirstNameTextBox.sendKeys('J').then(function() { - browser.sleep(1000); - }); - await LastNameTextBox.sendKeys('H').then(function() { - browser.sleep(1000); - }); - await PageOneNextButton.click().then(function() { + + expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); + expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.'); + await UsernameTextBox.sendKeys('gnight147').then(function() { browser.sleep(2500); }); - expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); - await FirstNameTextBox.sendKeys('H').then(function() { - browser.sleep(1000); - }); - await PageOneNextButton.click().then(function() { + await PasswordTextBox.sendKeys('EDmin').then(function() { browser.sleep(2500); }); - expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); - await LastNameTextBox.clear().then(function() { - browser.sleep(1000); - LastNameTextBox.sendKeys('AutomatedTesting'); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); + await InstitutionTextBox.sendKeys('j').then(function() { browser.sleep(1000); }); - await PageOneNextButton.click().then(function() { + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); + await InstitutionTextBox.sendKeys('o').then(function() { + browser.sleep(1000); + }); + await InstitutionTextBox.sendKeys('in').then(function() { + browser.sleep(1000); + }); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); + await InstitutionTextBox.clear(); + await InstitutionTextBox.sendKeys('jour').then(function() { + browser.sleep(1000); + }); + await InstitutionDropDownList.click().then(function() { browser.sleep(2500); }); - //Page 2 - Username - expect(await PageTwoGreetingText.getText()).toEqual('Your email goes here.'); - await EmailTextBox.sendKeys('AutomatedTesting').then(function() { - browser.sleep(1000); - }); - expect(await PageTwoSubText.getText()).toEqual('No email? Create an account with a username instead.'); - await PageTwoNextButton.click().then(function() { + await NextButton.click().then(function() { browser.sleep(2500); }); - expect(await PageTwoValidationText.getText()).toEqual('Oops! Something is funky. Please enter a valid email address.'); - await UsernameLinkText.click().then(function() { - browser.sleep(1000); - }); - expect(await PageTwoAltGreetingText.getText()).toEqual("Let's make a username!"); - 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() { + expect(await ValidationMessage.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); + expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.'); + await FogotPasswordLink.click().then(function() { browser.sleep(2500); }); - expect(await PageTwoAltValidationText.getText()).toEqual('Oops! Please enter a valid username.'); - await EmailLinkText.click().then(function() { - browser.sleep(1000); - }); - await EmailTextBox.sendKeys(browser.params.username).then(function() { - browser.sleep(1000); - }); - await PageTwoNextButton.click().then(function() { + //Reset Password Page + expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?"); + await ResetPasswordUsernameTextBox.sendKeys('jhuerta').then(function() { browser.sleep(2500); }); - //Page 3 Password - expect(await PageThreeGreetingText.getText()).toEqual("Let's keep your account safe and secure."); - await PasswordTextBoxOne.sendKeys('ED'); - await PasswordTextBoxTwo.sendKeys('3Dm!n123'); - await PageThreeNextButton.click().then(function() { + expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); + await NextButton.click().then(function() { browser.sleep(2500); }); - expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); - await EyeIconOne.click().then(function() { + expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); + expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); + await ResetPasswordUsernameTextBox.clear(); + await ResetPasswordUsernameTextBox.sendKeys('gnight147').then(function() { browser.sleep(2500); }); - await PasswordTextBoxOne.sendKeys('min123').then(function() { - browser.sleep(1000); + expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?"); + await ResetPasswordInstitutionTextBox.sendKeys('journeys').then(function() { + browser.sleep(2000); }); - await PageThreeNextButton.click().then(function() { + await NextButton.click().then(function() { browser.sleep(2500); }); - expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); - await EyeIconOne.click().then(function() { - browser.sleep(1000); - }); - await PasswordTextBoxOne.clear().then(function() { - browser.sleep(1000); - PasswordTextBoxOne.sendKeys('3Dm!n123'); - browser.sleep(1000); - }); - await PageThreeNextButton.click().then(function() { + expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?"); + expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); + await CloseIcon.click().then(function() { browser.sleep(2500); }); - //Page 4 Birthday - expect(await PageFourGreetingText.getText()).toEqual("It's Your Birthday! When do we party?"); - await DOBMonth.sendKeys('2'); - await DOBDay.sendKeys('15'); - await DOBYear.sendKeys('2').then(function() { - browser.sleep(1000); - }); - expect(await PageFourValidationText.getText()).toEqual('Please check that date is formatted as MM-DD-YYYY'); - await DOBYear.clear().then(function() { - browser.sleep(1000); - DOBYear.sendKeys(yyyy); - browser.sleep(1000); - }); - 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() { + //Back to Login Page + expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); + expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.'); + await UsernameTextBox.sendKeys('gnight147').then(function() { browser.sleep(2500); }); - //Page 5 Connection Code - expect(await PageFiveGreetingText.getText()).toEqual('Do you have a connection code?'); - expect(await PageFiveSubText.getText()).toEqual("Not sure what this is? Don't feel bad, just skip ahead!"); - await CodeButton.click().then(function() { + await PasswordTextBox.sendKeys('EDmin123').then(function() { browser.sleep(2500); }); - expect(await ConnectionGreetingText.getText()).toEqual('Connect with your code!'); - await ConnectionCodeTextBox.sendKeys('JMHZ19').then(function() { - browser.sleep(1000); - }); - expect(await ConnectionCodeSubText.getText()).toContain("Not sure what this is? Don't feel bad, just skip ahead!"); - await ConnectionCodeNextButton.click().then(function() { + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); + await InstitutionTextBox.sendKeys('journeys').then(function() { browser.sleep(2500); }); - expect(await ConnectionCodeValidationText.getText()).toContain("Hmmm we don't recognize your code, please try again. Please contact help@journeysmap.com."); - await ConnectionCodeTextBox.clear().then(function() { - ConnectionCodeTextBox.sendKeys(browser.params.code); - }); - await ConnectionCodeNextButton.click().then(function() { + await NextButton.click().then(function() { browser.sleep(2500); }); - //What do you want to explore? (page) - 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'); - expect(await ExploreCareersButton.getText()).toEqual('Explore Careers'); - await CloseXIcon.click().then(function() { - browser.sleep(2500); - }); - //Dashboard + //Journeys Dashboard browser.waitForAngular(); - expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); - //Update Security Question - await ProfileImageIcon.click().then(function() { - browser.sleep(1000); - }); - browser.actions().mouseMove(ProfileLinkText).perform().then(function() { - browser.sleep(1500); - }); - await ProfileLinkText.click().then(function() { - browser.sleep(1000); - }); - expect(await AccountInformation.getText()).toEqual('Account Information'); - await ManageSecurityQuestionsButton.click().then(function() { - browser.sleep(2500); - }); - await SecurityQuestion.click(); - await SecuritySelection.click(); - await SecurityAnswer.sendKeys('War Games'); - await SecurityQuestionSaveButton.click().then(function() { - browser.sleep(5000); - }); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Good'); }); } //Action Calls - SignOut(); - Login(); - SignOut(); - LoginWithNewPassword(); + //SignOut(); }); function SignOut() { @@ -263,215 +143,4 @@ function SignOut() { browser.sleep(2500); }); }); -} - -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('.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-binding:nth-child(1)')); - var PasswordEyeIcon = element(by.css('.fa-eye')); - var ClickHereLinkText = element(by.css('.ng-scope > a')); - var UsernameTextBoxTwo = element(by.css('#txtUsername')); - //Account Recovery - 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:nth-child(2)')); - var SecurityAnswerTextBox = element(by.css('#txtSecurityAnswer')); - //Reset Password - var NewPasswordTextBoxOne = element(by.css('#txtNewPassword')); - var NewPasswordTextBoxTwo = element(by.css('#txtNewPassword2')); - //What Do you want to explore? - var WhatDoYouWantToExplorePage = element(by.css('#divMyProgressBlocker > div:nth-child(3) > div:nth-child(1) > div')); - var ExploreCareersButton = element(by.css('div:nth-child(3) > .btn')); - var CareerExplorationPageTitle = element(by.css('.col-sm-12')); - var ClusterCardThreeSelectButton = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[4]/territory-card-action-bar/div/button')); - var PathwayCardTwoSelectButton = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[4]/territory-card-action-bar/div/button')); - var OccupationCardOneLearnMoreIcon = element(by.xpath('//action-learn-more/i')); - var WagesLocalStatText = element(by.css('g:nth-child(3) > g > text')); - //Journeys Dashboard - var JourneysDashboardGreeting = element(by.css('.dropdown')); - - //Navigate to Login page - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); - browser.sleep(2500); - expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); - await UsernameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com'); - await PasswordTextBox.sendKeys('edmin123').then(function() { - browser.sleep(1000); - }); - expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); - expect(await LoginPageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - expect(await ValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); - await PasswordEyeIcon.click().then(function() { - browser.sleep(1000); - }); - await PasswordTextBox.clear().then(function() { - PasswordTextBox.sendKeys('EDmin123'); - }); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - expect(await ValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); - await ClickHereLinkText.click().then(function() { - browser.sleep(2500); - }); - //Account Recovery - expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); - 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 UsernameTextBoxTwo.clear().then(function() { - browser.sleep(1000); - UsernameTextBoxTwo.sendKeys(browser.params.username); - }); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - //Select Recovery Option - expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your'); - await PageTwoEmailButton.click().then(function() { - browser.sleep(2500); - }); - expect(await PageGreetingText.getText()).toContain('Woo-Hoo! Your Email Has Been Sent!'); - expect(await PageGreetingText.getText()).toContain('The link will expire in 10 minutes!'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - await ClickHereLinkText.click().then(function() { - browser.sleep(2500); - }); - expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); - await UsernameTextBoxTwo.sendKeys(browser.params.username); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your'); - await PageTwoSecurityQuestionButton.click().then(function() { - browser.sleep(2500); - }); - expect(await PageGreetingText.getText()).toEqual('Answer Your Security Questions'); - expect(await SecurityQuestionText.getText()).toEqual('What is your favorite movie?'); - await SecurityAnswerTextBox.sendKeys('2001: A Space Odyssey'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - 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'); - }); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - //Reset Password - expect(await PageGreetingText.getText()).toEqual('Create A New Password!'); - await NewPasswordTextBoxOne.sendKeys('edmin123'); - await NewPasswordTextBoxTwo.sendKeys('EDmin123'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - 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); - }); - await NewPasswordTextBoxTwo.clear().then(function() { - browser.sleep(1000); - NewPasswordTextBoxTwo.sendKeys(browser.params.password); - }); - await NextButton.click().then(function() { - browser.sleep(5000); - }); - //What do you want to explore? (page) - expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?'); - 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); - }); - await PathwayCardTwoSelectButton.click().then(function() { - browser.sleep(2500); - }); - await OccupationCardOneLearnMoreIcon.click().then(function() { - browser.sleep(5000); - }); - 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(': 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('#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; - var SecurityQuestion = element(by.css('#secQuestion0')); - var SecuritySelection = element(by.css('option:nth-child(8)')); - var SecurityAnswer = element(by.css('.ng-pristine')); - var SecurityQuestionSaveButton = element(by.css('.col-lg-4 > #photoBtn')); - //Journeys Dashboard - var JourneysDashboardGreeting = element(by.css('.dropdown')); - var MyProgressWidgetGreeting = element(by.css('tr:nth-child(2) > td > div:nth-child(1)')); - var MyProgressWiegetSubText = element(by.css('td > div:nth-child(2)')); - var VideoIcon = element(by.css('.fa-video')); - var CloseVideoXIcon = element(by.css('.close')); - - //Navigate to Login page - 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(browser.params.username); - await PasswordTextBox.sendKeys(browser.params.password).then(function() { - browser.sleep(1000); - }); - expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); - expect(await LoginPageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - //Security Question DIV | EDM-1748 - browser.wait(EC.visibilityOf(SecurityQuestion)); - await SecurityQuestion.click(); - await SecuritySelection.click(); - await SecurityAnswer.sendKeys('War Games'); - await SecurityQuestionSaveButton.click().then(function() { - browser.sleep(5000); - }); - //Dashboard - browser.waitForAngular(); - expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); - expect(await MyProgressWidgetGreeting.getText()).toEqual('Hello, Jh!'); - expect(await MyProgressWiegetSubText.getText()).toContain("Do you feel anxious about what you're going to do with your life?"); - expect(await MyProgressWiegetSubText.getText()).toContain('Take a deep breath because Journeys Map is here to help you'); - expect(await MyProgressWiegetSubText.getText()).toContain('find your path in four easy steps.'); - await VideoIcon.click().then(function() { - browser.sleep(5000); - }); - await CloseVideoXIcon.click().then(function() { - browser.sleep(2500); - }); - }); } \ No newline at end of file diff --git a/myCareersWidget_spec.js b/myCareersWidget_spec.js index 33e15bc..b05e79b 100644 --- a/myCareersWidget_spec.js +++ b/myCareersWidget_spec.js @@ -1,6 +1,6 @@ //myCareersWidget_spec.js -describe('Journeysmap script', function () { +describe('My Careers Widget Script', function () { //app-journeysmap landing page var UserNameTextBox = element(by.css('#txtU')); var PasswordTextBox = element(by.css('#txtP')); diff --git a/profileAndMyProgress_spec.js b/profileAndMyProgress_spec.js index 55e38b0..87c6c95 100644 --- a/profileAndMyProgress_spec.js +++ b/profileAndMyProgress_spec.js @@ -1,6 +1,6 @@ //profileAndMyProgress_spec.js -describe('Journeysmap script', function () { +describe('Profile And My Progress Widget Scripts', function () { //app-journeysmap landing page var UserNameTextBox = element(by.css('#txtU')); var PasswordTextBox = element(by.css('#txtP')); diff --git a/vssver.scc b/vssver.scc new file mode 100644 index 0000000..fc3732d Binary files /dev/null and b/vssver.scc differ