Added QA & Prod variables
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
describe('Login With Institution Script', function () {
|
||||
|
||||
//Open browser
|
||||
browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login');
|
||||
browser.get(browser.params.login);
|
||||
|
||||
it('should have a title', async function () {
|
||||
await expect(browser.getTitle()).toEqual('Login');
|
||||
@@ -15,10 +15,10 @@ describe('Login With Institution Script', function () {
|
||||
var NextButton = element(by.css('.btn'));
|
||||
|
||||
//Sign Up
|
||||
SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton);
|
||||
LoginWithDuplicateAccount(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton);
|
||||
|
||||
function SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) {
|
||||
it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () {
|
||||
function LoginWithDuplicateAccount(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) {
|
||||
it(': Login; should attempt to log in with duplicate accont then reset new account password and complete Explore Careers task.', async function () {
|
||||
var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope'));
|
||||
var InstitutionTextBox = element(by.css('#txtZ'));
|
||||
var SubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)'));
|
||||
@@ -38,30 +38,45 @@ describe('Login With Institution Script', function () {
|
||||
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
|
||||
expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
|
||||
expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.');
|
||||
await UsernameTextBox.sendKeys('gnight147').then(function() {
|
||||
browser.sleep(2500);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(false);
|
||||
browser.sleep(1000);
|
||||
await UsernameTextBox.sendKeys(browser.params.userName).then(function() {
|
||||
browser.sleep(1000);
|
||||
UsernameTextBox.sendKeys(protractor.Key.TAB);
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
});
|
||||
await PasswordTextBox.sendKeys('EDmin').then(function() {
|
||||
browser.sleep(2500);
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
await InstitutionTextBox.sendKeys('j').then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
await InstitutionTextBox.sendKeys('o').then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(InstitutionDropDownList.isDisplayed()).toBe(true);
|
||||
});
|
||||
await InstitutionTextBox.sendKeys('in').then(function() {
|
||||
expect(InstitutionDropDownList.isDisplayed()).toBe(true);
|
||||
await InstitutionTextBox.sendKeys('rn').then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
await InstitutionTextBox.clear();
|
||||
await InstitutionTextBox.sendKeys('jour').then(function() {
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
await InstitutionTextBox.sendKeys('journeys').then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(InstitutionDropDownList.isDisplayed()).toBe(true);
|
||||
});
|
||||
await InstitutionDropDownList.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
browser.sleep(1000);
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
await NextButton.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
@@ -77,23 +92,29 @@ describe('Login With Institution Script', function () {
|
||||
await ResetPasswordUsernameTextBox.sendKeys('jhuerta').then(function() {
|
||||
browser.sleep(2500);
|
||||
});
|
||||
expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
|
||||
await NextButton.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
});
|
||||
expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
|
||||
expect(ResetPasswordInstitutionTextBox.isDisplayed()).toBe(false);
|
||||
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(1000);
|
||||
await ResetPasswordUsernameTextBox.sendKeys(browser.params.userName).then(function() {
|
||||
browser.sleep(1000);
|
||||
});
|
||||
expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
|
||||
await NextButton.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
});
|
||||
expect(ResetPasswordInstitutionTextBox.isDisplayed()).toBe(true);
|
||||
expect(browser.isElementPresent(ResetPasswordValidationMessage)).toBe(false);
|
||||
});
|
||||
expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?");
|
||||
await ResetPasswordInstitutionTextBox.sendKeys('journeys').then(function() {
|
||||
browser.sleep(2000);
|
||||
browser.sleep(2500);
|
||||
expect(ResetPasswordInstitutionDropDownList.isDisplayed()).toBe(true);
|
||||
});
|
||||
await ResetPasswordInstitutionDropDownList.click().then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
await NextButton.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
@@ -101,33 +122,40 @@ describe('Login With Institution Script', function () {
|
||||
expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?");
|
||||
expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com.");
|
||||
await CloseIcon.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
browser.sleep(1000);
|
||||
});
|
||||
//Back to Login Page
|
||||
expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.');
|
||||
expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here.");
|
||||
expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.');
|
||||
await UsernameTextBox.sendKeys('gnight147').then(function() {
|
||||
browser.sleep(2500);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(false);
|
||||
await UsernameTextBox.sendKeys(browser.params.userName).then(function() {
|
||||
browser.sleep(1000);
|
||||
});
|
||||
await PasswordTextBox.sendKeys('EDmin123').then(function() {
|
||||
browser.sleep(2500);
|
||||
browser.sleep(1000);
|
||||
});
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
expect(InstitutionTextBox.isDisplayed()).toBe(true);
|
||||
await InstitutionTextBox.sendKeys('journeys').then(function() {
|
||||
browser.sleep(2500);
|
||||
browser.sleep(1000);
|
||||
expect(InstitutionDropDownList.isDisplayed()).toBe(true);
|
||||
});
|
||||
await InstitutionDropDownList.click().then(function() {
|
||||
browser.sleep(1000);
|
||||
expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false);
|
||||
});
|
||||
await NextButton.click().then(function() {
|
||||
browser.sleep(2500);
|
||||
});
|
||||
//Journeys Dashboard
|
||||
browser.waitForAngular();
|
||||
expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Good');
|
||||
expect(await JourneysDashboardGreeting.getText()).toContain('Hi, ');
|
||||
browser.sleep(2500);
|
||||
});
|
||||
}
|
||||
|
||||
//Action Calls
|
||||
//SignOut();
|
||||
SignOut();
|
||||
});
|
||||
|
||||
function SignOut() {
|
||||
|
||||
Reference in New Issue
Block a user