Corrected Username

This commit is contained in:
2020-12-15 12:26:47 -08:00
parent 2f9e3bc6f8
commit 508c1ec828

View File

@@ -5,7 +5,7 @@ describe('Create Account script', function () {
var FirstNameTextBox = element(by.css('#txtFirstName')); var FirstNameTextBox = element(by.css('#txtFirstName'));
var LastNameTextBox = element(by.css('#txtLastName')); var LastNameTextBox = element(by.css('#txtLastName'));
var EmailTextBox = element(by.css('#txtEmail')); var EmailTextBox = element(by.css('#txtEmail'));
var UserNameTextBox = element(by.css('#txtUsername')); var UsernameTextBox = element(by.css('#txtUsername'));
//Open browser //Open browser
browser.get(browser.params.signup); browser.get(browser.params.signup);
@@ -15,13 +15,13 @@ describe('Create Account script', function () {
}); });
//Sign Up //Sign Up
SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UserNameTextBox); SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox);
it('should have a title', async function () { it('should have a title', async function () {
await expect(browser.getTitle()).toEqual('Home | Journeys'); await expect(browser.getTitle()).toEqual('Home | Journeys');
}); });
function SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UserNameTextBox) { function SignUp(FirstNameTextBox, LastNameTextBox, EmailTextBox, UsernameTextBox) {
it('OnBoarding; should complete the OnBoarding process and create a new account.', async function () { it('OnBoarding; should complete the OnBoarding process and create a new account.', async function () {
//Page 1 - First & Last Name //Page 1 - First & Last Name
var EC = protractor.ExpectedConditions; var EC = protractor.ExpectedConditions;
@@ -134,7 +134,7 @@ describe('Create Account script', function () {
browser.sleep(1000); browser.sleep(1000);
}); });
expect(await PageTwoAltGreetingText.getText()).toEqual("Let's make a username!"); expect(await PageTwoAltGreetingText.getText()).toEqual("Let's make a username!");
await UserNameTextBox.sendKeys('JHZ').then(function() { await UsernameTextBox.sendKeys('JHZ').then(function() {
browser.sleep(1000); browser.sleep(1000);
}); });
expect(await PageTwoAltSubText.getText()).toEqual('Create an account with your email instead.'); expect(await PageTwoAltSubText.getText()).toEqual('Create an account with your email instead.');
@@ -298,7 +298,7 @@ describe('Create Account script', function () {
function Login() { function Login() {
it(': Login; should attempt to log in, then 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('.jmLoginTitle > .ng-scope')); var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope'));
var UserNameTextBoxOne = element(by.css('#txtU')); var UsernameTextBoxOne = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));
var LoginPageSubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)')); 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 LoginPageSubTextTwo = element(by.css('.jmLoginMsg:nth-child(7) > .ng-scope'));
@@ -306,7 +306,7 @@ function Login() {
var ValidationText = element(by.css('.ng-binding:nth-child(1)')); var ValidationText = element(by.css('.ng-binding:nth-child(1)'));
var PasswordEyeIcon = element(by.css('.fa-eye')); var PasswordEyeIcon = element(by.css('.fa-eye'));
var ClickHereLinkText = element(by.css('.ng-scope > a')); var ClickHereLinkText = element(by.css('.ng-scope > a'));
var UserNameTextBoxTwo = element(by.css('#txtUsername')); var UsernameTextBoxTwo = element(by.css('#txtUsername'));
//Account Recovery //Account Recovery
var PageGreetingText = element(by.css('.jmLoginTitle')); var PageGreetingText = element(by.css('.jmLoginTitle'));
var PageOneValidationText = element(by.css('.jmLoginMsg')); var PageOneValidationText = element(by.css('.jmLoginMsg'));
@@ -334,7 +334,7 @@ function Login() {
browser.get(browser.params.login); browser.get(browser.params.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 UserNameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com'); await UsernameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com');
await PasswordTextBox.sendKeys('edmin123').then(function() { await PasswordTextBox.sendKeys('edmin123').then(function() {
browser.sleep(1000); browser.sleep(1000);
}); });
@@ -359,14 +359,14 @@ function Login() {
}); });
//Account Recovery //Account Recovery
expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?");
await UserNameTextBoxTwo.sendKeys('AutomatedTest332020913@edmin.com'); await UsernameTextBoxTwo.sendKeys('AutomatedTest332020913@edmin.com');
await NextButton.click().then(function() { await NextButton.click().then(function() {
browser.sleep(2500); 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."); 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() { await UsernameTextBoxTwo.clear().then(function() {
browser.sleep(1000); browser.sleep(1000);
UserNameTextBoxTwo.sendKeys(browser.params.createdUsername); UsernameTextBoxTwo.sendKeys(browser.params.createdUsername);
}); });
await NextButton.click().then(function() { await NextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
@@ -387,7 +387,7 @@ function Login() {
browser.sleep(2500); browser.sleep(2500);
}); });
expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?");
await UserNameTextBoxTwo.sendKeys(browser.params.createdUsername); await UsernameTextBoxTwo.sendKeys(browser.params.createdUsername);
await NextButton.click().then(function() { await NextButton.click().then(function() {
browser.sleep(2500); browser.sleep(2500);
}); });
@@ -476,7 +476,7 @@ function SignOut() {
function LoginWithNewPassword() { function LoginWithNewPassword() {
it(': LoginWithNewPassword; 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 LoginPageGreetingText = element(by.css('td > div > div:nth-child(1)'));
var UserNameTextBox = element(by.css('#txtU')); var UsernameTextBox = element(by.css('#txtU'));
var PasswordTextBox = element(by.css('#txtP')); var PasswordTextBox = element(by.css('#txtP'));
var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div:nth-child(1)')); var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div:nth-child(1)'));
var LoginPageSubTextTwo = element(by.css('.jmLoginMsg > .ng-scope')); var LoginPageSubTextTwo = element(by.css('.jmLoginMsg > .ng-scope'));
@@ -491,7 +491,7 @@ function LoginWithNewPassword() {
var CloseVideoXIcon = element(by.css('.close')); var CloseVideoXIcon = element(by.css('.close'));
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
await UserNameTextBox.sendKeys(browser.params.createdUsername); await UsernameTextBox.sendKeys(browser.params.createdUsername);
await PasswordTextBox.sendKeys(browser.params.password).then(function() { await PasswordTextBox.sendKeys(browser.params.password).then(function() {
browser.sleep(1000); browser.sleep(1000);
}); });