Created OnBoarding script
This commit is contained in:
@@ -25,7 +25,9 @@ exports.config = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com'
|
username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com',
|
||||||
|
code: 'N0R7Y7RO',
|
||||||
|
password: '3Dm!nAuto'
|
||||||
}
|
}
|
||||||
|
|
||||||
/*multiCapabilities: [{
|
/*multiCapabilities: [{
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ describe('OnBoarding script', function () {
|
|||||||
//Processing Page
|
//Processing Page
|
||||||
var ProcessingPageText = element(by.css('.ng-binding:nth-child(2)'));
|
var ProcessingPageText = element(by.css('.ng-binding:nth-child(2)'));
|
||||||
//What Do you want to explore? (page)
|
//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 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 DiscoverMyInterestButton = element(by.css('.col-xs-10 > div > div:nth-child(1) > .btn'));
|
||||||
var LearnMySkillsButton = element(by.css('div:nth-child(2) > .btn'));
|
var LearnMySkillsButton = element(by.css('div:nth-child(2) > .btn'));
|
||||||
@@ -199,16 +200,17 @@ describe('OnBoarding script', function () {
|
|||||||
});
|
});
|
||||||
expect(await ConnectionCodeValidationText.getText()).toContain("Hmmm we don't recognize your code, please try again. Please contact help@journeysmap.com.");
|
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() {
|
await ConnectionCodeTextBox.clear().then(function() {
|
||||||
ConnectionCodeTextBox.sendKeys('N0R7Y7RO');
|
ConnectionCodeTextBox.sendKeys(browser.params.code);
|
||||||
});
|
});
|
||||||
await ConnectionCodeNextButton.click().then(function() {
|
await ConnectionCodeNextButton.click().then(function() {
|
||||||
browser.sleep(15000);
|
browser.sleep(5000);
|
||||||
});
|
});
|
||||||
/*Processing Page
|
/*Processing Page
|
||||||
expect(await ProcessingPageText.getText()).toEqual('wtf').then(function() {
|
expect(await ProcessingPageText.getText()).toEqual('wtf').then(function() {
|
||||||
browser.sleep(20000);
|
browser.sleep(20000);
|
||||||
});*/
|
});*/
|
||||||
//What do you want to explore? (page)
|
//What do you want to explore? (page)
|
||||||
|
browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage));
|
||||||
expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?');
|
expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?');
|
||||||
expect(await DiscoverMyInterestButton.getText()).toEqual('Discover My Interests');
|
expect(await DiscoverMyInterestButton.getText()).toEqual('Discover My Interests');
|
||||||
expect(await LearnMySkillsButton.getText()).toEqual('Learn My Skills');
|
expect(await LearnMySkillsButton.getText()).toEqual('Learn My Skills');
|
||||||
@@ -217,9 +219,8 @@ describe('OnBoarding script', function () {
|
|||||||
browser.sleep(2500);
|
browser.sleep(2500);
|
||||||
});
|
});
|
||||||
//Dashboard
|
//Dashboard
|
||||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
|
||||||
browser.waitForAngular();
|
browser.waitForAngular();
|
||||||
browser.getCurrentUrl();
|
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
||||||
//Update Security Question
|
//Update Security Question
|
||||||
await ProfileImageIcon.click().then(function() {
|
await ProfileImageIcon.click().then(function() {
|
||||||
browser.sleep(1000);
|
browser.sleep(1000);
|
||||||
@@ -238,9 +239,8 @@ describe('OnBoarding script', function () {
|
|||||||
await SecuritySelection.click();
|
await SecuritySelection.click();
|
||||||
await SecurityAnswer.sendKeys('War Games');
|
await SecurityAnswer.sendKeys('War Games');
|
||||||
await SecurityQuestionSaveButton.click().then(function() {
|
await SecurityQuestionSaveButton.click().then(function() {
|
||||||
browser.sleep(2500);
|
browser.sleep(5000);
|
||||||
});
|
});
|
||||||
expect(await AccountInformation.getText()).toEqual('Account Information');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,14 +256,10 @@ function SignOut() {
|
|||||||
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
|
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
|
||||||
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
|
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
|
||||||
|
|
||||||
browser.waitForAngular().then(function() {
|
browser.waitForAngular();
|
||||||
browser.sleep(1000);
|
|
||||||
});
|
|
||||||
await ProfileImage.click().then(function() {
|
await ProfileImage.click().then(function() {
|
||||||
browser.sleep(1000);
|
browser.sleep(1000);
|
||||||
});
|
});
|
||||||
browser.waitForAngular();
|
|
||||||
browser.getCurrentUrl();
|
|
||||||
await SignOutButton.click().then(function() {
|
await SignOutButton.click().then(function() {
|
||||||
browser.sleep(2500);
|
browser.sleep(2500);
|
||||||
});
|
});
|
||||||
@@ -271,7 +267,7 @@ function SignOut() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Login() {
|
function Login() {
|
||||||
it(': Login; should reset new account password and complete Explore Careers task.', async function () {
|
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 LoginPageGreetingText = element(by.css('td > div > div:nth-child(1)'));
|
||||||
var UsernameTextBox = element(by.css('#txtUsername'));
|
var UsernameTextBox = element(by.css('#txtUsername'));
|
||||||
var PasswordTextBox = element(by.css('#txtPassword'));
|
var PasswordTextBox = element(by.css('#txtPassword'));
|
||||||
@@ -390,11 +386,11 @@ function Login() {
|
|||||||
expect(await ValidationText.getText()).toEqual('Oops. Looks like both passwords not match. Use 1 uppercase letter or 1 number. Please try again.');
|
expect(await ValidationText.getText()).toEqual('Oops. Looks like both passwords not match. Use 1 uppercase letter or 1 number. Please try again.');
|
||||||
await NewPasswordTextBoxOne.clear().then(function() {
|
await NewPasswordTextBoxOne.clear().then(function() {
|
||||||
browser.sleep(1000);
|
browser.sleep(1000);
|
||||||
NewPasswordTextBoxOne.sendKeys('3Dm!nAuto');
|
NewPasswordTextBoxOne.sendKeys(browser.params.password);
|
||||||
});
|
});
|
||||||
await NewPasswordTextBoxTwo.clear().then(function() {
|
await NewPasswordTextBoxTwo.clear().then(function() {
|
||||||
browser.sleep(1000);
|
browser.sleep(1000);
|
||||||
NewPasswordTextBoxTwo.sendKeys('3Dm!nAuto');
|
NewPasswordTextBoxTwo.sendKeys(browser.params.password);
|
||||||
});
|
});
|
||||||
await NextButton.click().then(function() {
|
await NextButton.click().then(function() {
|
||||||
browser.sleep(5000);
|
browser.sleep(5000);
|
||||||
@@ -416,9 +412,8 @@ function Login() {
|
|||||||
});
|
});
|
||||||
expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA');
|
expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA');
|
||||||
//Dashboard
|
//Dashboard
|
||||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
|
||||||
browser.waitForAngular();
|
browser.waitForAngular();
|
||||||
browser.getCurrentUrl();
|
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,37 +425,25 @@ function LoginWithNewPassword() {
|
|||||||
var LoginPageSubTextOne = element(by.css('div:nth-child(5) > div:nth-child(1)'));
|
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 LoginPageSubTextTwo = element(by.css('div:nth-child(5) > div:nth-child(2)'));
|
||||||
var NextButton = element(by.css('.btn'));
|
var NextButton = element(by.css('.btn'));
|
||||||
var ValidationText = element(by.css('.ng-scope:nth-child(5)'));
|
//EDM-1748
|
||||||
var PasswordEyeIcon = element(by.css('.fa-eye'));
|
var EC = protractor.ExpectedConditions;
|
||||||
var ClickHereLinkText = element(by.css('div:nth-child(2) > a'));
|
var SecurityQuestion = element(by.css('#secQuestion0'));
|
||||||
//Account Recovery
|
var SecuritySelection = element(by.css('option:nth-child(8)'));
|
||||||
var PageGreetingText = element(by.css('td .ng-scope > div:nth-child(1)'));
|
var SecurityAnswer = element(by.css('.ng-pristine'));
|
||||||
var PageOneValidationText = element(by.css('.ng-scope:nth-child(4)'));
|
var SecurityQuestionSaveButton = element(by.css('.col-lg-4 > #photoBtn'));
|
||||||
//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 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
|
//Journeys Dashboard
|
||||||
var JourneysDashboardGreeting = element(by.css('.dropdown'));
|
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
|
//Navigate to Login page
|
||||||
browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login');
|
browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login');
|
||||||
browser.sleep(2500);
|
browser.sleep(2500);
|
||||||
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
|
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
|
||||||
await UsernameTextBox.sendKeys('AutomatedTest332020913@edmin.com');
|
await UsernameTextBox.sendKeys(browser.params.username);
|
||||||
await PasswordTextBox.sendKeys('edmin123').then(function() {
|
await PasswordTextBox.sendKeys(browser.params.password).then(function() {
|
||||||
browser.sleep(1000);
|
browser.sleep(1000);
|
||||||
});
|
});
|
||||||
expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
|
expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
|
||||||
@@ -468,108 +451,26 @@ function LoginWithNewPassword() {
|
|||||||
await NextButton.click().then(function() {
|
await NextButton.click().then(function() {
|
||||||
browser.sleep(2500);
|
browser.sleep(2500);
|
||||||
});
|
});
|
||||||
expect(await ValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again.");
|
//Security Question DIV | EDM-1748
|
||||||
await PasswordEyeIcon.click().then(function() {
|
browser.wait(EC.visibilityOf(SecurityQuestion));
|
||||||
browser.sleep(1000);
|
await SecurityQuestion.click();
|
||||||
});
|
await SecuritySelection.click();
|
||||||
await PasswordTextBox.clear().then(function() {
|
await SecurityAnswer.sendKeys('War Games');
|
||||||
PasswordTextBox.sendKeys('EDmin123');
|
await SecurityQuestionSaveButton.click().then(function() {
|
||||||
});
|
|
||||||
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 UsernameTextBox.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() {
|
|
||||||
browser.sleep(1000);
|
|
||||||
UsernameTextBox.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 UsernameTextBox.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 ValidationText.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 ValidationText.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('3Dm!nAuto');
|
|
||||||
});
|
|
||||||
await NewPasswordTextBoxTwo.clear().then(function() {
|
|
||||||
browser.sleep(1000);
|
|
||||||
NewPasswordTextBoxTwo.sendKeys('3Dm!nAuto');
|
|
||||||
});
|
|
||||||
await NextButton.click().then(function() {
|
|
||||||
browser.sleep(5000);
|
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 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);
|
|
||||||
});
|
|
||||||
expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA');
|
|
||||||
//Dashboard
|
//Dashboard
|
||||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
|
||||||
browser.waitForAngular();
|
browser.waitForAngular();
|
||||||
browser.getCurrentUrl();
|
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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user