Added OnBoarding Script
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user