Updated SignIn and SignOut calls

This commit is contained in:
2020-11-13 12:30:27 -08:00
parent 9ead4d157f
commit f6eaf6b361
13 changed files with 256 additions and 246 deletions

View File

@@ -1,6 +1,6 @@
//createJourney_spec.js
const { EventEmitter } = require("selenium-webdriver");
//const { EventEmitter } = require("selenium-webdriver");
describe('Create Journey Script', function () {
//app-journeysmap landing page
@@ -17,6 +17,10 @@ describe('Create Journey Script', function () {
//Sign In
SignIn(UserNameTextBox, PasswordTextBox);
it('should have a title', async function () {
await expect(browser.getTitle()).toEqual('My Dashboard');
});
function SignIn(UserNameTextBox, PasswordTextBox) {
it('SignIn, should sign into journeysmap.com', async function () {
var PageGreetingText = element(by.css('td > div > div:nth-child(1)'));
@@ -24,17 +28,15 @@ describe('Create Journey Script', function () {
var JourneysGreeting = element(by.css('.dropdown'));
expect(await PageGreetingText.getText()).toEqual('Login and start exploring.');
browser.sleep(2500);
browser.sleep(1500);
await UserNameTextBox.sendKeys(browser.params.username).then(function() {
browser.sleep(2500);
browser.sleep(1500);
});
await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() {
browser.sleep(2500);
browser.sleep(1500);
});
await NextButton.click().then(function() {
browser.sleep(5000);
browser.waitForAngular();
browser.getCurrentUrl();
});
expect(await JourneysGreeting.getText()).toContain('Hi, ');
expect(await JourneysGreeting.getText()).toContain('_Automated');
@@ -55,8 +57,8 @@ function CreateJourney() {
it(': CreateJourney, should create a Journey to Top Interest Survey Result', async function () {
//Select Journey Occupation Card
var AdministrativeLawJudgesAdjudicatorsAndHearingOffices = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var AdministrativeServiceManagers = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));//qa #aa3ce6df-8851-4f10-8341-a4b7cdac7b7d //prod #c56626e4-2faa-4894-88bb-2ca8f4e44af8
var AdministrativeServiceManagersJourneyIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(3) .ng-scope:nth-child(1) > .ng-scope:nth-child(1) > .ng-scope:nth-child(1)'));//qa #aa3ce6df-8851-4f10-8341-a4b7cdac7b7d //prod #c56626e4-2faa-4894-88bb-2ca8f4e44af8
var AdministrativeServiceManagers = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var AdministrativeServiceManagersJourneyIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(3) .ng-scope:nth-child(1) > .ng-scope:nth-child(1) > .ng-scope:nth-child(1)'));
var AirTrafficControllers = element(by.css('#\\30 2c1f459-be14-4ea7-8229-404af8ccb881 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var MultipleClusterDIVTitle = element(by.css('.ng-scope > .territoryCardTitleText'));
var BusinessManagementAndAdministration = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) .ng-scope > div > .territoryCardTitleText > .ng-binding'));
@@ -210,7 +212,7 @@ function CreateJourney() {
var JourneyStopDIVAddedStopThree = element(by.css('.item:nth-child(3) .waypointCardTitle:nth-child(1) > .ng-binding:nth-child(1)'));
var JourneyStopDIVAddedStopFour = element(by.css('.item:nth-child(3) > .col-xs-6:nth-child(2) .waypointCardTitle:nth-child(1) > .ng-binding:nth-child(1)'));
var JourneyStopDIVBottomPanelLeftArrowIcon = element(by.css('#addWaypointsModalAddedWaypointsCarousel > .left > .glyphicon'));
var JourneyStopDIVRemoveCardOneButton = element(by.css('.item:nth-child(2) > .col-xs-6:nth-child(1) .waypointNotAdded > .ng-binding'));//#addWaypointsModalAddedWaypointsCarousel > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(2) > waypoint-card > div > div > div.waypointNotAdded > div'));
var JourneyStopDIVRemoveCardOneButton = element(by.css('.item:nth-child(2) > .col-xs-6:nth-child(1) .waypointNotAdded > .ng-binding'));
var JourneyStopDIVAddToJourneyButton = element(by.css('.btn:nth-child(2)'));
//Saved Journey
var JournyeStopDIVGotItDIVText = element(by.css('.tooltip-inner'));
@@ -626,13 +628,13 @@ function CreateJourney() {
expect(await JobPrepFilterButton.getText()).toEqual('Job Prep');
expect(await FitFilterButton.getText()).toEqual('Fit');
expect(await CategoryFilterButton.getText()).toEqual('Category');
expect(await DefaultTabResultsPathOne.getText()).toEqual('STEM > Engineering & Technology >');
expect(await DefaultTabResultsPathOne.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsChildOne.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Healthcare > Health Informatics >');
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathThree.getText()).toEqual('Healthcare > Health Informatics >');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Engineering & Technology >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Architecture > Construction >');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Agriculture > Natural Resources Systems >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Engineering Technicians, Except Drafters, All Other');
expect(await ResultsTabTwo.getText()).toEqual('College');
await ResultsTabTwo.click().then(function() {
@@ -652,17 +654,17 @@ function CreateJourney() {
});
expect(await TabThreeResultsPathOne.getText()).toEqual('Advanced > Other Certifications >');
expect(await TabThreeResultsChildOne.getText()).toEqual('Structural Engineer');
expect(await TabThreeResultsPathTwo.getText()).toEqual('Financial & Investment Planning > Advanced >');
expect(await TabThreeResultsChildTwo.getText()).toEqual('Association of Energy Engineers');
expect(await TabThreeResultsPathThree.getText()).toEqual('Production > Advanced >');
expect(await TabThreeResultsPathTwo.getText()).toEqual('Advanced > International Fluid Power Society >');
expect(await TabThreeResultsChildTwo.getText()).toEqual('Fluid Power Engineer');
expect(await TabThreeResultsPathThree.getText()).toEqual('Business Financial Mgmt & Acctg > Advanced >');
expect(await TabThreeResultsChildThree.getText()).toEqual('Association of Energy Engineers');
expect(await TabThreeResultsPathFour.getText()).toEqual('Manufacturing Process Development > Advanced >');
expect(await TabThreeResultsPathFour.getText()).toEqual('Management > Advanced >');
expect(await TabThreeResultsChildFour.getText()).toEqual('Association of Energy Engineers');
expect(await ResultsTabFour.getText()).toEqual('K-12');
await ResultsTabFour.click().then(function() {
browser.sleep(5000);
});
expect(await TabFourResultsPathOne.getText()).toEqual('5 > Science >');
expect(await TabFourResultsPathOne.getText()).toEqual('1 > Science >');
expect(await TabFourResultsChildOne.getText()).toEqual('ENGINEERING DESIGN');
expect(await TabFourResultsPathTwo.getText()).toEqual('Science > ENGINEERING DESIGN >');
expect(await TabFourResultsChildTwo.getText()).toEqual('Engineering Design');
@@ -674,26 +676,26 @@ function CreateJourney() {
await ResultsTabFive.click().then(function() {
browser.sleep(5000);
});
expect(await TabFiveResultsPathOne.getText()).toEqual('Engineering Aid > Architecture >');//Engineer Senior Sergeant > Architecture >');
expect(await TabFiveResultsChildOne.getText()).toEqual('Civil Engineering Technicians');
expect(await TabFiveResultsPathTwo.getText()).toEqual('Construction Engineering Supervisor > Architecture >');//General Engineering Supervisor > Architecture >');
expect(await TabFiveResultsPathOne.getText()).toEqual('Precision Measurement Equipment Laboratory > Manufacturing >');
expect(await TabFiveResultsChildOne.getText()).toEqual('Mechanical Engineering Technicians');
expect(await TabFiveResultsPathTwo.getText()).toEqual('Construction Engineering Supervisor > Architecture >');
expect(await TabFiveResultsChildTwo.getText()).toEqual('Civil Engineering Technicians');
expect(await TabFiveResultsPathThree.getText()).toEqual('General Engineering Supervisor > Architecture >');//Special Forces Engineer Sergeant > Architecture >');
expect(await TabFiveResultsPathThree.getText()).toEqual('Bridge Crewmember > Architecture >');
expect(await TabFiveResultsChildThree.getText()).toEqual('Civil Engineering Technicians');
expect(await TabFiveResultsPathFour.getText()).toEqual('Engineer Senior Sergeant > Architecture >');
expect(await TabFiveResultsPathFour.getText()).toEqual('Technical Engineer > Architecture >');
expect(await TabFiveResultsChildFour.getText()).toEqual('Civil Engineering Technicians');
expect(await ResultsTabSix.getText()).toEqual('CTE');
await ResultsTabSix.click().then(function() {
browser.sleep(5000);
});
expect(await TabSixResultsPathOne.getText()).toEqual('Service and Repair Equipment > Service and repair the components of internal combustion engines using procedures for troubleshooting and evaluating performance. >');//Demonstrate Installation Tools > Demonstrate generating technical documentation. >');
expect(await TabSixResultsChildOne.getText()).toEqual('Identify engine systems and components.');//Demonstrate the ability to document engineering changes.');
expect(await TabSixResultsPathTwo.getText()).toEqual('Demonstrate Installation Tools > Demonstrate generating technical documentation. >');
expect(await TabSixResultsChildTwo.getText()).toEqual('Demonstrate the ability to document engineering changes.');
expect(await TabSixResultsPathThree.getText()).toEqual('Decision Making Information > Enhance usability of computer system operations. >');
expect(await TabSixResultsChildThree.getText()).toEqual('Explain usability engineering methods.');
expect(await TabSixResultsPathFour.getText()).toEqual('Service and Repair Equipment > Service and repair the components of internal combustion engines using procedures for troubleshooting and evaluating performance. >');
expect(await TabSixResultsChildFour.getText()).toEqual('Analyze and troubleshoot engines.');
expect(await TabSixResultsPathOne.getText()).toEqual('Service and Repair Equipment > Service and repair the components of internal combustion engines using procedures for troubleshooting and evaluating performance. >');
expect(await TabSixResultsChildOne.getText()).toEqual('Identify engine systems and components.');
expect(await TabSixResultsPathTwo.getText()).toEqual('Service and Repair Equipment > Service and repair the components of internal combustion engines using procedures for troubleshooting and evaluating performance. >');
expect(await TabSixResultsChildTwo.getText()).toEqual('Analyze and troubleshoot engines.');
expect(await TabSixResultsPathThree.getText()).toEqual('Demonstrate Installation Tools > Demonstrate generating technical documentation. >');
expect(await TabSixResultsChildThree.getText()).toEqual('Demonstrate the ability to document engineering changes.');
expect(await TabSixResultsPathFour.getText()).toEqual('Decision Making Information > Enhance usability of computer system operations. >');
expect(await TabSixResultsChildFour.getText()).toEqual('Explain usability engineering methods.');
await ResultsTabLeftArrow.click().then(function() {
browser.sleep(5000);
});
@@ -701,13 +703,13 @@ function CreateJourney() {
await DefaultResultsTab.click().then(function() {
browser.sleep(5000);
});
expect(await DefaultTabResultsPathOne.getText()).toEqual('STEM > Engineering & Technology >');
expect(await DefaultTabResultsPathOne.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsChildOne.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Healthcare > Health Informatics >');
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathThree.getText()).toEqual('Healthcare > Health Informatics >');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Engineering & Technology >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Engineers, All Other');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Architecture > Construction >');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Agriculture > Natural Resources Systems >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Engineering Technicians, Except Drafters, All Other');
expect(await MyResultsFilterButton.getText()).toEqual('My Results');
expect(await JobPrepFilterButton.getText()).toEqual('Job Prep');
@@ -728,12 +730,12 @@ function CreateJourney() {
});
expect(await DefaultTabResultsPathOne.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsChildOne.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Science & Math >');
expect(await DefaultTabResultsPathThree.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Marketing > Professional Sales & Marketing >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Sales Engineers');
await JobPrepFilterButton.click().then(function() {
browser.sleep(2500);
});
@@ -756,7 +758,7 @@ function CreateJourney() {
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Fire-Prevention and Protection Engineers');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Engineering & Technology >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Industrial Engineers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Marketing > Professional Sales & Marketing >');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Agriculture > Agribusiness Systems >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Sales Representatives, Wholesale and Manufacturing, Technical and Scientific Products');
await FitFilterButton.click().then(function() {
browser.sleep(2500);
@@ -776,12 +778,12 @@ function CreateJourney() {
});
expect(await DefaultTabResultsPathOne.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsChildOne.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Science & Math >');
expect(await DefaultTabResultsPathThree.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Marketing > Professional Sales & Marketing >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Sales Engineers');
await CategoryFilterButton.click().then(function() {
browser.sleep(2500);
});
@@ -801,12 +803,12 @@ function CreateJourney() {
});
expect(await DefaultTabResultsPathOne.getText()).toEqual('Architecture > Design/Pre-Construction >');
expect(await DefaultTabResultsChildOne.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsPathTwo.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildTwo.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathThree.getText()).toEqual('STEM > Science & Math >');
expect(await DefaultTabResultsPathThree.getText()).toEqual('IT > Programming & Software Development >');
expect(await DefaultTabResultsChildThree.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Public Administration > Planning >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Architectural and Engineering Managers');
expect(await DefaultTabResultsPathFour.getText()).toEqual('Marketing > Professional Sales & Marketing >');
expect(await DefaultTabResultsChildFour.getText()).toEqual('Sales Engineers');
browser.actions().mouseMove(ThirdResultViewOnMapIconIcon).perform().then(function() {
browser.sleep(1000);
});
@@ -926,8 +928,8 @@ function CreateJourney() {
expect(await AddedStopWayPointTopLevelTwo.getText()).toEqual('Advanced');
expect(await AddedStopWayPointClusterTwo.getText()).toEqual('Other Certifications');
expect(await AddedStopWayPointPathwayTwo.getText()).toEqual('Certified Legal Manager');
expect(await AddedStopWayPointTopLevelThree.getText()).toEqual('STEM');
expect(await AddedStopWayPointClusterThree.getText()).toEqual('Science & Math');
expect(await AddedStopWayPointTopLevelThree.getText()).toEqual('IT');
expect(await AddedStopWayPointClusterThree.getText()).toEqual('Programming & Software Development');
expect(await AddedStopWayPointPathwayThree.getText()).toEqual('Architectural and Engineering Managers');
expect(await AddedStopWayPointTopLevelFour.getText()).toEqual('College');
expect(await AddedStopWayPointClusterFour.getText()).toEqual('Administration');
@@ -1101,8 +1103,8 @@ function DeleteCreatedJourney() {
expect(await AddedStopWayPointTopLevelTwo.getText()).toEqual('Advanced');
expect(await AddedStopWayPointClusterTwo.getText()).toEqual('Other Certifications');
expect(await AddedStopWayPointPathwayTwo.getText()).toEqual('Certified Legal Manager');
expect(await AddedStopWayPointTopLevelThree.getText()).toEqual('STEM');
expect(await AddedStopWayPointClusterThree.getText()).toEqual('Science & Math');
expect(await AddedStopWayPointTopLevelThree.getText()).toEqual('IT');
expect(await AddedStopWayPointClusterThree.getText()).toEqual('Programming & Software Development');
expect(await AddedStopWayPointPathwayThree.getText()).toEqual('Architectural and Engineering Managers');
expect(await AddedStopWayPointTopLevelFour.getText()).toEqual('College');
expect(await AddedStopWayPointClusterFour.getText()).toEqual('Administration');
@@ -1162,16 +1164,13 @@ function DeleteCreatedJourney() {
}
function SignOut() {
it(': SignOut, should log out of journeysmap', async function () {
it(': SignOut; should log out of journeysmap.', async function () {
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
browser.waitForAngular();
browser.sleep(1000);
await ProfileImage.click();
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
await ProfileImage.click().then(function() {
browser.sleep(1000);
});
await SignOutButton.click().then(function() {
browser.sleep(2500);
});