Wrong folder
This commit is contained in:
@@ -1,46 +0,0 @@
|
|||||||
//createAccount_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',
|
|
||||||
specs: ['createAccount_spec.js'],
|
|
||||||
|
|
||||||
jasmineNodeOpts: {
|
|
||||||
defaultTimeoutInterval: 360000
|
|
||||||
},
|
|
||||||
|
|
||||||
capabilities: {
|
|
||||||
browserName: 'chrome'
|
|
||||||
},
|
|
||||||
|
|
||||||
onPrepare: function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
browser.driver.manage().window().maximize();
|
|
||||||
},
|
|
||||||
|
|
||||||
params: {
|
|
||||||
signup: 'https://app-qa.journeysmap.com/Journey/index.html#/signup',
|
|
||||||
login: 'https://app-qa.journeysmap.com/Journey/index.html#/login',
|
|
||||||
nonAngularURL: 'https://app-qa.journeysmap.com/UI/User/Profile',
|
|
||||||
code: 'N0R7Y7RO', //QA N0R7Y7RO //PROD 0W3SNBQ7
|
|
||||||
createdUsername: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com',
|
|
||||||
password: '3Dm!nAuto'
|
|
||||||
}
|
|
||||||
|
|
||||||
/*multiCapabilities: [{
|
|
||||||
browserName: 'chrome'
|
|
||||||
}, {
|
|
||||||
browserName: 'firefox'
|
|
||||||
}]/*, {
|
|
||||||
browserName: 'internet explorer'
|
|
||||||
}], {
|
|
||||||
browserName: 'safari'
|
|
||||||
}]*/
|
|
||||||
}
|
|
||||||
@@ -1,521 +0,0 @@
|
|||||||
//createAccount_spec.js
|
|
||||||
|
|
||||||
describe('Create Account script', function () {
|
|
||||||
//login-journeysmap landing page
|
|
||||||
var FirstNameTextBox = element(by.css('#txtFirstName'));
|
|
||||||
var LastNameTextBox = element(by.css('#txtLastName'));
|
|
||||||
var EmailTextBox = element(by.css('#txtEmail'));
|
|
||||||
var UsernameTextBox = element(by.css('#txtUsername'));
|
|
||||||
|
|
||||||
//Open browser
|
|
||||||
browser.get(browser.params.signup);
|
|
||||||
|
|
||||||
it('should have a title', async function () {
|
|
||||||
await expect(browser.getTitle()).toEqual('Sign up');
|
|
||||||
});
|
|
||||||
|
|
||||||
//Sign Up
|
|
||||||
SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox);
|
|
||||||
|
|
||||||
it('should have a title', async function () {
|
|
||||||
await expect(browser.getTitle()).toEqual('Home | Journeys');
|
|
||||||
});
|
|
||||||
|
|
||||||
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 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
|
|
||||||
var JourneysDashboardGreeting = element(by.css('.dropdown'));
|
|
||||||
var MyProgressWidgetGreeting = element(by.css('td > div:nth-child(2)'));
|
|
||||||
var MyProgressWiegetSubText = element(by.css('td > div:nth-child(3)'));
|
|
||||||
var FindMyPathButton = element(by.css('.btn-md'));
|
|
||||||
//Update Security Question
|
|
||||||
var ProfileImageIcon = element(by.css('.roundCenterBackground:nth-child(4)'));
|
|
||||||
var ProfileLinkText = element(by.linkText('Profile'));
|
|
||||||
//Account Information Page
|
|
||||||
var PageTitle = element(by.css('#title'));
|
|
||||||
var PersonalInformationTitle = element(by.css('div > .col-12 > h4'));
|
|
||||||
//Edit Profile
|
|
||||||
var EditSecurityQuestionTile = element(by.css('.col-md-3:nth-child(4) tr:nth-child(1) > td'));
|
|
||||||
var SelectASecurityQuestionHeader = element(by.css('.col-lg-8 > div:nth-child(1) > .text-muted'));
|
|
||||||
var AnswerSecurityQuestionHeader = element(by.css('div:nth-child(2) > .text-muted'));
|
|
||||||
var AnswerSecurityAnswerTextBox = element(by.name('Answer'));
|
|
||||||
var CancelButton = element(by.css('.btn-outline-primary'));
|
|
||||||
var SaveButton = element(by.css('.btn:nth-child(2)'));
|
|
||||||
var ResetProfileImage = element(by.css('.dropdown-toggle > .jmRoundCenterImage'));
|
|
||||||
var ResetSignOutButton = element(by.css('li > .btn'));
|
|
||||||
|
|
||||||
//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);
|
|
||||||
});
|
|
||||||
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() {
|
|
||||||
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');
|
|
||||||
browser.sleep(1000);
|
|
||||||
});
|
|
||||||
await PageOneNextButton.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() {
|
|
||||||
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() {
|
|
||||||
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.createdUsername).then(function() {
|
|
||||||
browser.sleep(1000);
|
|
||||||
});
|
|
||||||
await PageTwoNextButton.click().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() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.');
|
|
||||||
await EyeIconOne.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
await PasswordTextBoxOne.sendKeys('min123').then(function() {
|
|
||||||
browser.sleep(1000);
|
|
||||||
});
|
|
||||||
await PageThreeNextButton.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() {
|
|
||||||
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() {
|
|
||||||
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() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
expect(await ConnectionGreetingText.getText()).toEqual('Connect with your code!');
|
|
||||||
await ConnectionCodeTextBox.sendKeys('JMHZ19').then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
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);
|
|
||||||
});
|
|
||||||
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);
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
await ConnectionCodeNextButton.click().then(function() {
|
|
||||||
browser.sleep(5000);
|
|
||||||
});
|
|
||||||
//What do you want to explore? (page)
|
|
||||||
browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage), 30000).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(10000);
|
|
||||||
});
|
|
||||||
//Dashboard
|
|
||||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
|
||||||
browser.wait(EC.visibilityOf(MyProgressWiegetSubText), 60000).then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
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.');
|
|
||||||
expect(await FindMyPathButton.getText()).toContain('Find My Path');
|
|
||||||
//Update Security Question
|
|
||||||
await ProfileImageIcon.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
browser.actions().mouseMove(ProfileLinkText).perform().then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
await ProfileLinkText.click().then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
browser.waitForAngularEnabled(false);
|
|
||||||
browser.get(browser.params.nonAngularURL);
|
|
||||||
//Account Information Page
|
|
||||||
expect(await PageTitle.getText()).toEqual('Account Information');
|
|
||||||
//Personal Information block
|
|
||||||
expect(await PersonalInformationTitle.getText()).toEqual('Personal Information');
|
|
||||||
//Edit Security Question
|
|
||||||
expect(await EditSecurityQuestionTile.getText()).toContain('EDIT');
|
|
||||||
expect(await EditSecurityQuestionTile.getText()).toContain('SECURITY');
|
|
||||||
expect(await EditSecurityQuestionTile.getText()).toContain('QUESTION');
|
|
||||||
await EditSecurityQuestionTile.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
expect(await SelectASecurityQuestionHeader.getText()).toContain('Select a Security Question');
|
|
||||||
element(by.cssContainingText('option', 'What is your favorite movie?')).click().then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
expect(await AnswerSecurityQuestionHeader.getText()).toContain('Answer Security Question');
|
|
||||||
await AnswerSecurityAnswerTextBox.sendKeys('War Games').then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
expect(await CancelButton.getText()).toContain('CANCEL');
|
|
||||||
expect(await SaveButton.getText()).toContain('SAVE');
|
|
||||||
await SaveButton.click().then(function() {
|
|
||||||
browser.sleep(1500);
|
|
||||||
var alertDialog = browser.switchTo().alert();
|
|
||||||
expect(alertDialog.getText()).toEqual('Security questions is updated.');
|
|
||||||
browser.switchTo().alert().accept();
|
|
||||||
browser.sleep(1500);
|
|
||||||
});
|
|
||||||
await ResetProfileImage.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
await ResetSignOutButton.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Login();
|
|
||||||
SignOut();
|
|
||||||
LoginWithNewPassword();
|
|
||||||
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('.jmLoginTitle > .ng-scope'));
|
|
||||||
var UsernameTextBoxOne = element(by.css('#txtU'));
|
|
||||||
var PasswordTextBox = element(by.css('#txtP'));
|
|
||||||
var LoginPageSubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)'));
|
|
||||||
var LoginPageSubTextTwo = element(by.css('.jmLoginMsg:nth-child(7) > .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 EC = protractor.ExpectedConditions;
|
|
||||||
var WhatDoYouWantToExplorePage = element(by.css('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(browser.params.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.createdUsername);
|
|
||||||
});
|
|
||||||
await NextButton.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
//Select Recovery Option
|
|
||||||
expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your');
|
|
||||||
expect(await PageTwoEmailButton.getText()).toEqual('Email');
|
|
||||||
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!');
|
|
||||||
expect(await NextButton.getText()).toEqual('Back To Login');
|
|
||||||
await NextButton.click().then(function() {
|
|
||||||
browser.sleep(5000);
|
|
||||||
});
|
|
||||||
await ClickHereLinkText.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?");
|
|
||||||
await UsernameTextBoxTwo.sendKeys(browser.params.createdUsername);
|
|
||||||
await NextButton.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your');
|
|
||||||
expect(await PageTwoSecurityQuestionButton.getText()).toEqual('Security Question');
|
|
||||||
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');
|
|
||||||
expect(await NextButton.getText()).toEqual('Login');
|
|
||||||
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);
|
|
||||||
});
|
|
||||||
expect(await NextButton.getText()).toEqual('Login');
|
|
||||||
await NextButton.click().then(function() {
|
|
||||||
browser.sleep(5000);
|
|
||||||
});
|
|
||||||
//What do you want to explore? (page)
|
|
||||||
browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage), 30000).then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
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 Metro Area');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function SignOut() {
|
|
||||||
it(': SignOut; should log out of journeysmap.', async function () {
|
|
||||||
var ProfileImage = element(by.css('.roundCenterBackground:nth-child(4)'));
|
|
||||||
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
|
|
||||||
|
|
||||||
await ProfileImage.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
await SignOutButton.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
browser.get(browser.params.login);
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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:nth-child(1)'));
|
|
||||||
var LoginPageSubTextTwo = element(by.css('.jmLoginMsg > .ng-scope'));
|
|
||||||
var NextButton = element(by.css('.btn'));
|
|
||||||
//Journeys Dashboard
|
|
||||||
var JourneysDashboardGreeting = element(by.css('.dropdown'));
|
|
||||||
var EC = protractor.ExpectedConditions;
|
|
||||||
var MyProgressWidgetGreeting = element(by.css('td > div:nth-child(2)'));
|
|
||||||
var MyProgressWiegetSubText = element(by.css('td > div:nth-child(3)'));
|
|
||||||
var FindMyPathButton = element(by.css('.btn-md'));
|
|
||||||
var VideoIcon = element(by.css('.fa-video'));
|
|
||||||
var CloseVideoXIcon = element(by.css('.close'));
|
|
||||||
|
|
||||||
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
|
|
||||||
await UsernameTextBox.sendKeys(browser.params.createdUsername);
|
|
||||||
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(5000);
|
|
||||||
});
|
|
||||||
//Dashboard
|
|
||||||
browser.waitForAngular();
|
|
||||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh');
|
|
||||||
browser.wait(EC.visibilityOf(MyProgressWidgetGreeting), 30000).then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
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.');
|
|
||||||
expect(await FindMyPathButton.getText()).toContain('Find My Path');
|
|
||||||
await VideoIcon.click().then(function() {
|
|
||||||
browser.sleep(5000);
|
|
||||||
});
|
|
||||||
await CloseVideoXIcon.click().then(function() {
|
|
||||||
browser.sleep(2500);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user