From f6eaf6b3611a081b61dd40dd526094b046693de9 Mon Sep 17 00:00:00 2001 From: Juan Huerta Date: Fri, 13 Nov 2020 12:30:27 -0800 Subject: [PATCH] Updated SignIn and SignOut calls --- beginCareerExplorationWidget_spec.js | 24 +++--- createJourney_spec.js | 117 +++++++++++++-------------- institutionsWidget_spec.js | 32 ++++---- interestSurveyResultsWidget_spec.js | 117 ++++++++++++++++----------- learnMorePage_spec.js | 29 ++++--- loginWithInstitution_spec.js | 10 +-- myCareersWidget_spec.js | 23 +++--- myJourneysWidget_spec.js | 28 +++---- myResourcesWidget_spec.js | 27 +++---- profileAndMyProgressWidgets_spec.js | 24 +++--- skillsMatcherResultsWidget_spec.js | 24 +++--- topCareerWidget_spec.js | 27 +++---- userProfile_spec.js | 20 ++--- 13 files changed, 256 insertions(+), 246 deletions(-) diff --git a/beginCareerExplorationWidget_spec.js b/beginCareerExplorationWidget_spec.js index dd68ff4..6a781a5 100644 --- a/beginCareerExplorationWidget_spec.js +++ b/beginCareerExplorationWidget_spec.js @@ -15,6 +15,10 @@ describe('Begin Career Exploration Widget 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)')); @@ -22,17 +26,15 @@ describe('Begin Career Exploration Widget 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'); @@ -41,7 +43,6 @@ describe('Begin Career Exploration Widget script', function () { }); } - //<<<>>> BeginCareerExplorationWidget(); //Sign Out*/ @@ -426,16 +427,13 @@ function BeginCareerExplorationWidget() { } 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); }); diff --git a/createJourney_spec.js b/createJourney_spec.js index ae06b5d..bdfec08 100644 --- a/createJourney_spec.js +++ b/createJourney_spec.js @@ -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); }); diff --git a/institutionsWidget_spec.js b/institutionsWidget_spec.js index 2b18ce1..d9a00b2 100644 --- a/institutionsWidget_spec.js +++ b/institutionsWidget_spec.js @@ -20,19 +20,21 @@ describe('Institutions Widget script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox) { - it('should sign into journeysmap.com', async function () { + it('SignIn, should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); var NextButton = element(by.css('.btn')); var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys(browser.params.username); - browser.sleep(1000); - await PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); + browser.sleep(1500); + await UserNameTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(1500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(1500); + }); await NextButton.click().then(function() { - browser.waitForAngular(); - browser.getCurrentUrl(); + browser.sleep(5000); }); expect(await JourneysGreeting.getText()).toContain('Hi, '); expect(await JourneysGreeting.getText()).toContain('_Automated'); @@ -53,7 +55,6 @@ function InstitutionsWidget() { var InstitutionsViewAllLink = element(by.css('#myInstitutionsCollapsed .text-color-7a')); var InstitutionsSearchResults = element(by.css('#divCSCSearchResult b')) var BackLink = element(by.css('.btn-primary-back-mod')); - var CloseXIcon = element(by.css('.close')); var UniversityOfSanDiego = element(by.xpath("//span[contains(.,'University of San Diego')]")); var UniversityOfSanDiegoAtAGlanceIcon = element(by.css('#territoryCardContainer > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div > div.territoryCardItemText.territoryCardMediaHide')); var UniversityOfSanDiegoBackOfCardTitle = element(by.css('#territoryCardTitleHeader > div.territoryCardTitleText.ng-binding')); @@ -167,12 +168,15 @@ function SignOut() { 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(); + browser.waitForAngular().then(function() { + browser.sleep(1000); + }); + await ProfileImage.click().then(function() { + browser.sleep(1000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + await SignOutButton.click().then(function() { browser.sleep(2500); }); diff --git a/interestSurveyResultsWidget_spec.js b/interestSurveyResultsWidget_spec.js index 8d0e25f..cbcf1ba 100644 --- a/interestSurveyResultsWidget_spec.js +++ b/interestSurveyResultsWidget_spec.js @@ -15,6 +15,10 @@ describe('Interest Survey Results Widget 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)')); @@ -22,17 +26,15 @@ describe('Interest Survey Results Widget 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'); @@ -41,7 +43,6 @@ describe('Interest Survey Results Widget Script', function () { }); } - //<<<>>> InterestSurveyResultsWidget(); InterestSurveyResultsWidgetRetake(); InterestSurveyResultsWidgetEdit(); @@ -130,6 +131,7 @@ function InterestSurveyResultsWidgetRetake() { var CancelTestButton = element(by.css('.btn-md')); var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); var DashboardHeaderLink = element(by.css('.navbar-brand > img')); + var MyCareersWidgetTitle = element(by.css('.fullHeight > .jrnys_lead-body-copy')); var AdministrativeLawJudgesAdjudicatorsAndHearingOfficers = element(by.xpath('//div[3]/div/div[2]/span')); var AdministrativeServicesManagers = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); var AirTrafficControllers = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); @@ -207,8 +209,9 @@ function InterestSurveyResultsWidgetRetake() { await LoveItEmoji.click(); await LikeItEmoji.click(); await LoveItEmoji.click(); - await LikeItEmoji.click();//60 - browser.sleep(5000); + await LikeItEmoji.click().then(function() { + browser.sleep(5000); + }); expect(await PageTitle.getText()).toEqual('Interest Survey Results'); browser.sleep(5000); await DashboardHeaderLink.click().then(function() { @@ -217,6 +220,7 @@ function InterestSurveyResultsWidgetRetake() { browser.executeScript('window.scrollTo(0, 1250);').then(function() { browser.sleep(5000); }); + expect(await MyCareersWidgetTitle.getText()).toEqual('1'); expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).not.toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); expect(await AdministrativeServicesManagers.getText()).not.toEqual('Administrative Services Managers'); expect(await AirTrafficControllers.getText()).not.toEqual('Air Traffic Controllers'); @@ -248,6 +252,7 @@ function InterestSurveyResultsWidgetEdit() { var EditConventionalTextBox = element(by.id('Conventional')); var EditConventionalDescription = element(by.css('.ng-scope:nth-child(6) .color3a-color')); var EditInterestSurveyDIVSaveButton = element(by.css('.btn-info:nth-child(2)')); + var MyCareersWidgetTitle = element(by.css('.fullHeight > .jrnys_lead-body-copy')); var AdministrativeLawJudgesAdjudicatorsAndHearingOfficers = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); var AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtAGlanceIcon = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer > div > div > div .territoryCardItemText')); var AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtBestFitIcon = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer .ng-scope > div > div:nth-child(1) > .territoryCardItemText')); @@ -289,41 +294,50 @@ function InterestSurveyResultsWidgetEdit() { expect(await EditInterestDIVTitle.getText()).toEqual('Interests'); expect(await EditRealisticTitle.getText()).toEqual('Realistic'); await EditRealisticTextBox.clear(); - await EditRealisticTextBox.sendKeys('21'); + await EditRealisticTextBox.sendKeys('21').then(function() { + browser.sleep(1000); + }); //await EditRealisticTextBox.sendKeys(protractor.Key.CONTROL, "a", protractor.Key.DELETE).sendKeys('21').sendKeys(protractor.Key.TAB); SAMPLE - browser.sleep(1000); expect(await EditRealisticDescription.getText()).toEqual('You see things as they are and rely most heavily on your sense of sight and touch.'); expect(await EditInvestigativeTitle.getText()).toEqual('Investigative'); await EditInvestigaviveTextBox.clear(); - await EditInvestigaviveTextBox.sendKeys('25'); - browser.sleep(1000); + await EditInvestigaviveTextBox.sendKeys('25').then(function() { + browser.sleep(1000); + }); expect(await EditInvestigativeDescription.getText()).toEqual('You’re a super sleuth who loves to solve math and science problems.'); expect(await EditArtisticTitle.getText()).toEqual('Artistic'); await EditArtisticTextBox.clear(); - await EditArtisticTextBox.sendKeys('17'); - browser.sleep(1000); + await EditArtisticTextBox.sendKeys('17').then(function() { + browser.sleep(1000); + }); expect(await EditArtisticDescription.getText()).toEqual('Your electives are full of art, drama, creative writing, and music classes.'); expect(await EditSocialTitle.getText()).toEqual('Social'); await EditSocialTextBox.clear(); - await EditSocialTextBox.sendKeys('22'); - browser.sleep(1000); + await EditSocialTextBox.sendKeys('22').then(function() { + browser.sleep(1000); + }); expect(await EditSocialDescription.getText()).toEqual('You’re a friend to everyone. You like to help, interact and share information.'); expect(await EditEnterprisingTitle.getText()).toEqual('Enterprising'); await EditEnterprisingTextBox.clear(); - await EditEnterprisingTextBox.sendKeys('27'); - browser.sleep(1000); + await EditEnterprisingTextBox.sendKeys('27').then(function() { + browser.sleep(1000); + }); expect(await EditEnterprisingDescription.getText()).toEqual('You’re persuasive and could sell just about anything to anyone.'); expect(await EditConventionalTitle.getText()).toEqual('Conventional'); await EditConventionalTextBox.clear(); - await EditConventionalTextBox.sendKeys('23'); - browser.sleep(1000); - expect(await EditConventionalDescription.getText()).toEqual('People might call you TYPE A, but they’re just jealous of your ability to get things done.'); - browser.sleep(1000); - await EditInterestSurveyDIVSaveButton.click(); - browser.sleep(1000); + await EditConventionalTextBox.sendKeys('23').then(function() { + browser.sleep(1000); + }); + expect(await EditConventionalDescription.getText()).toEqual('People might call you TYPE A, but they’re just jealous of your ability to get things done.').then(function() { + browser.sleep(1000); + }); + await EditInterestSurveyDIVSaveButton.click().then(function() { + browser.sleep(1000); + }); browser.executeScript('window.scrollTo(0, 1250);').then(function() { browser.sleep(5000); }); + expect(await MyCareersWidgetTitle.getText()).toEqual('1'); expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtAGlanceIcon.getText()).toContain('At a'); expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtAGlanceIcon.getText()).toContain('Glance'); @@ -354,32 +368,39 @@ function InterestSurveyResultsWidgetEdit() { expect(await TopTraitsDescriptionSix.getText()).toEqual('People who are creative, intuitive, sensitive, articulate, expressive, unstructured, original, nonconforming, and innovative who rely on feelings, imagination, inspiration and who are spontaneous and open-minded. They prefer to work with ideas, abstractions, and concepts. They also enjoy work that is literary, verbal, visual and aesthetic. They typically excel in art, music, dance, drawing, painting, sculpting, drafting, writing, drama, communicating, design, fashion.'); await ShareResultsIcon.click(); expect(await ShareResultsDIVTitle.getText()).toEqual('Email Your Results'); - await SendButton.click(); - browser.sleep(1000); + await SendButton.click().then(function() { + browser.sleep(1000); + }); expect(await DIVAlertTitle.getText()).toEqual('No Email'); expect(await DIVAlertMessage.getText()).toEqual('Please provide at least one email address to send.'); - await DIVOKButton.click(); - browser.waitForAngular(); + await DIVOKButton.click().then(function() { + browser.waitForAngular(); + }); await ToTextBox.sendKeys('jhuerta@edmin'); - await SendButton.click(); - browser.sleep(1000); + await SendButton.click().then(function() { + browser.sleep(1000); + }); expect(await DIVAlertTitle.getText()).toEqual('Invalid Email'); expect(await DIVAlertMessage.getText()).toEqual('jhuerta@edmin is not a valid email address.'); - await DIVOKButton.click(); - browser.sleep(1000); + await DIVOKButton.click().then(function() { + browser.sleep(1000); + }); await CancelButton.click(); /*browser.waitForAngular();//INCONSISTENT await ShareResultsIcon.click(); await FromTextBox.clear(); await FromTextBox.sendKeys("Juan's Automated Regression"); - await ToTextBox.sendKeys('jhuerta@edmin.com'); - browser.sleep(1000); - await SendButton.click(); - browser.sleep(2500); + await ToTextBox.sendKeys('jhuerta@edmin.com').then(function() { + browser.sleep(1000); + }); + await SendButton.click().then(function() { + browser.sleep(25000); + }); await expect(DIVAlertTitle.getText()).toEqual('Your interest survey results are in flight!'); await expect(DIVAlertMessage.getText()).toEqual('Trouble receiving the email? Have your recipient check their spam folder for an email from hi@journeysmap.com'); - await DIVOKButton.click(); - browser.waitForAngular(); + await DIVOKButton.click().then(function() { + browser.waitForAngular(); + }); browser.wait(EC.elementToBeClickable(ShareResultsIcon));*/ browser.waitForAngular(); browser.getCurrentUrl(); @@ -671,8 +692,8 @@ function InterestSurveyResultsWidgetResults() { expect(await HydroelectricProductionManagersEllipsisAtAGlanceIcon.getText()).toEqual('At A Glance'); await HydroelectricProductionManagersEllipsisJourneymanIcon.click().then(function() { browser.sleep(5000); + browser.waitForAngular(); }); - browser.waitForAngular(); browser.wait(EC.elementToBeClickable(HydroelectricProductionManagersJourneyInfoIcon)); browser.waitForAngular(); browser.getCurrentUrl(); @@ -745,9 +766,9 @@ function InterestSurveyResultsCreateJourney() { expect(await JourneyResultTitleOne.getText()).toEqual('9 to Hydroelectric Production Managers through Business Administration B.A./B.S.'); await DashboardHeaderLink.click().then(function() { browser.sleep(5000); + browser.waitForAngular(); + browser.getCurrentUrl(); }); - browser.waitForAngular(); - browser.getCurrentUrl(); }); } @@ -908,12 +929,14 @@ function SignOut() { 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(); + browser.waitForAngular().then(function() { + browser.sleep(1000); + }); + await ProfileImage.click().then(function() { + browser.sleep(1000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); await SignOutButton.click().then(function() { browser.sleep(2500); }); diff --git a/learnMorePage_spec.js b/learnMorePage_spec.js index 516ad84..066ee7e 100644 --- a/learnMorePage_spec.js +++ b/learnMorePage_spec.js @@ -26,10 +26,12 @@ describe('Learn More Page script', function () { var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys(browser.params.username); - browser.sleep(1000); - await PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); + await UserNameTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(2500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(1000); + }); await NextButton.click().then(function() { browser.waitForAngular(); browser.getCurrentUrl(); @@ -581,8 +583,9 @@ function LearnMorePage() { }); expect(await ChangeLocationDIVTitle.getText()).toEqual('Change Location'); expect(await ChangeLocationDIVSubTitle.getText()).toEqual("Let's search the location you're most interested in."); - await ChnageLocationEnterZipCodeTextBox.sendKeys('85013'); - browser.sleep(1000); + await ChnageLocationEnterZipCodeTextBox.sendKeys('85013').then(function() { + browser.sleep(1000); + }); element(by.cssContainingText('option', '1000')).click().then(function() { browser.sleep(2500); }); @@ -790,12 +793,14 @@ function SignOut() { 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(); + browser.waitForAngular().then(function() { + browser.sleep(1000); + }); + await ProfileImage.click().then(function() { + browser.sleep(1000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); await SignOutButton.click().then(function() { browser.sleep(2500); }); diff --git a/loginWithInstitution_spec.js b/loginWithInstitution_spec.js index 50dfbd8..bc73083 100644 --- a/loginWithInstitution_spec.js +++ b/loginWithInstitution_spec.js @@ -145,17 +145,16 @@ describe('Login With Institution Script', function () { expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); await NextButton.click().then(function() { - browser.sleep(2500); + browser.sleep(5000); }); //Journeys Dashboard browser.waitForAngular(); - expect(await JourneysDashboardGreeting.getText()).toContain('Hi, '); - expect(await JourneysDashboardGreeting.getText()).toContain('_Automated'); - browser.sleep(2500); + browser.getCurrentUrl(); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Good'); }); } - //Action Calls + //Sign Out*/ SignOut(); }); @@ -164,7 +163,6 @@ function SignOut() { var ProfileImage = element(by.css('.roundCenterBackgroundImage')); var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn')); - browser.waitForAngular(); await ProfileImage.click().then(function() { browser.sleep(1000); }); diff --git a/myCareersWidget_spec.js b/myCareersWidget_spec.js index 5805016..2e3ecec 100644 --- a/myCareersWidget_spec.js +++ b/myCareersWidget_spec.js @@ -15,6 +15,10 @@ describe('My Careers Widget 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)')); @@ -22,17 +26,15 @@ describe('My Careers Widget 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'); @@ -527,16 +529,13 @@ function MyCareersWidget() { } 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); }); diff --git a/myJourneysWidget_spec.js b/myJourneysWidget_spec.js index 2f49f2c..28de673 100644 --- a/myJourneysWidget_spec.js +++ b/myJourneysWidget_spec.js @@ -20,19 +20,21 @@ describe('My Journeys Widget script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox) { - it('should sign into journeysmap.com', async function () { + it('SignIn, should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); var NextButton = element(by.css('.btn')); var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys(browser.params.username); - browser.sleep(1000); - await PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); + browser.sleep(1500); + await UserNameTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(1500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(1500); + }); await NextButton.click().then(function() { - browser.waitForAngular(); - browser.getCurrentUrl(); + browser.sleep(5000); }); expect(await JourneysGreeting.getText()).toContain('Hi, '); expect(await JourneysGreeting.getText()).toContain('_Automated'); @@ -400,18 +402,14 @@ function MyJourneysPage() { browser.getCurrentUrl(); }); } - 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); }); diff --git a/myResourcesWidget_spec.js b/myResourcesWidget_spec.js index bd3b7df..65bfb2c 100644 --- a/myResourcesWidget_spec.js +++ b/myResourcesWidget_spec.js @@ -20,19 +20,21 @@ describe('My Resources Widget script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox) { - it('should sign into journeysmap.com', async function () { + it('SignIn, should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); var NextButton = element(by.css('.btn')); var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys(browser.params.username); - browser.sleep(1000); - await PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); + browser.sleep(1500); + await UserNameTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(1500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(1500); + }); await NextButton.click().then(function() { - browser.waitForAngular(); - browser.getCurrentUrl(); + browser.sleep(5000); }); expect(await JourneysGreeting.getText()).toContain('Hi, '); expect(await JourneysGreeting.getText()).toContain('_Automated'); @@ -83,16 +85,13 @@ function MyResourcesWidget() { } 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); }); diff --git a/profileAndMyProgressWidgets_spec.js b/profileAndMyProgressWidgets_spec.js index 33bbada..1a832be 100644 --- a/profileAndMyProgressWidgets_spec.js +++ b/profileAndMyProgressWidgets_spec.js @@ -15,6 +15,10 @@ describe('Profile And My Progress Widget Scripts', 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)')); @@ -22,17 +26,15 @@ describe('Profile And My Progress Widget Scripts', 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'); @@ -41,7 +43,6 @@ describe('Profile And My Progress Widget Scripts', function () { }); } - //<<<>>> ProfileWidget(); MyProgressWidget(); @@ -436,16 +437,13 @@ function MyProgressWidget() { } 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); }); diff --git a/skillsMatcherResultsWidget_spec.js b/skillsMatcherResultsWidget_spec.js index 1e8aa1b..78e2309 100644 --- a/skillsMatcherResultsWidget_spec.js +++ b/skillsMatcherResultsWidget_spec.js @@ -15,6 +15,10 @@ describe('Skills Matcher Results Widget 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)')); @@ -22,17 +26,15 @@ describe('Skills Matcher Results Widget 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'); @@ -41,7 +43,6 @@ describe('Skills Matcher Results Widget Script', function () { }); } - //<<<>>> SkillsMatcherResultsWidget(); SkillsMatcherRetake(); SkillsMatcherCareerExploration(); @@ -721,16 +722,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); }); diff --git a/topCareerWidget_spec.js b/topCareerWidget_spec.js index 63fa32a..15b875e 100644 --- a/topCareerWidget_spec.js +++ b/topCareerWidget_spec.js @@ -22,19 +22,21 @@ describe('Top Career Widget script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox) { - it('should sign into journeysmap.com', async function () { + it('SignIn, should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); var NextButton = element(by.css('.btn')); var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys(browser.params.username); - browser.sleep(1000); - await PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); + browser.sleep(1500); + await UserNameTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(1500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(1500); + }); await NextButton.click().then(function() { - browser.waitForAngular(); - browser.getCurrentUrl(); + browser.sleep(5000); }); expect(await JourneysGreeting.getText()).toContain('Hi, '); expect(await JourneysGreeting.getText()).toContain('_Automated'); @@ -953,16 +955,13 @@ function TopCareerWidget() { } 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); }); diff --git a/userProfile_spec.js b/userProfile_spec.js index 4969a19..da48683 100644 --- a/userProfile_spec.js +++ b/userProfile_spec.js @@ -20,24 +20,21 @@ describe('User Profile script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox) { - it('should sign into journeysmap.com', async function () { + it('SignIn, should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); var NextButton = element(by.css('.btn')); var JourneysGreeting = element(by.css('.dropdown')); - expect(await PageGreetingText.getText()).toEqual('Login and start exploring.').then(function() { - browser.sleep(2500); - }); + expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); + 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'); @@ -371,17 +368,12 @@ function UserProfile() { } 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().then(function() { - browser.sleep(1000); - }); await ProfileImage.click().then(function() { browser.sleep(1000); - browser.waitForAngular(); - browser.getCurrentUrl(); }); await SignOutButton.click().then(function() { browser.sleep(2500);