Updated describe line

This commit is contained in:
2020-07-16 14:56:59 -07:00
parent 6c48312066
commit 543960614d
7 changed files with 86 additions and 430 deletions

View File

@@ -1,6 +1,6 @@
//createJourney_spec.js //createJourney_spec.js
describe('Journeysmap script', function () { describe('Create Journey Script', function () {
//app-journeysmap landing page //app-journeysmap landing page
var UserNameTextBox = element(by.css('#txtU')); var UserNameTextBox = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));

View File

@@ -1,6 +1,6 @@
//interestSurveyResultsWidget_spec.js //interestSurveyResultsWidget_spec.js
describe('Journeysmap script', function () { describe('Interest Survey Results Widget Script', function () {
//app-journeysmap landing page //app-journeysmap landing page
var UserNameTextBox = element(by.css('#txtU')); var UserNameTextBox = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));

View File

@@ -1,12 +1,5 @@
//loginWithInstitution_config.js //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 = { exports.config = {
framework: 'jasmine', framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub', seleniumAddress: 'http://localhost:4444/wd/hub',
@@ -25,12 +18,6 @@ exports.config = {
browser.driver.manage().window().maximize(); browser.driver.manage().window().maximize();
}, },
params: {
username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com',
code: 'N0R7Y7RO',
password: '3Dm!nAuto'
}
/*multiCapabilities: [{ /*multiCapabilities: [{
browserName: 'chrome' browserName: 'chrome'
}, { }, {

View File

@@ -1,253 +1,133 @@
//createAccount_spec.js //loginWithInstitution_spec.js
describe('OnBoarding script', function () { describe('Login With Institution Script', function () {
//Open browser //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 () { 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 CloseIcon = element(by.css('.fas'));
var LastNameTextBox = element(by.css('#txtLastName')); var UsernameTextBox = element(by.css('#txtU'));
var EmailTextBox = element(by.css('#txtEmail')); var PasswordTextBox = element(by.css('#txtP'));
var UsernameTextBox = element(by.css('#txtUsername')); var NextButton = element(by.css('.btn'));
//Sign Up //Sign Up
SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox); SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton);
function SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox) { function SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) {
it('OnBoarding; should complete the OnBoarding process and create a new account.', async function () { it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () {
//Page 1 - First & Last Name var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope'));
var EC = protractor.ExpectedConditions; var InstitutionTextBox = element(by.css('#txtZ'));
var PageCloseXIcon = element(by.css('.fa-times-circle:nth-child(2)')); var SubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)'));
var PageOneGreetingText = element(by.css('table:nth-child(3) .jmLoginBox > div:nth-child(1) > .jmLoginTitle')); var SubTextTwo = element(by.css('.jmLoginMsg:nth-child(7) > .ng-scope'));
var PageOneNextButton = element(by.css('tr:nth-child(2) > td > div > div:nth-child(1) > div > div:nth-child(1)')); var InstitutionDropDownList = element(by.css('.ng-scope > .ng-binding'));
var PageOneValidationText = element(by.css('.jmLoginMsg:nth-child(6) > .ng-binding')); var ValidationMessage = element(by.css('.ng-binding:nth-child(1)'));
//Page 2 - Username var FogotPasswordLink = element(by.css('.ng-scope > a'));
var PageTwoGreetingText = element(by.css('td > div > div:nth-child(2) > div:nth-child(1)')); //Reset Password
var PageTwoSubText = element(by.css('div:nth-child(2) > .jmLoginInput:nth-child(3)')); var ResetPasswordInstitutionTextBox = element(by.css('#txtZone'));
var PageTwoNextButton = element(by.css('div:nth-child(2) > div > div > .btn')); var ResetPasswordInstitutionDropDownList = element(by.css('.ng-binding:nth-child(1)'));
var PageTwoValidationText = element(by.css('div:nth-child(2) > .ng-scope > .ng-binding')); var ResetPasswordGreetingText = element(by.css('.jmLoginTitle'));
var UsernameLinkText = element(by.linkText('with a username')); var ResetPasswordUsernameTextBox = element(by.css('#txtUsername'));
var PageTwoAltGreetingText = element(by.css('td > div > div:nth-child(3) > div:nth-child(1)')); var ResetPasswordValidationMessage = element(by.css('.jmLoginMsg'));
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'));
//Journeys Dashboard //Journeys Dashboard
var JourneysDashboardGreeting = element(by.css('.dropdown')); var JourneysDashboardGreeting = element(by.css('.dropdown'));
//Update Security Question
var ProfileImageIcon = element(by.css('.roundCenterBackgroundImage')); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
var ProfileLinkText = element(by.linkText('Profile')); expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
var AccountInformation = element(by.css('.view-title')); expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.');
var ManageSecurityQuestionsButton = element(by.css('.btn:nth-child(15)')); await UsernameTextBox.sendKeys('gnight147').then(function() {
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() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); await PasswordTextBox.sendKeys('EDmin').then(function() {
await FirstNameTextBox.sendKeys('H').then(function() {
browser.sleep(1000);
});
await PageOneNextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
await LastNameTextBox.clear().then(function() { await InstitutionTextBox.sendKeys('j').then(function() {
browser.sleep(1000);
LastNameTextBox.sendKeys('AutomatedTesting');
browser.sleep(1000); 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); browser.sleep(2500);
}); });
//Page 2 - Username await NextButton.click().then(function() {
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() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageTwoValidationText.getText()).toEqual('Oops! Something is funky. Please enter a valid email address.'); expect(await ValidationMessage.getText()).toEqual("Uh oh. Something isn't quite right. Please try again.");
await UsernameLinkText.click().then(function() { expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
browser.sleep(1000); expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.');
}); await FogotPasswordLink.click().then(function() {
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() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageTwoAltValidationText.getText()).toEqual('Oops! Please enter a valid username.'); //Reset Password Page
await EmailLinkText.click().then(function() { expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?");
browser.sleep(1000); await ResetPasswordUsernameTextBox.sendKeys('jhuerta').then(function() {
});
await EmailTextBox.sendKeys(browser.params.username).then(function() {
browser.sleep(1000);
});
await PageTwoNextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
//Page 3 Password expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
expect(await PageThreeGreetingText.getText()).toEqual("Let's keep your account safe and secure."); await NextButton.click().then(function() {
await PasswordTextBoxOne.sendKeys('ED');
await PasswordTextBoxTwo.sendKeys('3Dm!n123');
await PageThreeNextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
await EyeIconOne.click().then(function() { 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); browser.sleep(2500);
}); });
await PasswordTextBoxOne.sendKeys('min123').then(function() { expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
browser.sleep(1000); 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); browser.sleep(2500);
}); });
expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?");
await EyeIconOne.click().then(function() { expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com.");
browser.sleep(1000); await CloseIcon.click().then(function() {
});
await PasswordTextBoxOne.clear().then(function() {
browser.sleep(1000);
PasswordTextBoxOne.sendKeys('3Dm!n123');
browser.sleep(1000);
});
await PageThreeNextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
//Page 4 Birthday //Back to Login Page
expect(await PageFourGreetingText.getText()).toEqual("It's Your Birthday! When do we party?"); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
await DOBMonth.sendKeys('2'); expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
await DOBDay.sendKeys('15'); expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.');
await DOBYear.sendKeys('2').then(function() { await UsernameTextBox.sendKeys('gnight147').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() {
browser.sleep(2500); browser.sleep(2500);
}); });
//Page 5 Connection Code await PasswordTextBox.sendKeys('EDmin123').then(function() {
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() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await ConnectionGreetingText.getText()).toEqual('Connect with your code!'); expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
await ConnectionCodeTextBox.sendKeys('JMHZ19').then(function() { await InstitutionTextBox.sendKeys('journeys').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() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await ConnectionCodeValidationText.getText()).toContain("Hmmm we don't recognize your code, please try again. Please contact help@journeysmap.com."); await NextButton.click().then(function() {
await ConnectionCodeTextBox.clear().then(function() {
ConnectionCodeTextBox.sendKeys(browser.params.code);
});
await ConnectionCodeNextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
//What do you want to explore? (page) //Journeys Dashboard
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
browser.waitForAngular(); browser.waitForAngular();
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Good');
//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);
});
}); });
} }
//Action Calls //Action Calls
SignOut(); //SignOut();
Login();
SignOut();
LoginWithNewPassword();
}); });
function SignOut() { function SignOut() {
@@ -263,215 +143,4 @@ function SignOut() {
browser.sleep(2500); 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);
});
});
} }

View File

@@ -1,6 +1,6 @@
//myCareersWidget_spec.js //myCareersWidget_spec.js
describe('Journeysmap script', function () { describe('My Careers Widget Script', function () {
//app-journeysmap landing page //app-journeysmap landing page
var UserNameTextBox = element(by.css('#txtU')); var UserNameTextBox = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));

View File

@@ -1,6 +1,6 @@
//profileAndMyProgress_spec.js //profileAndMyProgress_spec.js
describe('Journeysmap script', function () { describe('Profile And My Progress Widget Scripts', function () {
//app-journeysmap landing page //app-journeysmap landing page
var UserNameTextBox = element(by.css('#txtU')); var UserNameTextBox = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));

BIN
vssver.scc Normal file

Binary file not shown.