From 6c48312066eaf0258f92e6c2016f37e8c36022db Mon Sep 17 00:00:00 2001 From: Juan Huerta Date: Thu, 16 Jul 2020 09:40:54 -0700 Subject: [PATCH] Updated to include mapObjectID --- createAccount_config.js | 3 +- ...rdOne_config.js => createJourney_config.js | 5 +- createJourney_spec.js | 647 +++++++ dashboardOne_spec.js | 1536 ----------------- interestSurveyResultsWidget_config.js | 30 + interestSurveyResultsWidget_spec.js | 702 ++++++++ journeysmap_spec.js | 38 +- loginWithInstitution_config.js | 43 + loginWithInstitution_spec.js | 477 +++++ myCareersWidget_config.js | 30 + myCareersWidget_spec.js | 435 +++++ profileAndMyProgress_config.js | 30 + profileAndMyProgress_spec.js | 218 +++ 13 files changed, 2636 insertions(+), 1558 deletions(-) rename dashboardOne_config.js => createJourney_config.js (84%) create mode 100644 createJourney_spec.js delete mode 100644 dashboardOne_spec.js create mode 100644 interestSurveyResultsWidget_config.js create mode 100644 interestSurveyResultsWidget_spec.js create mode 100644 loginWithInstitution_config.js create mode 100644 loginWithInstitution_spec.js create mode 100644 myCareersWidget_config.js create mode 100644 myCareersWidget_spec.js create mode 100644 profileAndMyProgress_config.js create mode 100644 profileAndMyProgress_spec.js diff --git a/createAccount_config.js b/createAccount_config.js index 6e0227e..6047094 100644 --- a/createAccount_config.js +++ b/createAccount_config.js @@ -1,4 +1,4 @@ -// config.js +//createAccount_config.js var today = new Date(); var mm = today.getMonth()+1; //January is 0 @@ -21,6 +21,7 @@ exports.config = { }, onPrepare: function() { + browser.sleep(2500); browser.driver.manage().window().maximize(); }, diff --git a/dashboardOne_config.js b/createJourney_config.js similarity index 84% rename from dashboardOne_config.js rename to createJourney_config.js index 4a87870..098abae 100644 --- a/dashboardOne_config.js +++ b/createJourney_config.js @@ -1,9 +1,9 @@ -// config.js +//createJourney_config.js exports.config = { framework: 'jasmine', seleniumAddress: 'http://localhost:4444/wd/hub', - specs: ['dashboardOne_spec.js'], + specs: ['createJourney_spec.js'], jasmineNodeOpts: { defaultTimeoutInterval: 360000 @@ -14,6 +14,7 @@ exports.config = { }, onPrepare: function() { + browser.sleep(2500); browser.driver.manage().window().maximize(); }, diff --git a/createJourney_spec.js b/createJourney_spec.js new file mode 100644 index 0000000..5e0e0e3 --- /dev/null +++ b/createJourney_spec.js @@ -0,0 +1,647 @@ +//createJourney_spec.js + +describe('Journeysmap script', function () { + //app-journeysmap landing page + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + + //Open browser + //browser.driver.manage().window().setSize(1600, 800); + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login').then(function() { + browser.sleep(1000); + }); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Login'); + }); + + //Sign In + SignIn(UserNameTextBox, PasswordTextBox); + + function SignIn(UserNameTextBox, PasswordTextBox) { + 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.'); + browser.sleep(2500); + await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + browser.sleep(2500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(2500); + }); + await NextButton.click().then(function() { + browser.sleep(5000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + } + + //<<<>>> + CreateJourney(); + + //Sign Out + SignOut(); +}); + +function CreateJourney() { + it(': CreateJourney, should create a Journey to Top Interest Survey Result', async function () { + var JourneySideBarHeaderOne = element(by.css('.side-bar-child-text > span')); + var JourneyInfoIcon = element(by.css('span > .journey-info-circle')); + var JourneyInfoDivTitle = element(by.css('.col-lg-12 > .ng-binding')); + var JourneyInfoDivSubText = element(by.css('.col-lg-12:nth-child(3)')); + var JourneyInfoDivXCloseLink = element(by.css('.fa-times')); + var JourneyEntryPoint = element(by.css('.journeyInput')); + var SelectEntryPointDropDown = element(by.css('.ng-scope:nth-child(1) > .sidebarScrollListTxt > .ng-binding')); + var StartYourJourneyButton = element(by.css('.journeyStartBtnEnable')); + var JourneysActionTitleHeader = element(by.css('div:nth-child(2) > .ng-binding')); + var JourneyResultTitleOne = element(by.css('#journeyitem0 .side-bar-child-text')); + var JourneyResultTitleTwo = element(by.css('#journeyitem1 .side-bar-child-text')); + var JourneyResultTitleThree = element(by.css('#journeyitem2 .side-bar-child-text')); + var JourneySaveIcon = element(by.css('#journeyitem0 .mapActionBarActive > .fas')); + var JourneyStopDIVTitle = element(by.css('.row:nth-child(1) > .col-md-12:nth-child(1)')); + var JourneyStopDIVCertificateCheckBox = element(by.css('#awm0 > .md-container')); + var JourneyStopDIVCertificateTitle = element(by.css('#awm0 .ng-binding')); + var JourneyStopDIVDegreeCheckBox = element(by.css('#awm1 > .md-container')); + var JourneyStopDIVDegreeTitle = element(by.css('#awm1 .ng-binding')); + var JourneyStopDIVTitleCardOne = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(1) .waypointCardTitle')); + var JourneyStopDIVAddButtonCardOne = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(1) .btn')); + var JourneyStopDIVTitleCardTwo = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(2) .waypointCardTitle')); + var JourneyStopDIVAtAGlanceIcon = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(2) .territoryCardItemText')); + var JourneyStopDIVBackOfCardTitle = element(by.css('div:nth-child(1) > #territoryCardTitleHeader > .territoryCardTitleText')); + var JourneyStopDIVBackOfCardSubText = element(by.css('div:nth-child(1) > div > .territoryCardDescriptionText')); + var JourneyStopDIVBackOfCardXCloseIcon = element(by.css('div:nth-child(1) > #territoryCardTitleHeader .glyphicon')); + var JourneyStopDIVAddButtonCardTwo = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(2) .btn')); + var JourneyStopDIVTitleCardThree = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(3) .waypointCardTitle')); + var JourneyStopDIVAddButtonCardThree = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(3) .btn')); + var JourneyStopDIVSubText = element(by.css('#addWaypointsModalAddedWaypointsCarousel .ng-scope')); + var JourneyStopDIVSkipLink = element(by.css('.btn-inverse')); + var JourneyStopDIVSearchTextBox = element(by.css('#addWaypointsModalSearchInput')); + var JourneyStopDIVSearchIcon = element(by.css('div:nth-child(1) > .cursorPointer > .glyphicon-search')); + var JourneyStopDIVSearchResultText = element(by.css('.carousel-inner > .ng-scope:nth-child(2)')); + var JourneyStopDIVXIcon = element(by.css('div:nth-child(1) > .cursorPointer > .glyphicon-remove')); + var JourneyStopDIVRightArrowIcon = element(by.css('#allWaypointsCarousel > .right > .glyphicon')); + var JourneyStopDIVTitleCardFour = element(by.css('.item:nth-child(5) > .ng-scope:nth-child(1) .waypointCardTitle')); + var JourneyStopDIVAddButtonCardFour = element(by.css('.item:nth-child(5) > .ng-scope:nth-child(1) .btn')); + var JourneyStopDIVTitleCardFive = element(by.css('.item:nth-child(5) > .ng-scope:nth-child(2) .waypointCardTitle')); + var JourneyStopDIVTitleCardSix = element(by.css('.item:nth-child(5) > .ng-scope:nth-child(3) .waypointCardTitle')); + var JourneyStopDIVLeftArrowIcon = element(by.css('#allWaypointsCarousel > .left > .glyphicon')); + var JourneyStopDIVAddedStopOne = element(by.css('.waypointCardTitle > .ng-binding')); + var JourneyStopDIVAddedStopTwo = element(by.css('.col-xs-6:nth-child(2) .waypointCardTitle > .ng-binding')); + 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 JourneyStopDIVRemoveCardTwoButton = element(by.css('#addWaypointsModalAddedWaypointsCarousel > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(2) > waypoint-card > div > div > div.waypointNotAdded > div')); + var JourneyStopDIVAddToJourneyButton = element(by.css('.btn:nth-child(2)')); + var JournyeStopDIVGotItDIVText = element(by.css('.tooltip-inner')); + var JourneyStopDIVGotItButtonOne = element(by.css('.journeyViewToolTipWaypointAddedConfirm > .btn')); + var JourneyStopDIVGotItButtonTwo = element(by.css('.btn-lg')); + + var JourneyDetailsIcon = element(by.css('#journeyitem0 .journey-info-circle')); + var ActionTitleBar = element(by.css('.ng-binding:nth-child(2)')); + var EditJourneyLink = element(by.linkText('Edit Journey')); + var JourneyEntryWayPointTopLevel = element(by.css('#journeyViewToolTip_0 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var JourneyEntryWayPointCluster = element(by.css('#journeyViewToolTip_0 .side-bar-journey-detail-child-txt:nth-child(5)')); + var SeventhGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_1 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var SeventhGradeWayPointCluster = element(by.css('#journeyViewToolTip_1 .side-bar-journey-detail-child-txt:nth-child(5)')); + var EightGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_2 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var EightGradeWayPointCluster = element(by.css('#journeyViewToolTip_2 .side-bar-journey-detail-child-txt:nth-child(5)')); + var NinethGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_3 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var NinethGradeWayPointCluster = element(by.css('#journeyViewToolTip_3 .side-bar-journey-detail-child-txt:nth-child(5)')); + var ArtsEducation = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var LibraryMedia = element(by.css('.ng-scope:nth-child(3) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Mathematics = element(by.css('.ng-scope:nth-child(4) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var MathematicalPractices = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var AlgebraI = element(by.css('.ng-scope:nth-child(3) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var StatisticsAndProbability = element(by.css('.ng-scope:nth-child(4) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var AlgebraII = element(by.css('.ng-scope:nth-child(5) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Precalculus = element(by.css('.ng-scope:nth-child(6) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var MathematicsIII = element(by.css('.ng-scope:nth-child(7) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var MathematicsII = element(by.css('.ng-scope:nth-child(8) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var CalculusStandards = element(by.css('.ng-scope:nth-child(9) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var MathematicsI = element(by.css('.ng-scope:nth-child(10) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var AdvancedPlacementProbabilityAndStatisticsStandards = element(by.css('.ng-scope:nth-child(11) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Geometry = element(by.css('.ng-scope:nth-child(12) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var UsingProbabilityToMakeDecisions = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var ExpressingGeometricPropertiesWithEquations= element(by.css('.ng-scope:nth-child(3) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Circles = element(by.css('.ng-scope:nth-child(4) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var FindArcLengthsandAreasOfSectorsOfCircles = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); + var DeriveUsingSimilarity = element(by.css('.disableJourneyItem:nth-child(6)')); + var UnderstandAndApplyTheoremsAboutCircles = element(by.css('.ng-scope:nth-child(3) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var ModelingWithGeometry = element(by.css('.ng-scope:nth-child(5) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Congruence = element(by.css('.ng-scope:nth-child(6) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var ConditionalProbabilityAndTheRulesOfProbability = element(by.css('.ng-scope:nth-child(7) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var SimilarityRightTrianglesAndTrigonometry = element(by.css('.ng-scope:nth-child(8) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var GeometricMeasurementAndDimensions = element(by.css('.ng-scope:nth-child(9) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var SocialStudies = element(by.css('.ng-scope:nth-child(5) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var Science = element(by.css('.ng-scope:nth-child(6) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var TechnologyEducation = element(by.css('.ng-scope:nth-child(7) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var LanguageArts = element(by.css('.ng-scope:nth-child(8) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var HealthAndPE = element(by.css('.ng-scope:nth-child(9) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var WorldLanguages = element(by.css('.ng-scope:nth-child(10) > div > div:nth-child(1) .side-bar-journey-detail-child-txt:nth-child(6)')); + var TenthGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_4 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var TenthGradeWayPointCluster = element(by.css('#journeyViewToolTip_4 .side-bar-journey-detail-child-txt:nth-child(5)')); + var EleventhGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_5 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var EleventhGradeWayPointCluster = element(by.css('#journeyViewToolTip_5 .side-bar-journey-detail-child-txt:nth-child(5)')); + var TwelvethGradeWayPointTopLevel = element(by.css('#journeyViewToolTip_6 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var TwelvethGradeWayPointCluster = element(by.css('#journeyViewToolTip_6 .side-bar-journey-detail-child-txt:nth-child(5)')); + var CollegeStopWayPointTopLevel = element(by.css('#journeyViewToolTip_7 .ng-binding:nth-child(1)')); + var CollegeStopWayPointCluster = element(by.css('#journeyViewToolTip_7 > .ng-isolate-scope .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var CollegeStopWayPointPathway = element(by.css('#journeyViewToolTip_7 .side-bar-journey-detail-child-txt:nth-child(5)')); + var AddedStopWayPointTopLevelOne = element(by.css('#journeyViewToolTip_8 .ng-binding:nth-child(1)')); + var AddedStopWayPointClusterOne = element(by.css('#journeyViewToolTip_8 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var AddedStopWayPointPathwayOne = element(by.css('#journeyViewToolTip_8 .side-bar-journey-detail-child-txt:nth-child(5)')); + var AddedStopWayPointTopLevelTwo = element(by.css('#journeyViewToolTip_9 .ng-binding:nth-child(1)')); + var AddedStopWayPointClusterTwo = element(by.css('#journeyViewToolTip_9 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var AddedStopWayPointPathwayTwo = element(by.css('#journeyViewToolTip_9 .side-bar-journey-detail-child-txt:nth-child(5)')); + var AddedStopWayPointTopLevelThree = element(by.css('#journeyViewToolTip_10 .ng-binding:nth-child(1)')); + var AddedStopWayPointClusterThree = element(by.css('#journeyViewToolTip_10 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var AddedStopWayPointPathwayThree = element(by.css('#journeyViewToolTip_10 .side-bar-journey-detail-child-txt:nth-child(5)')); + var JourneyEndWayPointTopLevel = element(by.css('#journeyViewToolTip_11 .ng-binding:nth-child(1)')); + var JourneyEndWayPointCluster = element(by.css('#journeyViewToolTip_11 .sidebarDescriptionAncestorTxt > .sidebarDescriptionAncestorTxt')); + var JourneyEndWayPointPathway = element(by.css('#journeyViewToolTip_11 .side-bar-journey-detail-child-txt:nth-child(5)')); + var UpOneLevelLink = element(by.linkText('Up One Level')); + var EditWayPointHeaderOne = element(by.css('.itemWaypoint:nth-child(1) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderTwo = element(by.css('.itemWaypoint:nth-child(2) > .itemTextContainer > .ng-binding')); + var EditWayPointEllipsisTwo = element(by.css('.itemWaypoint:nth-child(2) > .dropdown > .fas')); + var DeleteLink = element(by.linkText('Delete')); + var DeleteDIVText = element(by.css('.modal-content > .ng-scope div:nth-child(1)')); + var RemoveThisWaypointButton = element(by.css('.btn:nth-child(3)')); + var EditWayPointHeaderThree = element(by.css('.itemWaypoint:nth-child(3) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderFour = element(by.css('.itemWaypoint:nth-child(4) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderFive = element(by.css('.itemWaypoint:nth-child(5) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderSix = element(by.css('.itemWaypoint:nth-child(6) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderSeven = element(by.css('.itemWaypoint:nth-child(7) > .itemTextContainer > .ng-binding')); + var EditWayPointHeaderEight = element(by.css('.itemWaypoint:nth-child(8) > .itemTextContainer > .ng-binding')); + + var WayPointTwo = element(by.css('.itemWaypoint:nth-child(2) > .itemTextContainer > .ng-binding')); + var WayPointThree = element(by.css('.itemWaypoint:nth-child(3) > .itemTextContainer > .ng-binding')); + var WayPointFour = element(by.css('.itemWaypoint:nth-child(4) > .itemTextContainer > .ng-binding')); + var WayPointFive = element(by.css('.itemWaypoint:nth-child(5) > .itemTextContainer > .ng-binding')); + var WayPointSix = element(by.css('.itemWaypoint:nth-child(6) > .itemTextContainer > .ng-binding')); + var SelectWayPointTwoEllipsis = element(by.css('.itemWaypoint:nth-child(2) > .dropdown > .fas')); + + + + var ActionBarSaveIconOne = element(by.css('.mapActionBarActive:nth-child(2) > .fas')); + var Select12thGradeWayPointEllipsis = element(by.css('.itemWaypoint:nth-child(7) > .dropdown > .fas')); + var InsertAStop = element(by.linkText('Insert a Stop')); + + var EditSearchText = element(by.css('.sidebarNoResults:nth-child(1)')); + var MapSearchTextBox = element(by.css('#searchBox')); + var MagnifyingGlassIcon = element(by.css('.glyphicon-search')); + var ActionTitleBarTwo = element(by.css('.sideBarSearchBarContainer > div:nth-child(1) > .ng-binding')); //duplicate row 721 + var CertificationResultsTab = element(by.css('#tab-item-6 > .ng-binding'));//#tab-item-2 > .ng-binding')); + var ThirdResultViewOnMapIconIcon = element(by.css('#tab-content-6 #searchitem2 div:nth-child(6) > .fas'));//#tab-content-2 #searchitem2 div:nth-child(6) > .fas')); + var MapZoomInIcon = element(by.css('.glyphicon-plus')); + var ThirdResultAddIcon = element(by.css('#tab-content-6 #searchitem2 div:nth-child(5) > #mapActionBarJourneyIcon'));//#tab-content-2 #searchitem2 div:nth-child(5) > #mapActionBarJourneyIcon')); + var FifteenthWayPoint = element(by.css('.itemWaypoint:nth-child(10) > .itemTextContainer > .ng-binding')); + var ActionBarSaveIconTwo = element(by.css('.fa-save')); + var MapZoomOutIcon = element(by.css('.glyphicon-minus')); + var SelectCollegeWayPointEllipsis = element(by.css('.itemWaypoint:nth-child(9) > .dropdown > .fas')); + var ReOrderLink = element(by.linkText('Re-order')); + var GrabCollegeWayPoint = element(by.css('.selectedWaypoint > .itemTextContainer > .ng-binding:nth-child(1)')); + var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); + + //short cut to create journey + var Results = element(by.css('div:nth-child(6) .fa-chart-bar')); + var SecondAtAGlanceIcon = element(by.xpath('//territory-card-action-bar/div/button')); + var Select = element(by.xpath('//territory-card-action-bar/div/button')); + var Journey = element(by.xpath('//action-journey/span')); + await Results.click().then(function() { + browser.sleep(5000); + }); + browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { + browser.sleep(2500); + }); + await Select.click().then(function() { + browser.sleep(5000); + }); + browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { + browser.sleep(2500); + }); + await Select.click().then(function() { + browser.sleep(5000); + }); + browser.actions().mouseMove(Journey).perform().then(function() { + browser.sleep(2500); + }); + await Journey.click().then(function() { + browser.sleep(5000); + });//end + + /*short cut to retrieve journey + var MyJourneys = element(by.css('#nbMyJourneys .span-navbar-hover')); + var Journey = element(by.xpath('//div[2]/div/div/span')); + var ViewOnMap = element(by.css('.col-md-4 > .btn-info')); + await MyJourneys.click().then(function() { + browser.sleep(2500); + }); + await Journey.click().then(function() { + browser.sleep(2500); + }); + await ViewOnMap.click().then(function() { + browser.sleep(2500); + });//end*/ + + expect(await JourneySideBarHeaderOne.getText()).toEqual('Create Your Journey'); + await JourneyInfoIcon.click().then(function() { + browser.sleep(1000); + }); + expect(await JourneyInfoDivTitle.getText()).toEqual('Create Your Journey'); + expect(await JourneyInfoDivSubText.getText()).toEqual('A Journey is your driving direction. Enter a starting location, such as your current grade, as well as the destination you are trying to reach, like an occupation. From there we will provide you with possible pathways to reach your goal.'); + await JourneyInfoDivXCloseLink.click().then(function() { + browser.sleep(1000); + }); + await JourneyEntryPoint.click(); + browser.waitForAngular(); + await JourneyEntryPoint.sendKeys('6'); + await SelectEntryPointDropDown.click(); + browser.waitForAngular(); + await StartYourJourneyButton.click(); + browser.waitForAngular(); + expect(await JourneysActionTitleHeader.getText()).toEqual('Journey Search Results'); + expect(await JourneyResultTitleOne.getText()).toEqual('6 to Administrative Services Managers through Business Administration B.A./B.S.'); + expect(await JourneyResultTitleTwo.getText()).toEqual('6 to Administrative Services Managers through Business Administration Minor'); + expect(await JourneyResultTitleThree.getText()).toEqual('6 to Administrative Services Managers through Master of Business Administration (MBA)'); + browser.actions().mouseMove(JourneySaveIcon).perform().then(function() { + browser.sleep(1000); + }); + await JourneySaveIcon.click().then(function() { + browser.sleep(5000); + }); + expect(await JourneyStopDIVTitle.getText()).toEqual('Now that you have saved a journey, feel free to add any additional degree(s) and certification(s) to your journey by selecting from below!'); + expect(await JourneyStopDIVCertificateTitle.getText()).toEqual('Certification'); + expect(await JourneyStopDIVDegreeTitle.getText()).toEqual('Degree Program'); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Certified Medical Office Manager'); + expect(await JourneyStopDIVTitleCardThree.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await JourneyStopDIVSubText.getText()).toEqual('Your added stops will show up here.'); + expect(await JourneyStopDIVSkipLink.getText()).toEqual('Skip'); + await JourneyStopDIVSearchTextBox.sendKeys('Potato').then(function() { + browser.sleep(2500); + }); + await JourneyStopDIVSearchIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVSearchResultText.getText()).toEqual('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.'); + await JourneyStopDIVXIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Certified Medical Office Manager'); + expect(await JourneyStopDIVTitleCardThree.getText()).toEqual('Strategic Meeting Management Certification'); + await JourneyStopDIVAddButtonCardThree.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopOne.getText()).toEqual('Strategic Meeting Management Certification'); + await JourneyStopDIVCertificateCheckBox.click().then(function() { + browser.sleep(5000); + }); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Business Administration Minor'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Master of Business Administration (MBA)'); + await JourneyStopDIVAtAGlanceIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVBackOfCardTitle.getText()).toEqual('Master of Business Administration (MBA)'); + expect(await JourneyStopDIVBackOfCardSubText.getText()).toEqual('The MBA is an integrated graduate program focused on leadership, innovation and sustainability. Students master essential technical skills through the Value Chain of Business courses and gain in-depth understanding of the global context of business in the Foundations of Competitiveness courses. In addition, students take a series of Applied Skills and Leadership courses that are integrated based on a set of managerial competencies, skills and perspectives. A highlight of the MBA program is the International Experience, which requires that all MBA students participate in either a 10-14 day study abroad program or a Portland Metro-based international business experience during their MBA experience. The MBA is designed to accommodate students with business and non-business undergraduate degrees and is best suited for those who have gained at least two years of industry experience prior to their admission date.'); + await JourneyStopDIVBackOfCardXCloseIcon.click().then(function() { + browser.sleep(2500); + }); + await JourneyStopDIVAddButtonCardTwo.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopOne.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await JourneyStopDIVAddedStopTwo.getText()).toEqual('Master of Business Administration (MBA)'); + await JourneyStopDIVCertificateCheckBox.click().then(function() { + browser.sleep(5000); + }); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Certified Medical Office Manager'); + expect(await JourneyStopDIVTitleCardThree.getText()).toEqual('Strategic Meeting Management Certification'); + await JourneyStopDIVRightArrowIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVTitleCardFour.getText()).toEqual('Certified Practice Manager'); + expect(await JourneyStopDIVTitleCardFive.getText()).toEqual('Court and Judicial Security Manager'); + expect(await JourneyStopDIVTitleCardSix.getText()).toEqual('Certified Web Professional - Server Administrator'); + await JourneyStopDIVAddButtonCardFour.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopThree.getText()).toEqual('Certified Practice Manager'); + await JourneyStopDIVLeftArrowIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Certified Medical Office Manager'); + expect(await JourneyStopDIVTitleCardThree.getText()).toEqual('Strategic Meeting Management Certification'); + await JourneyStopDIVAddButtonCardOne.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopThree.getText()).toEqual('Certified Practice Manager'); + expect(await JourneyStopDIVAddedStopFour.getText()).toEqual('Certified Legal Manager'); + await JourneyStopDIVBottomPanelLeftArrowIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopOne.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await JourneyStopDIVAddedStopTwo.getText()).toEqual('Master of Business Administration (MBA)'); + await JourneyStopDIVRemoveCardTwoButton.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneyStopDIVAddedStopOne.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await JourneyStopDIVAddedStopTwo.getText()).toEqual('Certified Practice Manager'); + await JourneyStopDIVAddToJourneyButton.click().then(function() { + browser.sleep(5000); + }); + expect(await JournyeStopDIVGotItDIVText.getText()).toEqual('You can find your added stop(s) here'); + expect(await JourneyStopDIVGotItButtonOne.getText()).toEqual('Got it!'); + await JourneyStopDIVGotItButtonOne.click().then(function() { + browser.sleep(2500); + }); + expect(await JournyeStopDIVGotItDIVText.getText()).toEqual('You can edit your added stop by selecting edit here'); + expect(await JourneyStopDIVGotItButtonTwo.getText()).toEqual('Got it!'); + await JourneyStopDIVGotItButtonTwo.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneysActionTitleHeader.getText()).toEqual('Journey Search Results'); + expect(await ActionTitleBar.getText()).toEqual('6 to Administrative Services Managers through Business Administration B.A./B.S.'); + expect(await EditJourneyLink.getText()).toEqual('Edit Journey'); + expect(await JourneyEntryWayPointTopLevel.getText()).toEqual('K-8'); + expect(await JourneyEntryWayPointCluster.getText()).toEqual('6'); + expect(await SeventhGradeWayPointTopLevel.getText()).toEqual('K-8'); + expect(await SeventhGradeWayPointCluster.getText()).toEqual('7'); + expect(await EightGradeWayPointTopLevel.getText()).toEqual('K-8'); + expect(await EightGradeWayPointCluster.getText()).toEqual('8'); + expect(await NinethGradeWayPointTopLevel.getText()).toEqual('HS'); + expect(await NinethGradeWayPointCluster.getText()).toEqual('9'); + expect(await TenthGradeWayPointTopLevel.getText()).toEqual('HS'); + expect(await TenthGradeWayPointCluster.getText()).toEqual('10'); + expect(await EleventhGradeWayPointTopLevel.getText()).toEqual('HS'); + expect(await EleventhGradeWayPointCluster.getText()).toEqual('11'); + expect(await TwelvethGradeWayPointTopLevel.getText()).toEqual('HS'); + expect(await TwelvethGradeWayPointCluster.getText()).toEqual('12'); + expect(await CollegeStopWayPointTopLevel.getText()).toEqual('College'); + browser.actions().mouseMove(JourneyEndWayPointPathway).perform().then(function() { + browser.sleep(2500); + }); + expect(await CollegeStopWayPointCluster.getText()).toEqual('Administration'); + expect(await CollegeStopWayPointPathway.getText()).toEqual('Business Administration B.A./B.S.'); + expect(await AddedStopWayPointTopLevelOne.getText()).toContain('Core'); + expect(await AddedStopWayPointClusterOne.getText()).toEqual('Other Certifications'); + expect(await AddedStopWayPointPathwayOne.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await AddedStopWayPointTopLevelTwo.getText()).toEqual('Core'); + expect(await AddedStopWayPointClusterTwo.getText()).toEqual('Other Certifications'); + expect(await AddedStopWayPointPathwayTwo.getText()).toEqual('Certified Practice Manager'); + expect(await AddedStopWayPointTopLevelThree.getText()).toEqual('Advanced'); + expect(await AddedStopWayPointClusterThree.getText()).toEqual('Other Certifications'); + expect(await AddedStopWayPointPathwayThree.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyEndWayPointTopLevel.getText()).toEqual('Administration'); + expect(await JourneyEndWayPointCluster.getText()).toEqual('Management'); + expect(await JourneyEndWayPointPathway.getText()).toEqual('Administrative Services Managers'); + await NinethGradeWayPointCluster.click().then(function() { + browser.sleep(5000); + }); + expect(await ArtsEducation.getText()).toEqual('Arts Education'); + expect(await LibraryMedia.getText()).toEqual('Library Media'); + expect(await Mathematics.getText()).toEqual('Mathematics'); + expect(await SocialStudies.getText()).toEqual('Social Studies'); + expect(await Science.getText()).toEqual('Science'); + expect(await TechnologyEducation.getText()).toEqual('Technology Education'); + expect(await LanguageArts.getText()).toEqual('Language Arts'); + expect(await HealthAndPE.getText()).toEqual('Health and PE'); + expect(await WorldLanguages.getText()).toEqual('World Languages'); + await Mathematics.click().then(function() { + browser.sleep(5000); + }); + expect(await MathematicalPractices.getText()).toEqual('Mathematical Practices'); + expect(await AlgebraI.getText()).toEqual('Algebra I'); + expect(await StatisticsAndProbability.getText()).toEqual('A3'); + expect(await AlgebraII.getText()).toEqual('Algebra II'); + expect(await Precalculus.getText()).toEqual('Precalculus'); + expect(await MathematicsIII.getText()).toEqual('Mathematics III'); + expect(await MathematicsII.getText()).toEqual('Mathematics II'); + expect(await CalculusStandards.getText()).toEqual('Calculus Standards'); + expect(await MathematicsI.getText()).toEqual('Mathematics I'); + expect(await AdvancedPlacementProbabilityAndStatisticsStandards.getText()).toEqual('Advanced Placement Probability and Statistics Standards'); + browser.actions().mouseMove(Geometry).perform().then(function() { + browser.sleep(2500); + }); + expect(await Geometry.getText()).toEqual('Geometry'); + await Geometry.click().then(function() { + browser.sleep(5000); + }); + expect(await UsingProbabilityToMakeDecisions.getText()).toEqual('Statistics and Probability: Using Probability to Make Decisions'); + browser.actions().mouseMove(GeometricMeasurementAndDimensions).perform().then(function() { + browser.sleep(2500); + }); + expect(await ExpressingGeometricPropertiesWithEquations.getText()).toEqual('Geometry: Expressing Geometric Properties with Equations'); + expect(await Circles.getText()).toEqual('Geometry: Circles'); + expect(await ModelingWithGeometry.getText()).toEqual('Geometry: Modeling with Geometry'); + expect(await Congruence.getText()).toEqual('Geometry: Congruence'); + expect(await ConditionalProbabilityAndTheRulesOfProbability.getText()).toEqual('Statistics and Probability: Conditional Probability and the Rules of Probability'); + expect(await SimilarityRightTrianglesAndTrigonometry.getText()).toEqual('Geometry: Similarity, Right Triangles, and Trigonometry'); + expect(await GeometricMeasurementAndDimensions.getText()).toEqual('Geometry: Geometric Measurement and Dimension'); + await Circles.click().then(function() { + browser.sleep(5000); + }); + expect(await FindArcLengthsandAreasOfSectorsOfCircles.getText()).toEqual('Find arc lengths and areas of sectors of circles. [Radian introduced only as unit of measure]'); + expect(await UnderstandAndApplyTheoremsAboutCircles.getText()).toEqual('Understand and apply theorems about circles.'); + await FindArcLengthsandAreasOfSectorsOfCircles.click().then(function() { + browser.sleep(5000); + }); + expect(await DeriveUsingSimilarity.getText()).toEqual('Derive using similarity the fact that the length of the arc intercepted by an angle is proportional to the radius, and define the radian measure of the angle as the constant of proportionality; derive the formula for the area of a sector. Convert between degrees and radians. CA'); + await UpOneLevelLink.click().then(function() { + browser.sleep(5000); + }); + await UpOneLevelLink.click().then(function() { + browser.sleep(5000); + }); + await EditJourneyLink.click().then(function() { + browser.sleep(5000) + }); + expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); + expect(await EditWayPointHeaderOne.getText()).toEqual('1'); + expect(await EditWayPointHeaderTwo.getText()).toEqual('2'); + expect(await EditWayPointHeaderThree.getText()).toEqual('3'); + expect(await EditWayPointHeaderFour.getText()).toEqual('4'); + expect(await EditWayPointHeaderFive.getText()).toEqual('5'); + expect(await EditWayPointHeaderSix.getText()).toEqual('6'); + expect(await EditWayPointHeaderSeven.getText()).toEqual('7'); + expect(await EditWayPointHeaderEight.getText()).toEqual('8'); + await EditWayPointEllipsisTwo.click().then(function() { + browser.sleep(5000); + }); + browser.actions().mouseMove(DeleteLink).perform().then(function() { + browser.sleep(1000); + }); + await DeleteLink.click().then(function() { + browser.sleep(2500); + }); + expect(await DeleteDIVText.getText()).toEqual('Are you sure you want to remove Expressions and Equations from this journey?'); + await RemoveThisWaypointButton.click().then(function() { + browser.sleep(5000); + }); + + expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); + expect(await WayPointOne.getText()).toEqual('Geometry'); + expect(await WayPointTwo.getText()).toEqual('Mathematical Practices'); + expect(await WayPointThree.getText()).toEqual('The Number System'); + expect(await WayPointFour.getText()).toEqual('Statistics and Probability'); + expect(await WayPointFive.getText()).toEqual('Functions'); + await ActionBarSaveIconOne.click().then(function() { + browser.sleep(2500); + }); + expect(await ActionTitleBar.getText()).toEqual('Journey Search Results'); + await UpOneLevelLink.click().then(function() { + browser.sleep(5000); + }); + await UpOneLevelLink.click().then(function() { + browser.sleep(5000); + }); + await EditJourneyLink.click().then(function() { + browser.sleep(2500) + }); + expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); + + browser.actions().mouseMove(FourteenthWayPoint).perform().then(function() { + browser.sleep(1000); + }); + expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); + expect(await ThirteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); + expect(await FourteenthWayPoint.getText()).toEqual('Administrative Services Managers'); + await Select12thGradeWayPointEllipsis.click().then(function() { + browser.sleep(2500) + }); + browser.actions().mouseMove(InsertAStop).perform().then(function() { + browser.sleep(1000); + }); + await InsertAStop.click().then(function() { + browser.sleep(2500); + }); + expect(await ActionTitleBar.getText()).toEqual('Journey Add Stop'); + expect(await EditSearchText.getText()).toEqual('Use the search bar above to find a stop to add to your journey, or pick one from the map.'); + await MapSearchTextBox.sendKeys('Engineer').then(function() { + browser.sleep(2500); + }); + await MagnifyingGlassIcon.click().then(function() { + browser.sleep(5000); + }); + expect(await ActionTitleBarTwo.getText()).toEqual('Search Results'); + await CertificationResultsTab.click().then(function() { + browser.sleep(5000); + }); + browser.actions().mouseMove(ThirdResultViewOnMapIconIcon).perform().then(function() { + browser.sleep(1000); + }); + await ThirdResultViewOnMapIconIcon.click().then(function() { + browser.sleep(5000); + }); + await MapZoomInIcon.click().then(function() { + browser.sleep(2500); + }); + await MapZoomInIcon.click().then(function() { + browser.sleep(2500); + }); + await ThirdResultAddIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await SixthGradeWayPoint.getText()).toEqual('6'); + expect(await SeventhGradeWayPoint.getText()).toEqual('7'); + expect(await EightGradeWayPoint.getText()).toEqual('8'); + expect(await NinethGradeWayPoint.getText()).toEqual('9'); + expect(await TenthGradeWayPoint.getText()).toEqual('10'); + expect(await EleventhGradeWayPoint.getText()).toEqual('11'); + browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { + browser.sleep(1000); + }); + expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); + expect(await ThirteenthWayPoint.getText()).toEqual('National Chief Engineer'); + expect(await FourteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); + expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); + await ActionBarSaveIconTwo.click().then(function() { + browser.sleep(2500); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000); + }); + await MapZoomOutIcon.click().then(function() { + browser.sleep(1000) + }); + /*browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { + browser.sleep(1000); + });*/ + /*await EditJourneyLink.click().then(function() { + browser.sleep(2500) + }); + await SelectCollegeWayPointEllipsis.click().then(function() { + browser.sleep(2500) + }); + await ReOrderLink.click().then(function() { + browser.sleep(2500) + }); + browser.actions().dragAndDrop(GrabCollegeWayPoint, ThirteenthWayPoint).mouseUp().perform(); + browser.sleep(2500) + expect(await SixthGradeWayPoint.getText()).toEqual('6'); + expect(await SeventhGradeWayPoint.getText()).toEqual('7'); + expect(await EightGradeWayPoint.getText()).toEqual('8'); + expect(await NinethGradeWayPoint.getText()).toEqual('9'); + expect(await TenthGradeWayPoint.getText()).toEqual('10'); + expect(await EleventhGradeWayPoint.getText()).toEqual('11'); + browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { + browser.sleep(1000); + }); + expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); + expect(await ThirteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); + expect(await FourteenthWayPoint.getText()).toEqual('National Chief Engineer'); + expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); + await ActionBarSaveIconOne.click().then(function() { + browser.sleep(2500); + });*/ + await DashboardHeaderLink.click().then(function() { + browser.sleep(5000); + }); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function SignOut() { + 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 SignOutButton.click().then(function() { + browser.sleep(2500); + }); + }); +} \ No newline at end of file diff --git a/dashboardOne_spec.js b/dashboardOne_spec.js deleted file mode 100644 index 645eccc..0000000 --- a/dashboardOne_spec.js +++ /dev/null @@ -1,1536 +0,0 @@ -//dashboardOne_spec.js - -describe('Journeysmap script', function () { - //app-journeysmap landing page - var UserNameTextBox = element(by.css('#txtU')); - var PasswordTextBox = element(by.css('#txtP')); - - //Open browser - //browser.driver.manage().window().setSize(1600, 800); - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); - - it('should have a title', async function () { - await expect(browser.getTitle()).toEqual('Login'); - }); - - //Sign In - SignIn(UserNameTextBox, PasswordTextBox); - - function SignIn(UserNameTextBox, PasswordTextBox) { - it('SignIn, should sign into journeysmap.com', async function () { - var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); - var PageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); - var PageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); - var NextButton = element(by.css('.btn')); - var EC = protractor.ExpectedConditions; - var InvalidIcon = element(by.css('.far:nth-child(4)')); - var PageValidationText = element(by.css('.ng-binding:nth-child(1)')); - var EyeIcon = element(by.css('.fa-eye')); - var JourneysGreeting = element(by.css('.dropdown')); - - expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { - browser.sleep(2500); - }); - await PasswordTextBox.sendKeys('edmin123').then(function() { - browser.sleep(2500); - }); - expect(await PageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); - expect(await PageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); - await NextButton.click().then(function() { - browser.sleep(2500); - }); - browser.wait(EC.visibilityOf(InvalidIcon)); - expect(await PageValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); - await PasswordTextBox.click().then(function() { - browser.sleep(2500); - }); - browser.wait(EC.invisibilityOf(PageValidationText)); - await EyeIcon.click().then(function() { - browser.sleep(2500); - }); - await PasswordTextBox.clear().then(function() { - browser.sleep(1000); - PasswordTextBox.sendKeys('3Dm!nAuto'); - browser.sleep(1000); - }); - await NextButton.click().then(function() { - browser.sleep(5000); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); - expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); - } - - //<<<>>> - ProfileWidget(); - - MyProgressWidget(); - - InterestSurveyResultsWidget(); - InterestSurveyResultsClusters(); - InterestSurveyResultsCreateJourney(); - - SkillsAssessmentWidget(); - SkillsAssessmentResults(); - BeginCareerExploration(); - - MyCareersCarousel(); - - //Sign Out*/ - SignOut(); -}); - -function ProfileWidget() { - it(': ProfileWidget, should expand profile widget, edit About Me widget, then validate Role Model and Education Widgets', async function () { - var ProfileWidgetExpandCollapseIcon = element(by.css('span > .fa')); - var ConnectionsLink = element(by.css('.col-md-3:nth-child(2) .jrnys_support-text')); - var FollowersLink = element(by.css('.col-md-3:nth-child(3) .jrnys_support-text')); - var FollowersDivTitle = element(by.css('.default-color2 > h3')); - var FollowersDivSubText = element(by.css('.col-md-12:nth-child(1)')); - var FollowersDivGotItButton = element(by.css('.btn-lg')); - var AboutMeWidgetTitle = element(by.css('#aboutMeFull > .jrnys_lead-body-copy')); - var AboutMePencil = element(by.css('#aboutMeFull .fa-pencil')); - var ABoutMeInputArea = element(by.id('inputArea')); - var RoleModelWidgetTitle = element(by.css('td > .jrnys_lead-body-copy')); - var RoleModelNameOne = element(by.css('.inner-content-padding > .textSize:nth-child(1)')); - var RoleModelNameTwo = element(by.css('.textSize:nth-child(2)')); - var EducationWidgetTitle = element(by.css('#education > .jrnys_lead-body-copy')); - var EducationStartEndDate = element(by.css('.col-xs-4 > .ng-binding:nth-child(1)')); - var EducationSchoolName = element(by.css('.col-xs-8')); - - expect(await ConnectionsLink.getText()).toEqual('CONNECTIONS'); - await FollowersLink.click().then(function() { - browser.sleep(1000); - }); - expect(await FollowersDivTitle.getText()).toEqual('This feature is on its way!'); - expect(await FollowersDivSubText.getText()).toEqual("Love Journeys? Then you'll love what is coming next."); - await FollowersDivGotItButton.click().then(function() { - browser.sleep(1000); - }); - await ProfileWidgetExpandCollapseIcon.click().then(function() { - browser.sleep(2500); - }); - expect(await AboutMeWidgetTitle.getText()).toEqual('About Me'); - browser.actions().mouseMove(element(by.css('.ng-scope > #aboutMeFull'))).perform().then(function() { - browser.sleep(1000); - }); - await AboutMePencil.click().then(function() { - browser.sleep(1000); - }); - await ABoutMeInputArea.clear().then(function() { - browser.sleep(2500); - }); - await ABoutMeInputArea.sendKeys('This is my automated bio, there are many like it but this one is mine.'); - await AboutMePencil.click().then(function() { - browser.sleep(1000); - }); - browser.executeScript('window.scrollTo(0, 780);').then(function() { - browser.sleep(2500); - }); - expect(await RoleModelWidgetTitle.getText()).toEqual('Role Model'); - expect(await RoleModelNameOne.getText()).toEqual('Elon Musk'); - expect(await RoleModelNameTwo.getText()).toEqual('Emma Watson'); - expect(await EducationWidgetTitle.getText()).toEqual('Education'); - expect(await EducationStartEndDate.getText()).toEqual('06/2005'); - expect(await EducationSchoolName.getText()).toEqual('SUNNYSIDE ELEMENTARY'); - browser.executeScript('window.scrollTo(0, 0);').then(function() { - browser.sleep(2500); - }); - await ProfileWidgetExpandCollapseIcon.click().then(function() { - browser.sleep(2500); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function MyProgressWidget() { - it(': MyProgressWidget, should interact with My Progress widget, navigate to Interest Survey, toggle language to Spanish then back to English and complete survey', async function () { - var MyProgressWidgetTitle = element(by.css('.yourProgressTitle')); - var ProgressLevel = element(by.css('.myProgressLevel')); - var ProgressWidgetExpandIcon = element(by.css('.full-width .ng-scope')); - var ActionOneCompleted = element(by.css('.col-md-3:nth-child(1) > .ng-scope')); - var ActionTwo = element(by.css('.col-md-3:nth-child(2) > .ng-scope')); - var ActionTwoCompleted = element(by.css('.col-md-3:nth-child(2) > .ng-scope')); - var ActionTwoRetake = element(by.linkText('Retake')); - var ActionRetakeTitlePage = element(by.css('.jrnys_lead-body-copy')); - var CancelButton = element(by.css('.btn-md')); - var ActionThree = element(by.css('.col-md-3:nth-child(3) > .ng-scope')); - var ActionThreeCompleted = element(by.css('.col-md-3:nth-child(3) > .ng-scope')); - var ActionThreeRetake = element(by.css('.col-md-3:nth-child(3) .redo')); - var ActionFour = element(by.css('.col-md-3:nth-child(4) > .ng-scope')); - var ActionFourCompleted = element(by.css('.col-md-3:nth-child(4) > .ng-scope')); - var ActionFourRetake = element(by.linkText('Keep Exploring')); - var KeepExploringTitlePage = element(by.css('.col-sm-12')); - var KeepExploringBackLink = element(by.css('.btn-primary-back-mod')); - var ProgressWidgetCollapseIcon = element(by.css('.full-width > div > .ng-scope')); - var InterestSurveyTitle = element(by.css('.jrnys_lead-body-copy')); - var TextOne = element(by.css('.col-md-4:nth-child(1) > .ng-binding:nth-child(1)')); - var TextTwo = element(by.css('.col-md-4:nth-child(2) > .ng-binding:nth-child(1)')); - var TextThree = element(by.css('.col-md-4:nth-child(3) > .ng-binding:nth-child(1)')); - var EspanolButton = element(by.linkText('Español')); - var EnglishButton = element(by.linkText('English')); - var LanguageAlertDiv = element(by.css('p:nth-child(7)')); - var LanguageAlterConfirmButton = element(by.css('.confirm')); - var DislikeEmoji = element(by.id('emoji_0_0')); - var MehEmoji = element(by.id('emoji_0_1')); - var UnsureEmoji = element(by.id('emoji_0_2')); - var LikeItEmoji = element(by.id('emoji_0_3')); - var LoveItEmoji = element(by.id('emoji_0_4')); - var PreviousQuestion = element(by.linkText('< Previous Question')); - var CancelSurveyButton = element(by.css('.btn-md')); - var FirstOccupationCardTitle = element(by.xpath('//div[3]/div/div[2]/span')); - var FirstOccupationCardAtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); - var FirstOccupationCardBestFitIcon = element(by.xpath('//territory-card-fit-status/div/div/div[2]')); - var SecondOccupationCardTitle = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var ThirdOccupationCardTitle = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - expect(await MyProgressWidgetTitle.getText()).toEqual('MY PROGRESS'); - expect(await ProgressLevel.getText()).toEqual('Level: Scout'); - await ProgressWidgetExpandIcon.click().then(function() { - browser.sleep(2500); - }); - expect(await ActionOneCompleted.getText()).toContain('Account Creation'); - expect(await ActionOneCompleted.getText()).toContain('Completed'); - expect(await ActionTwo.getText()).toContain('Interest Survey'); - expect(await ActionTwoCompleted.getText()).toContain('Completed'); - //Interest Survey page - validate English & Spanish text - await ActionTwoRetake.click().then(function() { - browser.sleep(5000); - }); - expect(await InterestSurveyTitle.getText()).toEqual('Interest Survey'); - expect(await TextOne.getText()).toEqual("In less than 10 minutes you'll be matched to some exciting careers!"); - expect(await TextTwo.getText()).toEqual('For each option, select the emotion that matches how you feel about the activity.'); - expect(await TextThree.getText()).toEqual('Say how you really feel, there are no wrong answers!'); - await LikeItEmoji.click(); - await PreviousQuestion.click(); - await EspanolButton.click().then(function() { - browser.sleep(5000) - }); - expect(await LanguageAlertDiv.getText()).toEqual('Changing the language setting will result in starting the survey over again. Do you want to change languages and start at question 1?'); - await LanguageAlterConfirmButton.click(); - expect(await TextOne.getText()).toEqual('¡En menos de 10 minutos te conectamos con las mejores carreras para ti!'); - expect(await TextTwo.getText()).toEqual('Por cada opción, selecciona la emocion que indica como te siendes sobre este tema.'); - expect(await TextThree.getText()).toEqual('Indica cómo te sientes realmente, se sincero. ¡no hay respuesta incorrecta!'); - await LikeItEmoji.click(); - await LikeItEmoji.click(); - await LikeItEmoji.click().then(function() { - browser.sleep(5000) - }); - await CancelSurveyButton.click().then(function() { - browser.sleep(5000); - browser.waitForAngular(); - }); - browser.executeScript('window.scrollTo(0, 1405);').then(function() { - browser.sleep(5000); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); EDM-1726 - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - browser.executeScript('window.scrollTo(0, 0);').then(function() { - browser.sleep(5000); - }); - //Take Interest Survey - await ActionTwoRetake.click().then(function() { - browser.sleep(5000); - }); - browser.waitForAngular(); - await EnglishButton.click(); - browser.waitForAngular(); - await DislikeEmoji.click(); - await MehEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click();//5 - await LoveItEmoji.click(); - await MehEmoji.click(); - await UnsureEmoji.click(); - await LoveItEmoji.click(); - await DislikeEmoji.click();//10 - await DislikeEmoji.click(); - await LikeItEmoji.click(); - await LikeItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click();//15 - await LoveItEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click(); - await DislikeEmoji.click();//20 - await DislikeEmoji.click(); - await LoveItEmoji.click(); - await DislikeEmoji.click(); - await LikeItEmoji.click(); - await LikeItEmoji.click();//25 - await LoveItEmoji.click(); - await DislikeEmoji.click(); - await LikeItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click();//30 - await DislikeEmoji.click(); - await MehEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click();//35 - await LoveItEmoji.click(); - await MehEmoji.click(); - await LikeItEmoji.click(); - await LoveItEmoji.click(); - await DislikeEmoji.click();//40 - await DislikeEmoji.click(); - await LikeItEmoji.click(); - await LikeItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click();//45 - await DislikeEmoji.click(); - await LoveItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click(); - await DislikeEmoji.click();//50 - await DislikeEmoji.click(); - await MehEmoji.click(); - await DislikeEmoji.click(); - await LikeItEmoji.click(); - await LikeItEmoji.click();//55 - await LoveItEmoji.click(); - await MehEmoji.click(); - await LikeItEmoji.click(); - await LoveItEmoji.click(); - await MehEmoji.click();//60 - browser.sleep(5000); - expect(await PageTitle.getText()).toEqual('Interest Survey Result'); - browser.sleep(5000); - await DashboardHeaderLink.click().then(function() { - browser.sleep(5000); - }); - expect(await ActionThree.getText()).toContain('Skills Assessment'); - expect(await ActionThreeCompleted.getText()).toContain('Completed'); - await ActionThreeRetake.click().then(function() { - browser.sleep(5000); - }); - expect(await ActionRetakeTitlePage.getText()).toEqual('Skills Assessment'); - await CancelButton.click().then(function() { - browser.sleep(5000); - }); - expect(await ActionFour.getText()).toContain('Explore Careers'); - expect(await ActionFourCompleted.getText()).toContain('Completed'); - await ActionFourRetake.click().then(function() { - browser.sleep(5000); - }); - expect(await KeepExploringTitlePage.getText()).toEqual('Career Exploration'); - await KeepExploringBackLink.click().then(function() { - browser.sleep(5000); - }); - await ProgressWidgetCollapseIcon.click().then(function() { - browser.sleep(2500); - }); - browser.executeScript('window.scrollTo(0, 1250);').then(function() { - browser.sleep(5000); - }); - expect(await FirstOccupationCardTitle.getText()).not.toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await SecondOccupationCardTitle.getText()).not.toEqual('Administrative Services Managers'); - expect(await ThirdOccupationCardTitle.getText()).not.toEqual('Administrative Services Managers'); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function InterestSurveyResultsWidget() { - it(': InterestSurveyResultsWidget, should interact with Interest Survey Results widget, validate results', async function () { - var InterestSurveyWidgetTitle = element(by.css('.fullHeight:nth-child(2) > div:nth-child(2) > .jrnys_lead-body-copy > div')); - var InterestEditLink = element(by.css('.fa-pencil:nth-child(1)')); - var EditInterestDivTitle = element(by.css('#interests .jrnys_lead-body-copy')); - var EditRealisticTitle = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .jrnys_support-tex > .ng-binding')); - var EditRealisticTextBox = element(by.id('Realistic')); - var EditRealisticDescription = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .color3a-color')); - var EditInvestigativeTitle = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .jrnys_support-tex > .ng-binding')); - var EditInvestigaviveTextBox = element(by.id('Investigative')); - var EditInvestigativeDescription = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .color3a-color')); - var EditArtisticTitle = element(by.css('.ng-scope:nth-child(3) .jrnys_support-tex > .ng-binding')); - var EditArtisticTextBox = element(by.id('Artistic')); - var EditArtisticDescription = element(by.css('.ng-scope:nth-child(3) > .row-padding-mobile .color3a-color')); - var EditSocialTitle = element(by.css('.ng-scope:nth-child(4) .jrnys_support-tex > .ng-binding')); - var EditSocialTextBox = element(by.id('Social')); - var EditSocialDescription = element(by.css('.ng-scope:nth-child(4) > .row-padding-mobile .color3a-color')); - var EditEnterprisingTitle = element(by.css('.ng-scope:nth-child(5) .jrnys_support-tex > .ng-binding')); - var EditEnterprisingTextBox = element(by.id('Enterprising')); - var EditEnterprisingDescription = element(by.css('.ng-scope:nth-child(5) > .row-padding-mobile .color3a-color')); - var EditConventionalTitle = element(by.css('.ng-scope:nth-child(6) .jrnys_support-tex > .ng-binding')); - 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 TopResultTitleOne = element(by.css('.surveyResultSpacingTop > div > div > .ng-binding')); - var TopResultDescriptionOne = element(by.css('.surveyResultSpacingTop .surveyResultTruncateText')); - var TopResultsReadMoreLinkOne = element(by.css('.surveyResultSpacingTop > div > div:nth-child(2)')); - var TopResultsReadMoreTitle = element(by.css('div:nth-child(2) > div > .ng-binding:nth-child(2)')); - var TopResultsReadMoreDescriptionA = element(by.css('div:nth-child(3) > .ng-binding:nth-child(1)')); - var TopResultsReadMoreDescriptionB = element(by.css('div:nth-child(4) > .ng-binding')); - var TopResultsReadMoreCloseLink = element(by.css('.close')); - var FirstOccupationCardTitle = element(by.xpath('//div[3]/div/div[2]/span')); - var FirstOccupationCardAtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); - var FirstOccupationCardBestFitIcon = element(by.xpath('//territory-card-fit-status/div/div/div[2]')); - var SecondOccupationCardTitle = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var ThirdOccupationCardTitle = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var TopResultTitleTwo = element(by.css('.surveyResultSpacing:nth-child(4) > div > div > .ng-binding')); - var TopResultDescriptionTwo = element(by.css('.ng-scope:nth-child(4) .surveyResultTruncateText')); - var TopResultsReadMoreLinkTwo = element(by.css('.surveyResultSpacing:nth-child(4) > div > div:nth-child(2)')); - var TopResultTitleThree = element(by.css('.surveyResultSpacing:nth-child(5) > div > div > .ng-binding')); - var TopResultDescriptionThree = element(by.css('.ng-scope:nth-child(5) .surveyResultTruncateText')); - var TopResultsReadMoreLinkThree = element(by.css('.surveyResultSpacing:nth-child(5) > div > div:nth-child(2)')); - - var InterestResultsLink = element(by.css('div:nth-child(6) .fa-chart-bar')); - var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); - var TopThreeTraitsHeader = element(by.css('.fullHeight > .jrnys_lead-body-copy')); - var TopThreeTraitsOne = element(by.css('.col-md-4:nth-child(1) .jrnys_lead-body-copy')); - var TopThreeTraitsDescriptionOne = element(by.css('.col-md-4:nth-child(1) .ng-binding:nth-child(2)')); - var TopThreeTraitsTwo = element(by.css('.col-md-4:nth-child(2) .jrnys_lead-body-copy')); - var TopThreeTraitsDescriptionTwo = element(by.css('.col-md-4:nth-child(2) .ng-binding:nth-child(2)')); - var TopThreeTraitsThree = element(by.css('.col-md-4:nth-child(3) .jrnys_lead-body-copy')); - var TopThreeTraitsDescriptionThree = element(by.css('.col-md-4:nth-child(3) .ng-binding:nth-child(2)')); - var ViewAllLink = element(by.linkText('View All')); - var TopTraitsOne = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); - var TopTraitsOneDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); - var TopTraitsTwo = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); - var TopTraitsTwoDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); - var TopTraitsThree = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); - var TopTraitsThreeDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); - var TopTraitsFour = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); - var TopTraitsFourDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); - var TopTraitsFive = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); - var TopTraitsFiveDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); - var TopTraitsSix = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); - var TopTraitsSixDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); - var XCloseLink = element(by.css('.close')); - var ShareResultsIcon = element(by.css('.fa-share-alt')); - var ShareResultsDivTitle = element(by.css('#interestSurveyShareResult > .jrnys_lead-body-copy')); - var ToTextBox = element(by.css('tr:nth-child(2) .form-control')); - var FromTextBox = element(by.css('tr:nth-child(1) .form-control')); - var CancelButton = element(by.css('.btn-alt-info')); - var SendButton = element(by.css('tr:nth-child(7) .btn-info')); - var DivAlertTitle = element(by.css('h2')); - var DivAlertMessage = element(by.css('p:nth-child(7)')); - var DivOKButton = element(by.css('.confirm')); - var EC = protractor.ExpectedConditions; - - /*browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 610);').then(function() { - browser.sleep(2500); - }); - await InterestEditLink.click().then(function() { - browser.sleep(2500); - }); - expect(await EditInterestDivTitle.getText()).toEqual('Interests'); - expect(await EditRealisticTitle.getText()).toEqual('Realistic'); - await EditRealisticTextBox.clear(); - await EditRealisticTextBox.sendKeys('21'); - //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); - 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); - 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); - 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); - 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); - expect(await InterestSurveyWidgetTitle.getText()).toEqual('Interest Survey Results'); - expect(await TopResultTitleOne.getText()).toEqual('Enterprising (27)'); - expect(await TopResultDescriptionOne.getText()).toEqual('Enterprising personality types are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational.'); - await TopResultsReadMoreLinkOne.click().then(function() { - browser.sleep(1000); - }); - expect(await TopResultsReadMoreTitle.getText()).toEqual('Enterprising (27)'); - expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Enterprising personality types are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational.'); - expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); - await TopResultsReadMoreCloseLink.click().then(function() { - browser.sleep(1000); - }); - expect(await TopResultTitleTwo.getText()).toEqual('Investigative (25)'); - expect(await TopResultDescriptionTwo.getText()).toEqual('Investigative personality types are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical.'); - await TopResultsReadMoreLinkTwo.click().then(function() { - browser.sleep(1000); - }); - expect(await TopResultsReadMoreTitle.getText()).toEqual('Investigative (25)'); - expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Investigative personality types are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical.'); - expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); - await TopResultsReadMoreCloseLink.click().then(function() { - browser.sleep(1000); - }); - expect(await TopResultTitleThree.getText()).toEqual('Conventional (23)'); - expect(await TopResultDescriptionThree.getText()).toEqual('Conventional personality types are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented.'); - await TopResultsReadMoreLinkThree.click().then(function() { - browser.sleep(1000); - }); - expect(await TopResultsReadMoreTitle.getText()).toEqual('Conventional (23)'); - expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Conventional personality types are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented.'); - expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); - await TopResultsReadMoreCloseLink.click().then(function() { - browser.sleep(1000); - }); - browser.executeScript('window.scrollTo(0, 1250);').then(function() { - browser.sleep(5000); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest');//loading issue, not consistent EDM-1726 - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit');//loading issue, not consistent EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - browser.executeScript('window.scrollTo(0, 610);').then(function() { - browser.sleep(2500); - }); - await InterestResultsLink.click().then(function() { - browser.sleep(10000); - }); - expect(await PageTitle.getText()).toEqual('Interest Survey Result'); - expect(await TopThreeTraitsHeader.getText()).toEqual('Your top 3 traits View All'); - expect(await TopThreeTraitsOne.getText()).toEqual('Enterprising (27)'); - expect(await TopThreeTraitsDescriptionOne.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); - expect(await TopThreeTraitsTwo.getText()).toEqual('Investigative (25)'); - expect(await TopThreeTraitsDescriptionTwo.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); - expect(await TopThreeTraitsThree.getText()).toEqual('Conventional (23)'); - expect(await TopThreeTraitsDescriptionThree.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); - await ViewAllLink.click().then(function() { - browser.sleep(1000); - }); - expect(await TopTraitsOne.getText()).toEqual('Enterprising (27)'); - expect(await TopTraitsOneDescription.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); - expect(await TopTraitsTwo.getText()).toEqual('Investigative (25)'); - expect(await TopTraitsTwoDescription.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); - expect(await TopTraitsThree.getText()).toEqual('Conventional (23)'); - expect(await TopTraitsThreeDescription.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); - expect(await TopTraitsFour.getText()).toEqual('Social (22)'); - expect(await TopTraitsFourDescription.getText()).toEqual('People who are kind, generous, cooperative, patient, caring, helpful, empathetic, tactful, and friendly. They prefer tasks that involve socializing, helping others, teaching, teamwork, social interaction, relationship building, humanitarian, educational, philanthropic, interpersonal, and service-oriented work.'); - expect(await TopTraitsFive.getText()).toEqual('Realistic (21)'); - expect(await TopTraitsFiveDescription.getText()).toEqual('People who are independent, stable, persistent, genuine, practical, and thrifty. They tend to be no-nonsense and down-to-earth while enjoying physical, athletic, or mechanical activity. They prefer things rather than ideas or people such as being outdoors, using tools, operating machines, interacting with animals, and working with their hands. They also value the natural, concrete, and tangible.'); - expect(await TopTraitsSix.getText()).toEqual('Artistic (17)'); - expect(await TopTraitsSixDescription.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 XCloseLink.click().then(function() { - browser.sleep(1000); - }); - browser.waitForAngular(); - await ShareResultsIcon.click(); - expect(await ShareResultsDivTitle.getText()).toEqual('Email Your Results'); - await SendButton.click(); - 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 ToTextBox.sendKeys('jhuerta@edmin'); - await SendButton.click(); - 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 CancelButton.click(); - browser.waitForAngular(); - /*await ShareResultsIcon.click();//INCONSISTENT - 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 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(); - browser.wait(EC.elementToBeClickable(ShareResultsIcon)); - browser.waitForAngular(); - browser.getCurrentUrl();*/ - }); -} - -function InterestSurveyResultsClusters() { - it(': InterestSurveyResultsClusters, should verify the Interest Survey Clusters widget and jump to learn more page', async function () { - var WidgetTitle = element(by.css('.row > .jrnys_lead-body-copy')); - var WidgetDescription = element(by.css('.row > span:nth-child(2)')); - var SecondAtAGlanceIcon = element(by.xpath('//div[2]/div/div/career-territory-card/territory-card/div/div/div/div/div/div[2]')); - var SelectButton = element(by.xpath('//territory-card-action-bar/div/button')); - var PathwaysLink = element(by.linkText('Pathways')); - var ClustersLink = element(by.linkText('Clusters')); - var BestMatchIcon = element(by.xpath('//territory-card-fit-status/div/div/div[2]')); - var AtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); - var AtAGlanceBackOfCardXCloseLink = element(by.xpath('//div[2]/div/div[2]/span')); - var OccupationCardEllipsis = element(by.xpath('//div/div/div[2]/div/i')); - var JourneymanIcon = element(by.xpath('/html/body/div[1]/div/div[2]/div[3]/div/survey-result-career/div/div/div[2]/div[1]/div[1]/div/career-territory-card/territory-card/div/div[3]/div[2]/territory-card-more-back/div/div/div/div/div[4]/div[2]')) - var LearnMoreButton = element(by.xpath('//div/div/div/div/div[2]/div[2]')); - var EC = protractor.ExpectedConditions; - var JourneyInfoIcon = element(by.css('.journey-info-circle')); - - expect(await WidgetTitle.getText()).toEqual('Clusters'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await SelectButton.click().then(function() { - browser.sleep(2500); - }); - expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.'); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await SelectButton.click().then(function() { - browser.sleep(2500); - }); - expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways > Occupations'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, click the Learn More icon of an occupation below.'); - await PathwaysLink.click().then(function() { - browser.sleep(2500); - }); - expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.'); - await ClustersLink.click().then(function() { - browser.sleep(2500); - }); - expect(await WidgetTitle.getText()).toEqual('Clusters'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await SelectButton.click().then(function() { - browser.sleep(2500); - }); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await SelectButton.click().then(function() { - browser.sleep(2500); - }); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - //expect(await BestMatchIcon.getText()).toContain('Best Fit'); EDM-1726 - await AtAGlanceIcon.click().then(function() { - browser.sleep(2500); - }); - await AtAGlanceBackOfCardXCloseLink.click().then(function() { - browser.sleep(2500); - }); - await OccupationCardEllipsis.click().then(function() { - browser.sleep(2500); - }); - await JourneymanIcon.click().then(function() { - browser.sleep(5000); - }); - browser.waitForAngular(); - browser.wait(EC.elementToBeClickable(JourneyInfoIcon)); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function InterestSurveyResultsCreateJourney() { - it(': InterestSurveyResultsCreateJourney, should create a Journey to Top Interest Survey Result', async function () { - var JourneySideBarHeaderOne = element(by.css('.side-bar-child-text > span')); - var JourneyInfoIcon = element(by.css('.journey-info-circle')); - var JourneyInfoDivTitle = element(by.css('.col-lg-12 > .ng-binding')); - var JourneyInfoDivSubText = element(by.css('.col-lg-12:nth-child(3)')); - var JourneyInfoDivXCloseLink = element(by.css('.fa-times')); - var JourneyEntryPoint = element(by.css('.journeyInput')); - var SelectEntryPointDropDown = element(by.css('.ng-scope:nth-child(1) > .sidebarScrollListTxt > .ng-binding')); - var StartYourJourneyButton = element(by.css('.journeyStartBtnEnable')); - var JourneysSideBarHeaderTwo = element(by.css('.sideBarSearchBarContainer > div:nth-child(1) > .ng-binding')); - var JourneySaveIcon = element(by.css('#journeyitem0 .mapActionBarActive > .fas')); - var JourneySaveDivTitle = element(by.css('h2')); - var JourneySaveDivDescription = element(by.css('p:nth-child(7)')); - var JourneyPersistButtonNo = element(by.css('.cancel')); - var JourneyPersistButtonYes = element(by.css('.confirm')); - var JourneyDetailsIcon = element(by.css('#journeyitem0 .journey-info-circle')); - var ActionTitleBar = element(by.css('.ng-binding:nth-child(2)')); - var Expand8thGradeSubJourney = element(by.css('.ng-scope:nth-child(4) > div > div .side-bar-journey-detail-child-txt:nth-child(5)')); - var ExpandSubjectMathematicsSubJourney = element(by.css('.ng-scope:nth-child(11) .side-bar-journey-detail-child-txt:nth-child(6)')); - var ExpandSubJourney = element(by.css('.ng-scope:nth-child(2) > div > div:nth-child(1) > .ng-isolate-scope .side-bar-journey-detail-child-txt:nth-child(6)')); - var UpOneLevelLink = element(by.css('div:nth-child(1) > .sidebarBackTxt')); - var EditJourneyLink = element(by.linkText('Edit Journey')); - var WayPointOne = element(by.css('.itemWaypoint:nth-child(1) > .itemTextContainer > .ng-binding')); - var WayPointTwo = element(by.css('.itemWaypoint:nth-child(2) > .itemTextContainer > .ng-binding')); - var WayPointThree = element(by.css('.itemWaypoint:nth-child(3) > .itemTextContainer > .ng-binding')); - var WayPointFour = element(by.css('.itemWaypoint:nth-child(4) > .itemTextContainer > .ng-binding')); - var WayPointFive = element(by.css('.itemWaypoint:nth-child(5) > .itemTextContainer > .ng-binding')); - var WayPointSix = element(by.css('.itemWaypoint:nth-child(6) > .itemTextContainer > .ng-binding')); - var SelectWayPointTwoEllipsis = element(by.css('.itemWaypoint:nth-child(2) > .dropdown > .fas')); - var DeleteLink = element(by.linkText('Delete')); - var DeleteDiv = element(by.css('.modal-content > .ng-scope div:nth-child(1)')); - var DeleteDivRemoveThisWaypoint = element(by.css('.btn:nth-child(3)')); - var cancel = element(by.css('.fa-times-circle')); - var ActionBarSaveIconOne = element(by.css('.mapActionBarActive:nth-child(2) > .fas')); - var Select12thGradeWayPointEllipsis = element(by.css('.itemWaypoint:nth-child(7) > .dropdown > .fas')); - var InsertAStop = element(by.linkText('Insert a Stop')); - var SixthGradeWayPoint = element(by.css('.itemWaypoint:nth-child(1) > .itemTextContainer > .ng-binding:nth-child(1)')); - var SeventhGradeWayPoint = element(by.css('.itemWaypoint:nth-child(2) > .itemTextContainer > .ng-binding:nth-child(1)')); - var EightGradeWayPoint = element(by.css('.itemWaypoint:nth-child(3) > .itemTextContainer > .ng-binding:nth-child(1)')); - var NinethGradeWayPoint = element(by.css('.itemWaypoint:nth-child(4) > .itemTextContainer > .ng-binding:nth-child(1)')); - var TenthGradeWayPoint = element(by.css('.itemWaypoint:nth-child(5) > .itemTextContainer > .ng-binding:nth-child(1)')); - var EleventhGradeWayPoint = element(by.css('.itemWaypoint:nth-child(6) > .itemTextContainer > .ng-binding:nth-child(1)')); - var TwelvethGradeWayPoint = element(by.css('.itemWaypoint:nth-child(7) > .itemTextContainer > .ng-binding:nth-child(1)')); - var ThirteenthWayPoint = element(by.css('.itemWaypoint:nth-child(8) > .itemTextContainer > .ng-binding:nth-child(1)')); - var FourteenthWayPoint = element(by.css('.itemWaypoint:nth-child(9) > .itemTextContainer > .ng-binding:nth-child(1)')); - var EditSearchText = element(by.css('.sidebarNoResults:nth-child(1)')); - var MapSearchTextBox = element(by.css('#searchBox')); - var MagnifyingGlassIcon = element(by.css('.glyphicon-search')); - var ActionTitleBarTwo = element(by.css('.sideBarSearchBarContainer > div:nth-child(1) > .ng-binding')); - var CertificationResultsTab = element(by.css('#tab-item-6 > .ng-binding'));//#tab-item-2 > .ng-binding')); - var ThirdResultViewOnMapIconIcon = element(by.css('#tab-content-6 #searchitem2 div:nth-child(6) > .fas'));//#tab-content-2 #searchitem2 div:nth-child(6) > .fas')); - var MapZoomInIcon = element(by.css('.glyphicon-plus')); - var ThirdResultAddIcon = element(by.css('#tab-content-6 #searchitem2 div:nth-child(5) > #mapActionBarJourneyIcon'));//#tab-content-2 #searchitem2 div:nth-child(5) > #mapActionBarJourneyIcon')); - var FifteenthWayPoint = element(by.css('.itemWaypoint:nth-child(10) > .itemTextContainer > .ng-binding')); - var ActionBarSaveIconTwo = element(by.css('.fa-save')); - var MapZoomOutIcon = element(by.css('.glyphicon-minus')); - var SelectCollegeWayPointEllipsis = element(by.css('.itemWaypoint:nth-child(9) > .dropdown > .fas')); - var ReOrderLink = element(by.linkText('Re-order')); - var GrabCollegeWayPoint = element(by.css('.selectedWaypoint > .itemTextContainer > .ng-binding:nth-child(1)')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - /*short cut to create journey - var Results = element(by.css('div:nth-child(6) .fa-chart-bar')); - var SecondAtAGlanceIcon = element(by.xpath('//div[2]/div/div/career-territory-card/territory-card/div/div/div/div/div/div[2]')); - var Select = element(by.xpath('//territory-card-action-bar/div/button')); - var Journey = element(by.xpath('//action-journey/span')); - await Results.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await Select.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await Select.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(SecondAtAGlanceIcon).perform().then(function() { - browser.sleep(2500); - }); - await Journey.click().then(function() { - browser.sleep(5000); - });//end*/ - - /*short cut to retrieve journey - var MyJourneys = element(by.css('#nbMyJourneys .span-navbar-hover')); - var Journey = element(by.xpath('//div[2]/div/div/span')); - var ViewOnMap = element(by.css('.col-md-4 > .btn-info')); - await MyJourneys.click().then(function() { - browser.sleep(2500); - }); - await Journey.click().then(function() { - browser.sleep(2500); - }); - await ViewOnMap.click().then(function() { - browser.sleep(2500); - });//end - hide upto row 829*/ - - expect(await JourneySideBarHeaderOne.getText()).toEqual('Create Your Journey'); - await JourneyInfoIcon.click().then(function() { - browser.sleep(1000); - }); - expect(await JourneyInfoDivTitle.getText()).toEqual('Create Your Journey'); - expect(await JourneyInfoDivSubText.getText()).toEqual('A Journey is your driving direction. Enter a starting location, such as your current grade, as well as the destination you are trying to reach, like an occupation. From there we will provide you with possible pathways to reach your goal.'); - await JourneyInfoDivXCloseLink.click().then(function() { - browser.sleep(1000); - }); - await JourneyEntryPoint.click(); - browser.waitForAngular(); - await JourneyEntryPoint.sendKeys('6'); - await SelectEntryPointDropDown.click(); - browser.waitForAngular(); - await StartYourJourneyButton.click(); - browser.waitForAngular(); - expect(await JourneysSideBarHeaderTwo.getText()).toEqual('Journey Search Results'); - browser.actions().mouseMove(JourneySaveIcon).perform().then(function() { - browser.sleep(1000); - }); - await JourneySaveIcon.click().then(function() { - browser.sleep(5000); - }); - expect(await JourneySaveDivTitle.getText()).toEqual('Journey saved!'); - expect(await JourneySaveDivDescription.getText()).toEqual('Would you like this journey to persist on the map?'); - await JourneyPersistButtonYes.click().then(function() { - browser.sleep(2500); - }); - await JourneyDetailsIcon.click().then(function() { - browser.sleep(5000); - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Search Results'); - await Expand8thGradeSubJourney.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(element(by.css('.ng-scope:nth-child(5) div:nth-child(2) .side-bar-journey-detail-child-txt:nth-child(5)'))).perform().then(function() { - browser.sleep(2500); - }); - await ExpandSubjectMathematicsSubJourney.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(JourneyDetailsIcon).perform().then(function() { - browser.sleep(2500); - }); - await ExpandSubJourney.click().then(function() { - browser.sleep(5000); - }); - await ExpandSubJourney.click().then(function() { - browser.sleep(5000); - }); - await ExpandSubJourney.click().then(function() { - browser.sleep(5000); - }); - await UpOneLevelLink.click().then(function() { - browser.sleep(5000); - }); - await UpOneLevelLink.click().then(function() { - browser.sleep(5000); - }); - await EditJourneyLink.click().then(function() { - browser.sleep(2500) - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); - expect(await WayPointOne.getText()).toEqual('Geometry'); - expect(await WayPointTwo.getText()).toEqual('Expressions and Equations'); - expect(await WayPointThree.getText()).toEqual('Mathematical Practices'); - expect(await WayPointFour.getText()).toEqual('The Number System'); - expect(await WayPointFive.getText()).toEqual('Statistics and Probability'); - expect(await WayPointSix.getText()).toEqual('Functions'); - await SelectWayPointTwoEllipsis.click().then(function() { - browser.sleep(2500); - }); - browser.actions().mouseMove(DeleteLink).perform().then(function() { - browser.sleep(1000); - }); - await DeleteLink.click().then(function() { - browser.sleep(2500); - }); - expect(await DeleteDiv.getText()).toEqual('Are you sure you want to remove Expressions and Equations from this journey?'); - await DeleteDivRemoveThisWaypoint.click().then(function() { - browser.sleep(2500); - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); - expect(await WayPointOne.getText()).toEqual('Geometry'); - expect(await WayPointTwo.getText()).toEqual('Mathematical Practices'); - expect(await WayPointThree.getText()).toEqual('The Number System'); - expect(await WayPointFour.getText()).toEqual('Statistics and Probability'); - expect(await WayPointFive.getText()).toEqual('Functions'); - await ActionBarSaveIconOne.click().then(function() { - browser.sleep(2500); - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Search Results'); - await UpOneLevelLink.click().then(function() { - browser.sleep(5000); - }); - await UpOneLevelLink.click().then(function() { - browser.sleep(5000); - }); - await EditJourneyLink.click().then(function() { - browser.sleep(2500) - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Edit'); - expect(await SixthGradeWayPoint.getText()).toEqual('6'); - expect(await SeventhGradeWayPoint.getText()).toEqual('7'); - expect(await EightGradeWayPoint.getText()).toEqual('8'); - expect(await NinethGradeWayPoint.getText()).toEqual('9'); - expect(await TenthGradeWayPoint.getText()).toEqual('10'); - expect(await EleventhGradeWayPoint.getText()).toEqual('11'); - browser.actions().mouseMove(FourteenthWayPoint).perform().then(function() { - browser.sleep(1000); - }); - expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); - expect(await ThirteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); - expect(await FourteenthWayPoint.getText()).toEqual('Administrative Services Managers'); - await Select12thGradeWayPointEllipsis.click().then(function() { - browser.sleep(2500) - }); - browser.actions().mouseMove(InsertAStop).perform().then(function() { - browser.sleep(1000); - }); - await InsertAStop.click().then(function() { - browser.sleep(2500); - }); - expect(await ActionTitleBar.getText()).toEqual('Journey Add Stop'); - expect(await EditSearchText.getText()).toEqual('Use the search bar above to find a stop to add to your journey, or pick one from the map.'); - await MapSearchTextBox.sendKeys('Engineer').then(function() { - browser.sleep(2500); - }); - await MagnifyingGlassIcon.click().then(function() { - browser.sleep(5000); - }); - expect(await ActionTitleBarTwo.getText()).toEqual('Search Results'); - await CertificationResultsTab.click().then(function() { - browser.sleep(5000); - }); - browser.actions().mouseMove(ThirdResultViewOnMapIconIcon).perform().then(function() { - browser.sleep(1000); - }); - await ThirdResultViewOnMapIconIcon.click().then(function() { - browser.sleep(5000); - }); - await MapZoomInIcon.click().then(function() { - browser.sleep(2500); - }); - await MapZoomInIcon.click().then(function() { - browser.sleep(2500); - }); - await ThirdResultAddIcon.click().then(function() { - browser.sleep(2500); - }); - expect(await SixthGradeWayPoint.getText()).toEqual('6'); - expect(await SeventhGradeWayPoint.getText()).toEqual('7'); - expect(await EightGradeWayPoint.getText()).toEqual('8'); - expect(await NinethGradeWayPoint.getText()).toEqual('9'); - expect(await TenthGradeWayPoint.getText()).toEqual('10'); - expect(await EleventhGradeWayPoint.getText()).toEqual('11'); - browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { - browser.sleep(1000); - }); - expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); - expect(await ThirteenthWayPoint.getText()).toEqual('National Chief Engineer'); - expect(await FourteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); - expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); - await ActionBarSaveIconTwo.click().then(function() { - browser.sleep(2500); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000); - }); - await MapZoomOutIcon.click().then(function() { - browser.sleep(1000) - }); - /*browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { - browser.sleep(1000); - });*/ - await EditJourneyLink.click().then(function() { - browser.sleep(2500) - }); - await SelectCollegeWayPointEllipsis.click().then(function() { - browser.sleep(2500) - }); - await ReOrderLink.click().then(function() { - browser.sleep(2500) - }); - browser.actions().dragAndDrop(GrabCollegeWayPoint, ThirteenthWayPoint).mouseUp().perform(); - browser.sleep(2500) - expect(await SixthGradeWayPoint.getText()).toEqual('6'); - expect(await SeventhGradeWayPoint.getText()).toEqual('7'); - expect(await EightGradeWayPoint.getText()).toEqual('8'); - expect(await NinethGradeWayPoint.getText()).toEqual('9'); - expect(await TenthGradeWayPoint.getText()).toEqual('10'); - expect(await EleventhGradeWayPoint.getText()).toEqual('11'); - browser.actions().mouseMove(FifteenthWayPoint).perform().then(function() { - browser.sleep(1000); - }); - expect(await TwelvethGradeWayPoint.getText()).toEqual('12'); - expect(await ThirteenthWayPoint.getText()).toEqual('Business Administration B.A./B.S.'); - expect(await FourteenthWayPoint.getText()).toEqual('National Chief Engineer'); - expect(await FifteenthWayPoint.getText()).toEqual('Administrative Services Managers'); - await ActionBarSaveIconOne.click().then(function() { - browser.sleep(2500); - }); - await DashboardHeaderLink.click().then(function() { - browser.sleep(5000); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function SkillsAssessmentWidget() { - it(': SkillsAssessmentWidget, should take Skills Assessment', async function () { - var InterestRetakeLink = element(by.css('div:nth-child(2) > .fa-tasks')); - var SkillsAssessmentPageTitle = element(by.css('.jrnys_lead-body-copy')); - var SkillsQuestion = element(by.css('.questionText > .ng-binding:nth-child(1)')); - var SkillsSubQuestion = element(by.css('.questionText > .ng-binding:nth-child(2)')); - var BeginnerIcon = element(by.id('emoji_0_0')); - var BasicIcon = element(by.id('emoji_0_1')); - var SkilledIcon = element(by.id('emoji_0_2')); - var AdvancedIcon = element(by.id('emoji_0_3')); - var ExpertIcon = element(by.id('emoji_0_4')); - var PreviousQuestion = element(by.linkText('< Previous Question')); - var SkillsAssessmentResultPageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); - var YourTop3SkillsWidgetTitle = element(by.css('.fullHeight > .jrnys_lead-body-copy')); - var FitHeader = element(by.css('.active .jrnys_lead-body-copy')); - var BestFitHeaderOne = element(by.css('.item:nth-child(1) .ng-binding:nth-child(2) > .ng-binding')); - var DescriptionOne = element(by.css('.active .ng-binding:nth-child(2)')); - var BestFitHeaderTwo = element(by.css('.item:nth-child(1) .ng-binding:nth-child(3) > .ng-binding')); - var DescriptionTwo = element(by.css('.active .ng-binding:nth-child(3)')); - var BestFitHeaderThree = element(by.css('.item:nth-child(1) .ng-binding:nth-child(4) > .ng-binding')); - var DescriptionThree = element(by.css('.active .ng-binding:nth-child(4)')); - var CarrouselRightScroll = element(by.css('.glyphicon-chevron-right')); - var GreatFitHeaderOne = element(by.css('.item:nth-child(2) .ng-binding:nth-child(2) > .ng-binding')); - var GreatFitHeaderTwo = element(by.css('.item:nth-child(2) .ng-binding:nth-child(3) > .ng-binding')); - var GreatFitHeaderThree = element(by.css('.item:nth-child(2) .ng-binding:nth-child(4) > .ng-binding')); - var GoodFitHeaderOne = element(by.css('.item:nth-child(3) .ng-binding:nth-child(2) > .ng-binding')); - var GoodFitHeaderTwo = element(by.css('.item:nth-child(3) .ng-binding:nth-child(3) > .ng-binding')); - var GoodFitHeaderThree = element(by.css('.item:nth-child(3) .ng-binding:nth-child(4) > .ng-binding')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - /*browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 610);').then(function() { - browser.sleep(2500); - }); - await InterestRetakeLink.click().then(function() { - browser.sleep(5000); - }); - expect(await SkillsAssessmentPageTitle.getText()).toEqual('Skills Assessment'); - expect(await SkillsQuestion.getText()).toEqual('Administration and Management'); - expect(await SkillsSubQuestion.getText()).toEqual('How much do you know about business planning and leadership?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Biology'); - expect(await SkillsSubQuestion.getText()).toEqual('How much do you know about plant, animal and cell functions?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Body Coordination'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you coordinate moving your arms, legs, and torso together?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Building and Construction'); - expect(await SkillsSubQuestion.getText()).toEqual('How much do you know about construction materials, methods, and tools?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Chemistry'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know chemistry?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Clerical'); - expect(await SkillsSubQuestion.getText()).toEqual('How much do you know about administrative tasks and processes?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Complex Problem Solving'); - expect(await SkillsSubQuestion.getText()).toEqual('How good are you at figuring out the best way to solve a problem?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Computers and Electronics'); - expect(await SkillsSubQuestion.getText()).toEqual('How effective are you at using electronic equipment?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Customer and Personal Service'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know how to handle customer needs and resolve service problems?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Economics and Accounting'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know banking and financial systems?'); - await AdvancedIcon.click(); - browser.sleep(2500); - await PreviousQuestion.click(); - browser.sleep(2500); - expect(await SkillsQuestion.getText()).toEqual('Economics and Accounting'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know banking and financial systems?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Fine Arts'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the theory and techniques of an art form such as music, painting, drama, or other?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Foreign Language'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know a foreign language?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Helping People'); - expect(await SkillsSubQuestion.getText()).toEqual('How good are you at understanding how to help people?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Instructing'); - expect(await SkillsSubQuestion.getText()).toEqual('How skilled are you at teaching people how to do something?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Management of Financial Resources'); - expect(await SkillsSubQuestion.getText()).toEqual('What level of financial decision-maker are you?'); - await ExpertIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Mathematics'); - expect(await SkillsSubQuestion.getText()).toEqual('What is your level of math skill?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Mechanical'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you design, use, repair, and maintain machines?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Medicine and Dentistry'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know how to provide health care?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Memorization'); - expect(await SkillsSubQuestion.getText()).toEqual('How good is your memory?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Monitoring'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you assess your or others’ work?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Negotiation'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you persuade others to see different points of view or compromise?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Operations Analysis'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you analyze needs and requirements, then make a plan that meets them?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Personnel and Human Resources'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the principles and procedures for recruiting, hiring, and training employees?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Production and Processing'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you oversee manufacturing and distribution processes?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Programming'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you write computer programs?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Psychology'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the methods of research, assessment, and treatment of human behavior?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Public Safety and Security'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the equipment, policies, procedures, and strategies used to promote security operations?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Quality Control Analysis'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you develop and use testing processes?'); - await AdvancedIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Repairing'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you repair machines or systems using the needed tools?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Sales and Marketing'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you perform marketing strategies and tactics?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Science'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you use scientific rules and methods to solve problems?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Sociology and Anthropology'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the theories of group behavior, societal trends and influences, and human culture?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Speaking'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you convey information when you speak?'); - await SkilledIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Systems Analysis'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you analyze systems?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Teaching and Course Design'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the principles and methods of instruction?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Telecommunications'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you understand telecom systems?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Therapy and Counseling'); - expect(await SkillsSubQuestion.getText()).toEqual('How well do you know the principles and methods used in counseling?'); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Time Management'); - expect(await SkillsSubQuestion.getText()).toEqual("How well do you manage your and others' time?"); - await BasicIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Troubleshooting'); - expect(await SkillsSubQuestion.getText()).toEqual('How well can you identify and fix problems in machines or technology?'); - await BeginnerIcon.click(); - expect(await SkillsQuestion.getText()).toEqual('Writing'); - expect(await SkillsSubQuestion.getText()).toEqual("How well does your writing effectively communicate to an audience's particular need?"); - await BeginnerIcon.click(); - browser.sleep(10000); - expect(await SkillsAssessmentResultPageTitle.getText()).toEqual('Skills Assessment Result'); - expect(await YourTop3SkillsWidgetTitle.getText()).toEqual('Your top 3 skills View All'); - //expect(await FitHeader.getText()).toEqual('BEST FIT'); EDM-1726 - expect(await BestFitHeaderOne.getText()).toEqual('Building and Construction'); - expect(await DescriptionOne.getText()).toContain('Knowledge of materials, methods, and the tools involved in the construction or repair of houses, buildings, or other structures such as highways and roads.'); - expect(await BestFitHeaderTwo.getText()).toEqual('Foreign Language'); - expect(await DescriptionTwo.getText()).toContain('Knowledge of the structure and content of a foreign (non-English) language including the meaning and spelling of words, rules of composition and grammar, and pronunciation.'); - expect(await BestFitHeaderThree.getText()).toEqual('Management of Financial Resources'); - expect(await DescriptionThree.getText()).toContain('Making spending decisions and keeping track of what is spent.'); - await CarrouselRightScroll.click(); - browser.sleep(2500); - expect(await FitHeader.getText()).toEqual('GREAT FIT'); - expect(await GreatFitHeaderOne.getText()).toEqual('Administration and Management'); - expect(await DescriptionOne.getText()).toContain('Knowledge of business and management principles involved in strategic planning, resource allocation, human resources modeling, leadership technique, production methods, and coordination of people and resources.'); - expect(await GreatFitHeaderTwo.getText()).toEqual('Chemistry'); - expect(await DescriptionTwo.getText()).toContain('Knowledge of the chemical composition, structure, and properties of substances and of the chemical processes and transformations that they undergo. This includes uses of chemicals and their interactions, danger signs, production techniques, and disposal methods.'); - expect(await GreatFitHeaderThree.getText()).toEqual('Mathematics'); - expect(await DescriptionThree.getText()).toContain('Using math to solve problems.'); - await CarrouselRightScroll.click(); - browser.sleep(2500); - expect(await FitHeader.getText()).toEqual('GOOD FIT'); - expect(await GoodFitHeaderOne.getText()).toEqual('Biology'); - expect(await DescriptionOne.getText()).toContain('Knowledge of plant and animal organisms, their tissues, cells, functions, interdependencies, and interactions with each other and the environment.'); - expect(await GoodFitHeaderTwo.getText()).toEqual('Body Coordination'); - expect(await DescriptionTwo.getText()).toContain('Moving your arms, legs, and mid-section together while your whole body is moving.'); - expect(await GoodFitHeaderThree.getText()).toEqual('Clerical'); - expect(await DescriptionThree.getText()).toContain('Knowledge of administrative and clerical procedures and systems such as word processing, managing files and records, stenography and transcription, designing forms, and other office procedures and terminology.'); - await CarrouselRightScroll.click(); - browser.sleep(2500); - //expect(await FitHeader.getText()).toEqual('BEST FIT'); EDM-1726 - await DashboardHeaderLink.click().then(function() { - browser.sleep(5000); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function SkillsAssessmentResults() { - it(': SkillsAssessmentResults, should interact with Skills Assessment widget and validate results', async function () { - var SkillsAssessmentWidgetTitle = element(by.css('.bigScreenHeader')); - var BestFitHeader = element(by.css('div:nth-child(2) > b')); - var SkillsResultsOneTitle = element(by.css('.ng-scope:nth-child(4) > div > div > .ng-binding:nth-child(1)')); - var SkillsResultsOneDescription = element(by.css('.ng-scope:nth-child(4) .skillProfilerResultTruncateText')); - var SkillsResultsTwoTitle = element(by.css('.skillProfilerResultsSpacing:nth-child(5) > div > div > .ng-binding')); - var SkillsResultsTwoDescription = element(by.css('.ng-scope:nth-child(5) .skillProfilerResultTruncateText')); - var SkillsResultsThreeTitle = element(by.css('.ng-scope:nth-child(6) > div > div > .ng-binding')); - var SkillsResultsThreeDescription = element(by.css('.ng-scope:nth-child(6) .skillProfilerResultTruncateText')); - var SkillsResultsLink = element(by.css('div:nth-child(7) .fa-chart-bar')); - var SkillsAssessmentResultPageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); - var ViewAllLink = element(by.linkText('View All')); - var BestFitDivHeader = element(by.css('.row:nth-child(1) > .col-xs-10 > .jrnys_lead-body-copy')); - var DivHeaderOne = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(2) > .ng-binding')); - var DivDescriptionOne = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(2)')); - var DivHeaderTwo = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(3) > .ng-binding')); - var DivDescriptionTwo = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(3)')); - var DivHeaderThree = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(4) > .ng-binding')); - var DivDescriptionThree = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(4)')); - var DivHeaderFour = element(by.css('.row:nth-child(1) > .col-xs-10 > .ng-binding:nth-child(5) > .ng-binding')); - var DivDescriptionFour = element(by.css('.row:nth-child(1) .ng-binding:nth-child(5)')); - var DivHeaderFive = element(by.css('.row:nth-child(1) .ng-binding:nth-child(6) > .ng-binding')); - var DivDescriptionFive = element(by.css('.row:nth-child(1) .ng-binding:nth-child(6)')); - var DivHeaderSix = element(by.css('.row:nth-child(1) .ng-binding:nth-child(7) > .ng-binding')); - var DivDescriptionSix = element(by.css('.row:nth-child(1) .ng-binding:nth-child(7)')); - var DivHeaderSeven = element(by.css('.row:nth-child(1) .ng-binding:nth-child(8) > .ng-binding')); - var DivDescriptionSeven = element(by.css('.row:nth-child(1) .ng-binding:nth-child(8)')); - var BestFitDivXCloseLink = element(by.css('.close')); - var SkillsResultCardOne = element(by.xpath('//div[2]/span')); - var SkillsResultCardTwo = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var SkillsResultCardThree = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var SkillsResultCardFour = element(by.xpath('//div[2]/div/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var SkillsResultCardFive = element(by.xpath('//div[2]/div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var SkillsResultCardSix = element(by.xpath('//div[2]/div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - /*browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 610);').then(function() { - browser.sleep(5000); - }); - expect(await SkillsAssessmentWidgetTitle.getText()).toEqual('Skills Assessment Results'); - //expect(await BestFitHeader.getText()).toEqual('BEST FIT'); EDM-1726 - expect(await SkillsResultsOneTitle.getText()).toEqual('Building and Construction'); - expect(await SkillsResultsOneDescription.getText()).toEqual('Knowledge of materials, methods, and the tools involved in the construction or repair of houses, buildings, or other structures such as highways and roads.'); - expect(await SkillsResultsTwoTitle.getText()).toEqual('Foreign Language'); - expect(await SkillsResultsTwoDescription.getText()).toEqual('Knowledge of the structure and content of a foreign (non-English) language including the meaning and spelling of words, rules of composition and grammar, and pronunciation.'); - expect(await SkillsResultsThreeTitle.getText()).toEqual('Management of Financial Resources'); - expect(await SkillsResultsThreeDescription.getText()).toEqual('Making spending decisions and keeping track of what is spent.'); - await SkillsResultsLink.click().then(function() { - browser.sleep(5000); - }); - expect(await SkillsAssessmentResultPageTitle.getText()).toEqual('Skills Assessment Result'); - await ViewAllLink.click().then(function() { - browser.sleep(1000); - }); - //expect(await BestFitDivHeader.getText()).toEqual('BEST FIT'); EDM-1726 - expect(await DivHeaderOne.getText()).toEqual('Building and Construction'); - expect(await DivDescriptionOne.getText()).toContain('Knowledge of materials, methods, and the tools involved in the construction or repair of houses, buildings, or other structures such as highways and roads.'); - expect(await DivHeaderTwo.getText()).toEqual('Foreign Language'); - expect(await DivDescriptionTwo.getText()).toContain('Knowledge of the structure and content of a foreign (non-English) language including the meaning and spelling of words, rules of composition and grammar, and pronunciation.'); - expect(await DivHeaderThree.getText()).toEqual('Management of Financial Resources'); - expect(await DivDescriptionThree.getText()).toContain('Making spending decisions and keeping track of what is spent.'); - expect(await DivHeaderFour.getText()).toEqual('Operations Analysis'); - expect(await DivDescriptionFour.getText()).toContain('Figuring out what a product or service needs to be able to do.'); - expect(await DivHeaderFive.getText()).toEqual('Personnel and Human Resources'); - expect(await DivDescriptionFive.getText()).toContain('Knowledge of principles and procedures for personnel recruitment, selection, training, compensation and benefits, labor relations and negotiation, and personnel information systems.'); - expect(await DivHeaderSix.getText()).toEqual('Programming'); - expect(await DivDescriptionSix.getText()).toContain('Writing computer programs.'); - expect(await DivHeaderSeven.getText()).toEqual('Quality Control Analysis'); - expect(await DivDescriptionSeven.getText()).toContain('Testing how well a product or service works.'); - await BestFitDivXCloseLink.click().then(function() { - browser.sleep(1000); - }); - browser.actions().mouseMove(element(by.xpath('//div[2]/div/div/career-territory-card/territory-card/div/div/div/div/div/div[2]'))).perform().then(function() { - browser.sleep(2500); - }); - expect(await SkillsResultCardOne.getText()).toEqual('Business Management & Administration'); - expect(await SkillsResultCardTwo.getText()).toEqual('Architecture & Construction'); - expect(await SkillsResultCardThree.getText()).toEqual('Science, Technology, Engineering & Math'); - //Scroll to bottom of page - browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { - browser.sleep(2500); - }); - expect(await SkillsResultCardFour.getText()).toEqual('Transportation, Distribution & Logistics'); - expect(await SkillsResultCardFive.getText()).toEqual('Cyber Security'); - expect(await SkillsResultCardSix.getText()).toEqual('Finance'); - await DashboardHeaderLink.click().then(function() { - browser.sleep(10000); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function BeginCareerExploration() { - it(': BeginCareerExploration, should interact with Begin Career Exploration widget', async function () { - var BeginCareerExplorationTitle = element(by.css('tbody .jrnys_lead-body-copy')); - var BeginCareerExplorationDescription = element(by.css('.fullHeight:nth-child(1) > table > tbody > tr:nth-child(3) > td')); - var ExploreCareersButton = element(by.css('td > .btn-info')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - /*browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 610);').then(function() { - browser.sleep(5000); - }); - expect(await BeginCareerExplorationTitle.getText()).toEqual('Begin Career Exploration'); - expect(await BeginCareerExplorationDescription.getText()).toEqual('We like your adventurous spirit. Search for a career that aligns with your interests and Learn More about it.'); - await ExploreCareersButton.click().then(function() { - browser.sleep(10000); - }); - await DashboardHeaderLink.click().then(function() { - browser.sleep(10000); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function MyCareersCarousel() { - it(': MyCareersCarousel, should cycle through Recommended Careers carousel and click the View More link', async function () { - var WidgetTitle = element(by.css('.fullHeight > .jrnys_lead-body-copy')); - var CarrouselRightScroll = element(by.xpath('//div[3]/table/tbody/tr/td/div/div/a[2]/span')); - var ViewMoreLink = element(by.linkText('View More')); - var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); - var FollowFirstOccupationCardIcon = element(by.xpath('//div[3]/div/div/territory-card-social/div/social-follow-icon/span/i')); - var FilterIcon = element(by.css('.widgetControlContainer')); - var FilterTitle = element(by.css('tr:nth-child(1) > .ng-binding')); - var MyResultsHeader = element(by.css('#recommendedCareerFilter tr:nth-child(2) > td')); - var InterestSurveyResults = element(by.css('.ng-scope:nth-child(3) > .ng-binding:nth-child(2)')); - var InterestSurveyResultsCheckBox = element(by.css('.ng-scope:nth-child(3) > td > input')); - var SkillsAssessmentResults = element(by.css('.ng-scope:nth-child(4) > .ng-binding:nth-child(2)')); - var SkillsAssessmentResultsCheckBox = element(by.css('.ng-scope:nth-child(4) input')); - var MyFollowing = element(by.css('.ng-scope:nth-child(5) > .ng-binding:nth-child(2)')); - var MyFollowingCheckBox = element(by.css('.ng-scope:nth-child(5) input')); - var RequiredJobPrepHeader= element(by.css('#recommendedCareerFilter tr:nth-child(6) > td')); - var MayRequireHighSchoolDiplomaOrGED = element(by.css('.ng-scope:nth-child(7) > .ng-binding:nth-child(2)')); - var MayRequireHighSchoolDiplomaOrGEDCheckBox = element(by.css('.ng-scope:nth-child(7) input')); - var HighSchoolDiploma = element(by.css('.ng-scope:nth-child(8) > .ng-binding:nth-child(2)')); - var HighSchoolDiplomaCheckBox = element(by.css('.ng-scope:nth-child(8) input')); - var VocationalTrainingOrAssociatesDegrees = element(by.css('.ng-scope:nth-child(9) > .ng-binding')); - var VocationalTrainingOrAssociatesDegreesCheckBox = element(by.css('.ng-scope:nth-child(9) input')); - var FourYearBachelorDegrees = element(by.css('.ng-scope:nth-child(10) > .ng-binding')); - var FourYearBachelorDegreesCheckBox = element(by.css('.ng-scope:nth-child(10) input')); - var GraduateSchoolOrProfessionalDegree = element(by.css('.ng-scope:nth-child(11) > .ng-binding')); - var GraduateSchoolOrProfessionalDegreeCheckBox = element(by.css('.ng-scope:nth-child(11) input')); - var FitHeader = element(by.css('#recommendedCareerFilter tr:nth-child(12) > td')); - var Best = element(by.css('.ng-scope:nth-child(13) > .ng-binding')); - var BestCheckBox = element(by.css('.ng-scope:nth-child(13) input')); - var Great = element(by.css('.ng-scope:nth-child(14) > .ng-binding')); - var GreatCheckBox = element(by.css('.ng-scope:nth-child(14) input')); - var Good = element(by.css('.ng-scope:nth-child(15) > .ng-binding')); - var GoodCheckBox = element(by.css('.ng-scope:nth-child(15) input')); - var ShowResultsByHeader = element(by.css('#recommendedCareerFilter tr:nth-child(16) > td')); - var BrightOutlook = element(by.css('.ng-scope:nth-child(17) > .ng-binding')); - var BrightOutlookCheckBox = element(by.css('.ng-scope:nth-child(17) input')); - var Green = element(by.css('.ng-scope:nth-child(18) > .ng-binding')); - var GreenCheckBox = element(by.css('.ng-scope:nth-child(18) input')); - var Apprenticeships = element(by.css('.ng-scope:nth-child(19) > .ng-binding')); - var ApprenticeshipsCheckBox = element(by.css('.ng-scope:nth-child(19) input')); - var Following = element(by.css('.ng-scope:nth-child(20) > .ng-binding')); - var FollowingCheckBox = element(by.css('.ng-scope:nth-child(20) input')); - var SortHeader = element(by.css('#recommendedCareerFilter tr:nth-child(21) > td')); - var AtoZ = element(by.css('#recommendedCareerFilter tr:nth-child(22) > td:nth-child(2)')); - var AtoZRadioButton = element(by.css('td > .ng-pristine')); - var ZtoA = element(by.css('#recommendedCareerFilter tr:nth-child(23) > td:nth-child(2)')); - var ZtoARadioButton = element(by.css('tr:nth-child(23) .ng-pristine')); - var FilterButton = element(by.css('td > .btn-info')); - var NoResultsFoundAppliedFilters = element(by.css('.col-md-10')); - var BackLink = element(by.css('.btn-primary-back-mod')); - var NoResultsFound = element(by.css('.table-height:nth-child(1) td')); - var RemoveLeftFilterButton = element(by.css('.statusBtn:nth-child(1)')); - var RemoveShowMyResultsByFilterButton = element(by.css('.statusBtn:nth-child(2)')); - var RemoveRightFilterButton = element(by.css('.statusBtn:nth-child(3)')); - var WidgetFilterIcon = element(by.css('.fa-filter')); - var FilterButtonTwo = element(by.css('tr:nth-child(24) .btn-info')); - var RemoveLastFilterButton = element(by.css('.statusBtn')); - var FirstOccupationCardTitle = element(by.xpath('//div[3]/div/div[2]/span')); - var FirstOccupationCardAtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); - var FirstOccupationCardBestFitIcon = element(by.xpath('//territory-card-fit-status/div/div/div[2]')); - var SecondOccupationCardTitle = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - var ThirdOccupationCardTitle = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[3]/div/div[2]/span')); - - /*browser.actions().mouseMove(element(by.css('.widget-padding:nth-child(2) > .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 1250);').then(function() { - browser.sleep(5000); - }); - expect(await WidgetTitle.getText()).toEqual('My Careers View All'); - await CarrouselRightScroll.click(); - browser.sleep(2500); - await CarrouselRightScroll.click(); - browser.sleep(2500); - await CarrouselRightScroll.click(); - browser.sleep(2500); - await CarrouselRightScroll.click(); - browser.sleep(2500); - await ViewMoreLink.click(); - browser.sleep(5000); - expect(await PageTitle.getText()).toEqual('My Careers'); - await FollowFirstOccupationCardIcon.click().then(function() { - browser.sleep(3000); - }); - await FilterIcon.click(); - browser.sleep(2500); - expect(await FilterTitle.getText()).toEqual('Filter'); - expect(await MyResultsHeader.getText()).toEqual('My Results'); - expect(await InterestSurveyResults.getText()).toContain('Interest Survey Results ('); - expect(await SkillsAssessmentResults.getText()).toContain('Skills Assessment Results ('); - await SkillsAssessmentResultsCheckBox.click().then(function() { - browser.sleep(1000); - }); - expect(await MyFollowing.getText()).toEqual('My Following (5)'); - expect(await RequiredJobPrepHeader.getText()).toEqual('Required Job Prep'); - expect(await MayRequireHighSchoolDiplomaOrGED.getText()).toContain('May Require High School Diploma or GED ('); - await MayRequireHighSchoolDiplomaOrGEDCheckBox.click().then(function() { - browser.sleep(1000); - }); - expect(await HighSchoolDiploma.getText()).toContain('High School Diploma ('); - expect(await VocationalTrainingOrAssociatesDegrees.getText()).toContain('Vocational Training or Associates Degree ('); - expect(await FourYearBachelorDegrees.getText()).toContain('4 Year Bachelor Degree ('); - expect(await GraduateSchoolOrProfessionalDegree.getText()).toContain('Graduate School or Professional Degree ('); - expect(await FitHeader.getText()).toEqual('Fit'); - expect(await Best.getText()).toContain('Best ('); - await BestCheckBox.click().then(function() { - browser.sleep(1000); - }); - expect(await Great.getText()).toContain('Great ('); - expect(await Good.getText()).toContain('Good ('); - await GoodCheckBox.click().then(function() { - browser.sleep(1000); - }); - expect(await ShowResultsByHeader.getText()).toEqual('Show Results By'); - expect(await BrightOutlook.getText()).toContain('Bright Outlook ('); - expect(await Green.getText()).toContain('Green ('); - expect(await Apprenticeships.getText()).toContain('Apprenticeship ('); - expect(await Following.getText()).toEqual('Following (5)'); - await FollowingCheckBox.click().then(function() { - browser.sleep(1000); - }); - expect(await SortHeader.getText()).toEqual('Sort'); - expect(await AtoZ.getText()).toEqual('A to Z'); - expect(await ZtoA.getText()).toEqual('Z to A'); - await ZtoARadioButton.click().then(function() { - browser.sleep(1000); - }); - await FilterButton.click().then(function() { - browser.sleep(2500); - }); - expect(await NoResultsFoundAppliedFilters.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.'); - await BackLink.click(); - browser.sleep(2500); - /*browser.actions().mouseMove(element(by.css('.widget-padding:nth-child(2) > .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); - });*/ - browser.executeScript('window.scrollTo(0, 1250);').then(function() { - browser.sleep(5000); - }); - expect(await NoResultsFound.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.'); - await RemoveLeftFilterButton.click().then(function() { - browser.sleep(2500); - }); - expect(await NoResultsFound.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.'); - await RemoveShowMyResultsByFilterButton.click().then(function() { - browser.sleep(2500); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Wind Energy Project Managers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Business Intelligence Analysts'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - await RemoveRightFilterButton.click().then(function() { - browser.sleep(2500); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Business Intelligence Analysts'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Wind Energy Project Managers'); - await FollowFirstOccupationCardIcon.click().then(function() { - browser.sleep(2500); - }); - await WidgetFilterIcon.click().then(function() { - browser.sleep(2500); - }); - expect(await Following.getText()).toEqual('Following (4)'); - await FollowingCheckBox.click().then(function() { - browser.sleep(1000); - }); - await FilterButtonTwo.click().then(function() { - browser.sleep(2500); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - await RemoveLastFilterButton.click().then(function() { - browser.sleep(2500); - }); - expect(await FirstOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('At a'); - expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); - expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); - //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Services Managers'); - browser.sleep(2500); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function SignOut() { - 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 SignOutButton.click().then(function() { - browser.sleep(2500); - }); - }); -} \ No newline at end of file diff --git a/interestSurveyResultsWidget_config.js b/interestSurveyResultsWidget_config.js new file mode 100644 index 0000000..4c012a1 --- /dev/null +++ b/interestSurveyResultsWidget_config.js @@ -0,0 +1,30 @@ +//interestSurveyResultsWidget_config.js + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['interestSurveyResultsWidget_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/interestSurveyResultsWidget_spec.js b/interestSurveyResultsWidget_spec.js new file mode 100644 index 0000000..f1f9f43 --- /dev/null +++ b/interestSurveyResultsWidget_spec.js @@ -0,0 +1,702 @@ +//interestSurveyResultsWidget_spec.js + +describe('Journeysmap script', function () { + //app-journeysmap landing page + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + + //Open browser + //browser.driver.manage().window().setSize(1600, 800); + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login').then(function() { + browser.sleep(1000); + }); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Login'); + }); + + //Sign In + SignIn(UserNameTextBox, PasswordTextBox); + + function SignIn(UserNameTextBox, PasswordTextBox) { + 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.'); + browser.sleep(2500); + await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + browser.sleep(2500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(2500); + }); + await NextButton.click().then(function() { + browser.sleep(5000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + } + + //<<<>>> + InterestSurveyResultsWidgetRetake(); + InterestSurveyResultsWidgetEdit(); + InterestSurveyResultsWidgetResults(); + + InterestSurveyResultsCreateJourney(); + + //Sign Out*/ + SignOut(); +}); + +function InterestSurveyResultsWidgetRetake() { + it(': InterestSurveyResultsWidgetRetake, retake interest survey', async function () { + var InterestSurveyRetake = element(by.css('div:nth-child(3) > .fa-tasks')); + var ActiveLanguageButton = element(by.css('.btn-primary')); + var InactiveLanguageButton = element(by.css('.btn-info > .ng-scope')); + var DislikeEmoji = element(by.id('emoji_0_0')); + var MehEmoji = element(by.id('emoji_0_1')); + var UnsureEmoji = element(by.id('emoji_0_2')); + var LikeItEmoji = element(by.id('emoji_0_3')); + var LoveItEmoji = element(by.id('emoji_0_4')); + var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); + var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); + 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')); + + //Scroll down to Interest Survey Results widget + browser.executeScript('window.scrollTo(0, 612);').then(function() { + browser.sleep(2500); + }); + //Retake Interest Survey + await InterestSurveyRetake.click().then(function() { + browser.sleep(5000); + }); + browser.waitForAngular(); + expect(await ActiveLanguageButton.getText()).toEqual('English'); + expect(await InactiveLanguageButton.getText()).toEqual('Español'); + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click();//5 + await LoveItEmoji.click(); + await LikeItEmoji.click(); + await UnsureEmoji.click(); + await LoveItEmoji.click(); + await DislikeEmoji.click();//10 + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await DislikeEmoji.click();//15 + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await MehEmoji.click(); + await DislikeEmoji.click();//20 + await DislikeEmoji.click(); + await LoveItEmoji.click(); + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click();//25 + await LikeItEmoji.click(); + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await LikeItEmoji.click();//30 + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click();//35 + await LoveItEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click(); + await DislikeEmoji.click();//40 + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click();//45 + await DislikeEmoji.click(); + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await MehEmoji.click(); + await DislikeEmoji.click();//50 + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LikeItEmoji.click();//55 + await LoveItEmoji.click(); + await LoveItEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click(); + await LikeItEmoji.click();//60 + browser.sleep(5000); + expect(await PageTitle.getText()).toEqual('Interest Survey Result'); + browser.sleep(5000); + await DashboardHeaderLink.click().then(function() { + browser.sleep(5000); + }); + browser.executeScript('window.scrollTo(0, 1250);').then(function() { + browser.sleep(5000); + }); + 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'); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function InterestSurveyResultsWidgetEdit() { + it(': InterestSurveyResultsWidgetEdit, should interact with Interest Survey Results widget, validate results', async function () { + var InterestSurveyWidgetTitle = element(by.css('.fullHeight:nth-child(2) > div:nth-child(2) > .jrnys_lead-body-copy > div')); + var InterestEditLink = element(by.css('.fa-pencil:nth-child(1)')); + var EditInterestDivTitle = element(by.css('#interests .jrnys_lead-body-copy')); + var EditRealisticTitle = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .jrnys_support-tex > .ng-binding')); + var EditRealisticTextBox = element(by.id('Realistic')); + var EditRealisticDescription = element(by.css('.ng-scope:nth-child(1) > .row-padding-mobile .color3a-color')); + var EditInvestigativeTitle = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .jrnys_support-tex > .ng-binding')); + var EditInvestigaviveTextBox = element(by.id('Investigative')); + var EditInvestigativeDescription = element(by.css('.ng-scope:nth-child(2) > .row-padding-mobile .color3a-color')); + var EditArtisticTitle = element(by.css('.ng-scope:nth-child(3) .jrnys_support-tex > .ng-binding')); + var EditArtisticTextBox = element(by.id('Artistic')); + var EditArtisticDescription = element(by.css('.ng-scope:nth-child(3) > .row-padding-mobile .color3a-color')); + var EditSocialTitle = element(by.css('.ng-scope:nth-child(4) .jrnys_support-tex > .ng-binding')); + var EditSocialTextBox = element(by.id('Social')); + var EditSocialDescription = element(by.css('.ng-scope:nth-child(4) > .row-padding-mobile .color3a-color')); + var EditEnterprisingTitle = element(by.css('.ng-scope:nth-child(5) .jrnys_support-tex > .ng-binding')); + var EditEnterprisingTextBox = element(by.id('Enterprising')); + var EditEnterprisingDescription = element(by.css('.ng-scope:nth-child(5) > .row-padding-mobile .color3a-color')); + var EditConventionalTitle = element(by.css('.ng-scope:nth-child(6) .jrnys_support-tex > .ng-binding')); + 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 TopResultTitleOne = element(by.css('.surveyResultSpacingTop > div > div > .ng-binding')); + var TopResultDescriptionOne = element(by.css('.surveyResultSpacingTop .surveyResultTruncateText')); + var TopResultsReadMoreLinkOne = element(by.css('.surveyResultSpacingTop > div > div:nth-child(2)')); + var TopResultsReadMoreTitle = element(by.css('div:nth-child(2) > div > .ng-binding:nth-child(2)')); + var TopResultsReadMoreDescriptionA = element(by.css('div:nth-child(3) > .ng-binding:nth-child(1)')); + var TopResultsReadMoreDescriptionB = element(by.css('div:nth-child(4) > .ng-binding')); + var TopResultsReadMoreCloseIcon = element(by.css('.close')); + 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')); + var AdministrativeServicesManagers = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AirTrafficControllers = element(by.css('#\\30 2c1f459-be14-4ea7-8229-404af8ccb881 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var TopResultTitleTwo = element(by.css('.surveyResultSpacing:nth-child(4) > div > div > .ng-binding')); + var TopResultDescriptionTwo = element(by.css('.ng-scope:nth-child(4) .surveyResultTruncateText')); + var TopResultsReadMoreLinkTwo = element(by.css('.surveyResultSpacing:nth-child(4) > div > div:nth-child(2)')); + var TopResultTitleThree = element(by.css('.surveyResultSpacing:nth-child(5) > div > div > .ng-binding')); + var TopResultDescriptionThree = element(by.css('.ng-scope:nth-child(5) .surveyResultTruncateText')); + var TopResultsReadMoreLinkThree = element(by.css('.surveyResultSpacing:nth-child(5) > div > div:nth-child(2)')); + + var InterestResultsLink = element(by.css('div:nth-child(6) .fa-chart-bar')); + var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); + var TopThreeTraitsHeader = element(by.css('.fullHeight > .jrnys_lead-body-copy')); + var TopThreeTraitsOne = element(by.css('.col-md-4:nth-child(1) .jrnys_lead-body-copy')); + var TopThreeTraitsDescriptionOne = element(by.css('.col-md-4:nth-child(1) .ng-binding:nth-child(2)')); + var TopThreeTraitsTwo = element(by.css('.col-md-4:nth-child(2) .jrnys_lead-body-copy')); + var TopThreeTraitsDescriptionTwo = element(by.css('.col-md-4:nth-child(2) .ng-binding:nth-child(2)')); + var TopThreeTraitsThree = element(by.css('.col-md-4:nth-child(3) .jrnys_lead-body-copy')); + var TopThreeTraitsDescriptionThree = element(by.css('.col-md-4:nth-child(3) .ng-binding:nth-child(2)')); + var ViewAllLink = element(by.linkText('View All')); + var TopTraitsOne = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); + var TopTraitsOneDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); + var TopTraitsTwo = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); + var TopTraitsTwoDescription = element(by.css('.row:nth-child(1) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); + var TopTraitsThree = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); + var TopTraitsThreeDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); + var TopTraitsFour = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); + var TopTraitsFourDescription = element(by.css('.row:nth-child(2) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); + var TopTraitsFive = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .jrnys_lead-body-copy')); + var TopTraitsFiveDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(1) > .ng-binding:nth-child(2)')); + var TopTraitsSix = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .jrnys_lead-body-copy')); + var TopTraitsSixDescription = element(by.css('.row:nth-child(3) > .col-md-6:nth-child(2) > .ng-binding:nth-child(2)')); + var XCloseIcon = element(by.css('.close')); + var ShareResultsIcon = element(by.css('.fa-share-alt')); + var ShareResultsDivTitle = element(by.css('#interestSurveyShareResult > .jrnys_lead-body-copy')); + var ToTextBox = element(by.css('tr:nth-child(2) .form-control')); + var FromTextBox = element(by.css('tr:nth-child(1) .form-control')); + var CancelButton = element(by.css('.btn-alt-info')); + var SendButton = element(by.css('tr:nth-child(7) .btn-info')); + var DivAlertTitle = element(by.css('h2')); + var DivAlertMessage = element(by.css('p:nth-child(7)')); + var DivOKButton = element(by.css('.confirm')); + var EC = protractor.ExpectedConditions; + + //Scroll down to Interest Survey Results widget + browser.executeScript('window.scrollTo(0, 612);').then(function() { + browser.sleep(2500); + }); + await InterestEditLink.click().then(function() { + browser.sleep(2500); + }); + expect(await EditInterestDivTitle.getText()).toEqual('Interests'); + expect(await EditRealisticTitle.getText()).toEqual('Realistic'); + await EditRealisticTextBox.clear(); + await EditRealisticTextBox.sendKeys('21'); + //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); + 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); + 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); + 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); + 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); + expect(await InterestSurveyWidgetTitle.getText()).toEqual('Interest Survey Results'); + expect(await TopResultTitleOne.getText()).toEqual('Enterprising (27)'); + expect(await TopResultDescriptionOne.getText()).toEqual('Enterprising personality types are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational.'); + await TopResultsReadMoreLinkOne.click().then(function() { + browser.sleep(2500); + }); + expect(await TopResultsReadMoreTitle.getText()).toEqual('Enterprising (27)'); + expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Enterprising personality types are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational.'); + expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); + await TopResultsReadMoreCloseIcon.click().then(function() { + browser.sleep(1000); + }); + expect(await TopResultTitleTwo.getText()).toEqual('Investigative (25)'); + expect(await TopResultDescriptionTwo.getText()).toEqual('Investigative personality types are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical.'); + await TopResultsReadMoreLinkTwo.click().then(function() { + browser.sleep(2500); + }); + expect(await TopResultsReadMoreTitle.getText()).toEqual('Investigative (25)'); + expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Investigative personality types are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical.'); + expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); + await TopResultsReadMoreCloseIcon.click().then(function() { + browser.sleep(1000); + }); + expect(await TopResultTitleThree.getText()).toEqual('Conventional (23)'); + expect(await TopResultDescriptionThree.getText()).toEqual('Conventional personality types are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented.'); + await TopResultsReadMoreLinkThree.click().then(function() { + browser.sleep(2500); + }); + expect(await TopResultsReadMoreTitle.getText()).toEqual('Conventional (23)'); + expect(await TopResultsReadMoreDescriptionA.getText()).toEqual('Conventional personality types are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented.'); + expect(await TopResultsReadMoreDescriptionB.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); + await TopResultsReadMoreCloseIcon.click().then(function() { + browser.sleep(1000); + }); + browser.executeScript('window.scrollTo(0, 1250);').then(function() { + browser.sleep(5000); + }); + 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'); + //expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtBestFitIcon.getText()).toContain('Interest');//loading issue, not consistent EDM-1726 + //expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtBestFitIcon.getText()).toContain('Best Fit');//loading issue, not consistent EDM-1726 + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + //Scroll down to Interest Survey Results widget + browser.executeScript('window.scrollTo(0, 612);').then(function() { + browser.sleep(2500); + }); + await InterestResultsLink.click().then(function() { + browser.sleep(10000); + }); + expect(await PageTitle.getText()).toEqual('Interest Survey Result'); + expect(await TopThreeTraitsHeader.getText()).toEqual('Your top 3 traits View All'); + expect(await TopThreeTraitsOne.getText()).toEqual('Enterprising (27)'); + expect(await TopThreeTraitsDescriptionOne.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); + expect(await TopThreeTraitsTwo.getText()).toEqual('Investigative (25)'); + expect(await TopThreeTraitsDescriptionTwo.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); + expect(await TopThreeTraitsThree.getText()).toEqual('Conventional (23)'); + expect(await TopThreeTraitsDescriptionThree.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); + await ViewAllLink.click().then(function() { + browser.sleep(1000); + }); + expect(await TopTraitsOne.getText()).toEqual('Enterprising (27)'); + expect(await TopTraitsOneDescription.getText()).toEqual('People who are adventurous, ambitious, assertive, extroverted, energetic, enthusiastic, confident, optimistic, dominant, persuasive, and motivational. They prefer work that involves leadership, business, politics, and public speaking. They enjoy being in charge, taking risks, debating and competing.'); + expect(await TopTraitsTwo.getText()).toEqual('Investigative (25)'); + expect(await TopTraitsTwoDescription.getText()).toEqual('People who are intellectual, introspective, inquisitive, curious, methodical, rational, analytical, and logical. They prefer tasks that are scholarly, scientific, technical, or medical and activities that involve thought, observation, investigation, exploration, and discovery. They like to solve problems, perform experiments, and conduct research.'); + expect(await TopTraitsThree.getText()).toEqual('Conventional (23)'); + expect(await TopTraitsThreeDescription.getText()).toEqual('People who are conscientious and conservative, logical, efficient, orderly, organized, thorough, and detail-oriented. They are individuals who value precision and accuracy. They excel in practical tasks, quantitative measurements, structured environments and people who follow the rules. They prefer work that involves accounting, statistics, mathematics, numerical activities, and office settings.'); + expect(await TopTraitsFour.getText()).toEqual('Social (22)'); + expect(await TopTraitsFourDescription.getText()).toEqual('People who are kind, generous, cooperative, patient, caring, helpful, empathetic, tactful, and friendly. They prefer tasks that involve socializing, helping others, teaching, teamwork, social interaction, relationship building, humanitarian, educational, philanthropic, interpersonal, and service-oriented work.'); + expect(await TopTraitsFive.getText()).toEqual('Realistic (21)'); + expect(await TopTraitsFiveDescription.getText()).toEqual('People who are independent, stable, persistent, genuine, practical, and thrifty. They tend to be no-nonsense and down-to-earth while enjoying physical, athletic, or mechanical activity. They prefer things rather than ideas or people such as being outdoors, using tools, operating machines, interacting with animals, and working with their hands. They also value the natural, concrete, and tangible.'); + expect(await TopTraitsSix.getText()).toEqual('Artistic (17)'); + expect(await TopTraitsSixDescription.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 XCloseIcon.click().then(function() { + browser.sleep(1000); + }); + browser.waitForAngular(); + await ShareResultsIcon.click(); + expect(await ShareResultsDivTitle.getText()).toEqual('Email Your Results'); + await SendButton.click(); + 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 ToTextBox.sendKeys('jhuerta@edmin'); + await SendButton.click(); + 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 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 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(); + browser.wait(EC.elementToBeClickable(ShareResultsIcon));*/ + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function InterestSurveyResultsWidgetResults() { + it(': InterestSurveyResultsWidgetResults, should verify the Interest Survey Clusters widget and jump to learn more page', async function () { + var WidgetTitle = element(by.css('.row > .jrnys_lead-body-copy')); + var WidgetDescription = element(by.css('.row > span:nth-child(2)')); + var BusinessManagementAndAdministration = element(by.css('#\\35 db8efa4-0809-4e9e-8096-db5d5d1dafd5 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var Finance = element(by.css('#\\36 ad08707-5c2b-44c7-b293-015236495276 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var FinanceSelectButton = element(by.css('#\\36 ad08707-5c2b-44c7-b293-015236495276 > #territoryCardContainer .btn')); + var FinancialAndInvestmentPlanning = element(by.css('#\\32 f8e3d00-1d7a-46f6-bf4e-c907540ab958 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var InsuranceServices = element(by.css('#e42868e2-b210-40c6-a842-b6acddc27f68 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var BankingAndRelatedServices = element(by.css('#a3dbe29e-e930-4cc2-8856-c21ec7ff61ee > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var BusinessFinancialManagement = element(by.css('#\\39 afd2302-5221-4f1b-b7e4-549104ebddb4 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var BusinessFinancialManagementSelectButton = element(by.css('#\\39 afd2302-5221-4f1b-b7e4-549104ebddb4 > #territoryCardContainer .btn')); + var FraudExaminersInvestigatorsAndAnalyst = element(by.css('.territoryCardTitleText > .ng-binding')); + var FraudExaminersInvestigatorsAndAnalystLearnMoreIcon = element(by.css('.territoryCardActionBarItemContainer:nth-child(1) > .territoryCardActionBarText')); + var FraudExaminersInvestigatorsAndAnalystMapIcon = element(by.css('.territoryCardActionBarItemContainer:nth-child(2) > .territoryCardActionBarText')); + var FraudExaminersInvestigatorsAndAnalystJourneymanIcon = element(by.css('.territoryCardActionBarText:nth-child(3)')); + var FraudExaminersInvestigatorsAndAnalystVideoIcon = element(by.css('.territoryCardActionBarItemContainer:nth-child(4) > .territoryCardActionBarText')); + var LawPublicSafetyCorrectionsAndSecurity = element(by.css('#\\39 b4c9702-28fe-420a-aafb-0e99e61194ea > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var MarketingSalesAndService = element(by.css('#\\38 d94c030-7c25-4491-8706-57a9a83a5221 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AgricultureFoodAndNaturalResources = element(by.css('#\\34 f4b40f7-4d4a-4dbd-98ad-900e43307920 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ScienceTechnologyEngineeringAndMath = element(by.css('#d66f2e0f-2632-4cef-8245-ed2b6137b22f > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var NextLink = element(by.linkText('Next')); + var GovernmentAndPublicAdministration = element(by.css('#bdd9f0af-f808-40d9-b1ae-7dc0d75b4364 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var HealthScience = element(by.css('#\\33 7735fc5-77f8-4a3c-8814-51c377b7affd > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var CyberSecurity = element(by.css('#\\37 22f5c71-9689-4f5d-817e-286843e3335a > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var InformationTechnology = element(by.css('#e23c1424-7a79-4bd4-8225-4d1ef8ee3646 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var TransportationDistributionAndLogistics = element(by.css('#cb6320a7-5496-4ce1-8f52-2490b76143de > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var HospitalityAndTourism = element(by.css('#\\30 6927b2f-12ec-4a78-a72b-8aa6c8576788 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ArchitectureAndConstruction = element(by.css('#b3ebc784-a26e-4134-87ea-87a44d90049a > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var EducationAndTraining = element(by.css('#f5ef3fd0-e006-4326-a127-9a51cd68b62d > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var Manufacturing = element(by.css('#cf36dc0b-5825-4723-b8f4-06dc14276d9b > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var HumanServices = element(by.css('#\\33 2cf59de-d8b7-463c-86a1-5a872fca4293 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var PreviousLink = element(by.linkText('Previous')); + var PathwaysLink = element(by.linkText('Pathways')); + var ClustersLink = element(by.linkText('Clusters')); + var BusinessManagementAndAdministrationSelectButton = element(by.css('#\\35 db8efa4-0809-4e9e-8096-db5d5d1dafd5 > #territoryCardContainer .btn')); + var Management = element(by.css('#c9fa7441-b908-4d75-b918-f15be99d7a18 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ManagementSelectButton = element(by.css('#c9fa7441-b908-4d75-b918-f15be99d7a18 > #territoryCardContainer .btn')); + var BusinessFinancialManagementAndAccounting = element(by.css('#\\39 b2ccae4-d5eb-4c45-a571-8f4e824db568 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var BusinessAnalysis = element(by.css('#d173d81b-a137-4f2d-b450-bca47abf7be3 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var Marketing = element(by.css('#\\33 4f87def-1317-483b-ba52-61b98f0c52cb > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var HumanResources = element(by.css('#b67c622c-f398-4b54-8fbd-cb62da07d96a > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AdministrativeAndInformationSuport = element(by.css('#b3c703ca-a10f-4565-a1eb-8923555ded60 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AdministrativeServicesManagers = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AdministrativeServicesManagersAtAGlanceIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer > div > div > div > div > .territoryCardItemText')); + var AdministrativeServicesManagersAtAGlanceTitle = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer > div:nth-child(2) .territoryCardTitleText')); + var AdministrativeServicesManagersAtAGlanceDescription = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardDescriptionText')); + var AdministrativeServicesManagersAtAGlanceXCloseIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer > div:nth-child(2) > #territoryCardTitleHeader .glyphicon')); + var AdministrativeServicesManagersAtAGlanceBestMatchIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .ng-scope > div > div:nth-child(1) > .territoryCardItemText')); + var AdministrativeServicesManagersEllipsis = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer > div > div > div > .territoryCardIcon > .fas')); + var AdministrativeServicesManagersEllipsisTitle = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer > div:nth-child(3) .territoryCardTitleText')); + var AdministrativeServicesManagersEllipsisFollowIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer > .territoryCardItemText')); + var AdministrativeServicesManagersEllipsisLearnMoreIcon= element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer:nth-child(2) > .territoryCardBackOfCardItemText')); + var AdministrativeServicesManagersEllipsisMapIcon= element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer:nth-child(3) > .territoryCardBackOfCardItemText')); + var AdministrativeServicesManagersEllipsisJourneymanIcon = element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer:nth-child(4) > .territoryCardBackOfCardItemText')); + var AdministrativeServicesManagersEllipsisVideoIcon= element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer:nth-child(5) > .territoryCardBackOfCardItemText')); + var AdministrativeServicesManagersEllipsisAtAGlanceIcon= element(by.css('#d64b79d0-cadf-4b66-afc1-ae35273f3a78 > #territoryCardContainer .territoryCardBackOfCardContainer:nth-child(6) > .territoryCardBackOfCardItemText')); + var EC = protractor.ExpectedConditions; + var AdministrativeServicesManagersJourneyInfoIcon = element(by.css('span > .journey-info-circle')); + + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration'); + expect(await Finance.getText()).toEqual('Finance'); + expect(await LawPublicSafetyCorrectionsAndSecurity.getText()).toEqual('Law, Public Safety, Corrections & Security'); + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + expect(await MarketingSalesAndService.getText()).toEqual('Marketing, Sales & Service'); + expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources'); + expect(await ScienceTechnologyEngineeringAndMath.getText()).toEqual('Science, Technology, Engineering & Math'); + await NextLink.click().then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await GovernmentAndPublicAdministration.getText()).toEqual('Government & Public Administration'); + expect(await HealthScience.getText()).toEqual('Health Science'); + expect(await CyberSecurity.getText()).toEqual('Cyber Security'); + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + expect(await InformationTechnology.getText()).toEqual('Information Technology'); + expect(await TransportationDistributionAndLogistics.getText()).toEqual('Transportation, Distribution & Logistics'); + expect(await HospitalityAndTourism.getText()).toEqual('Hospitality and Tourism'); + await NextLink.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction'); + expect(await EducationAndTraining.getText()).toEqual('Education & Training'); + expect(await Manufacturing.getText()).toEqual('Manufacturing'); + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + expect(await HumanServices.getText()).toEqual('Human Services'); + await PreviousLink.click().then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await GovernmentAndPublicAdministration.getText()).toEqual('Government & Public Administration'); + expect(await HealthScience.getText()).toEqual('Health Science'); + expect(await CyberSecurity.getText()).toEqual('Cyber Security'); + expect(await InformationTechnology.getText()).toEqual('Information Technology'); + expect(await TransportationDistributionAndLogistics.getText()).toEqual('Transportation, Distribution & Logistics'); + expect(await HospitalityAndTourism.getText()).toEqual('Hospitality and Tourism'); + await PreviousLink.click().then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration'); + expect(await Finance.getText()).toEqual('Finance'); + expect(await LawPublicSafetyCorrectionsAndSecurity.getText()).toEqual('Law, Public Safety, Corrections & Security'); + expect(await MarketingSalesAndService.getText()).toEqual('Marketing, Sales & Service'); + expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources'); + expect(await ScienceTechnologyEngineeringAndMath.getText()).toEqual('Science, Technology, Engineering & Math'); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + await FinanceSelectButton.click().then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.'); + expect(await FinancialAndInvestmentPlanning.getText()).toEqual('Financial and Investment Planning'); + expect(await InsuranceServices.getText()).toEqual('Insurance Services'); + expect(await BankingAndRelatedServices.getText()).toEqual('Banking and Related Services'); + browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { + browser.sleep(2500); + }); + expect(await BusinessFinancialManagement.getText()).toEqual('Business Financial Management'); + await BusinessFinancialManagementSelectButton.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways > Occupations'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, click the Learn More icon of an occupation below.'); + expect(await FraudExaminersInvestigatorsAndAnalyst.getText()).toEqual('Fraud Examiners, Investigators and Analysts'); + expect(await FraudExaminersInvestigatorsAndAnalystLearnMoreIcon.getText()).toEqual('Learn More'); + expect(await FraudExaminersInvestigatorsAndAnalystMapIcon.getText()).toEqual('Map'); + expect(await FraudExaminersInvestigatorsAndAnalystJourneymanIcon.getText()).toEqual('Journey'); + expect(await FraudExaminersInvestigatorsAndAnalystVideoIcon.getText()).toEqual('Video'); + await PathwaysLink.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.'); + expect(await FinancialAndInvestmentPlanning.getText()).toEqual('Financial and Investment Planning'); + expect(await InsuranceServices.getText()).toEqual('Insurance Services'); + expect(await BankingAndRelatedServices.getText()).toEqual('Banking and Related Services'); + expect(await BusinessFinancialManagement.getText()).toEqual('Business Financial Management'); + await ClustersLink.click().then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration'); + expect(await Finance.getText()).toEqual('Finance'); + expect(await LawPublicSafetyCorrectionsAndSecurity.getText()).toEqual('Law, Public Safety, Corrections & Security'); + expect(await MarketingSalesAndService.getText()).toEqual('Marketing, Sales & Service'); + expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources'); + expect(await ScienceTechnologyEngineeringAndMath.getText()).toEqual('Science, Technology, Engineering & Math'); + await BusinessManagementAndAdministrationSelectButton.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + expect(await WidgetTitle.getText()).toEqual('Clusters > Pathways'); + expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a pathway below.'); + expect(await Management.getText()).toEqual('Management'); + expect(await BusinessFinancialManagementAndAccounting.getText()).toEqual('Business Financial Management and Accounting'); + expect(await BusinessAnalysis.getText()).toEqual('Business Analysis'); + expect(await Marketing.getText()).toEqual('Marketing'); + expect(await HumanResources.getText()).toEqual('Human Resources'); + expect(await AdministrativeAndInformationSuport.getText()).toEqual('Administrative and Information Support'); + await ManagementSelectButton.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 100);').then(function() { + browser.sleep(2500); + }); + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + await AdministrativeServicesManagersAtAGlanceIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await AdministrativeServicesManagersAtAGlanceTitle.getText()).toEqual('Administrative Services Managers'); + expect(await AdministrativeServicesManagersAtAGlanceDescription.getText()).toEqual('Plan, direct, or coordinate one or more administrative services of an organization, such as records and information management, mail distribution, facilities planning and maintenance, custodial operations, and other office support services.'); + await AdministrativeServicesManagersAtAGlanceXCloseIcon.click().then(function() { + browser.sleep(2500); + }); + //expect(await AdministrativeServicesManagersAtAGlanceBestMatchIcon.getText()).toContain('Best Fit'); EDM-1726 + await AdministrativeServicesManagersEllipsis.click().then(function() { + browser.sleep(2500); + }); + expect(await AdministrativeServicesManagersEllipsisTitle.getText()).toEqual('Administrative Services Managers'); + expect(await AdministrativeServicesManagersEllipsisFollowIcon.getText()).toEqual('Follow'); + expect(await AdministrativeServicesManagersEllipsisLearnMoreIcon.getText()).toEqual('Learn More'); + expect(await AdministrativeServicesManagersEllipsisMapIcon.getText()).toEqual('Map'); + expect(await AdministrativeServicesManagersEllipsisJourneymanIcon.getText()).toEqual('Journey'); + expect(await AdministrativeServicesManagersEllipsisVideoIcon.getText()).toEqual('Video'); + expect(await AdministrativeServicesManagersEllipsisAtAGlanceIcon.getText()).toEqual('At A Glance'); + await AdministrativeServicesManagersEllipsisJourneymanIcon.click().then(function() { + browser.sleep(5000); + }); + browser.waitForAngular(); + browser.wait(EC.elementToBeClickable(AdministrativeServicesManagersJourneyInfoIcon)); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function InterestSurveyResultsCreateJourney() { + it(': InterestSurveyResultsCreateJourney, should create a Journey to Top Interest Survey Result', async function () { + var JourneySideBarHeaderOne = element(by.css('.side-bar-child-text > span')); + var JourneyInfoIcon = element(by.css('span > .journey-info-circle')); + var JourneyInfoDivTitle = element(by.css('.col-lg-12 > .ng-binding')); + var JourneyInfoDivSubText = element(by.css('.col-lg-12:nth-child(3)')); + var JourneyInfoDivXCloseIcon = element(by.css('.fa-times')); + var JourneyEntryPoint = element(by.css('.journeyInput')); + var SelectEntryPointDropDown = element(by.css('.ng-scope:nth-child(1) > .sidebarScrollListTxt > .ng-binding')); + var StartYourJourneyButton = element(by.css('.journeyStartBtnEnable')); + var JourneysActionTitleHeader = element(by.css('div:nth-child(2) > .ng-binding')); + var JourneyResultTitleOne = element(by.css('#journeyitem0 .side-bar-child-text')); + var JourneyResultTitleTwo = element(by.css('#journeyitem1 .side-bar-child-text')); + var JourneyResultTitleThree = element(by.css('#journeyitem2 .side-bar-child-text')); + var JourneySaveIcon = element(by.css('#journeyitem0 .mapActionBarActive > .fas')); + var JourneyStopDIVTitle = element(by.css('.row:nth-child(1) > .col-md-12:nth-child(1)')); + var JourneyStopDIVCertificateTitle = element(by.css('#awm0 .ng-binding')); + var JourneyStopDIVDegreeTitle = element(by.css('#awm1 .ng-binding')); + var JourneyStopDIVTitleCardOne = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(1) .waypointCardTitle')); + var JourneyStopDIVTitleCardTwo = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(2) .waypointCardTitle')); + var JourneyStopDIVTitleCardThree = element(by.css('.item:nth-child(4) > .ng-scope:nth-child(3) .waypointCardTitle')); + var JourneyStopDIVSubText = element(by.css('#addWaypointsModalAddedWaypointsCarousel .ng-scope')); + var JourneyStopDIVSkipLink = element(by.css('.btn-inverse')); + var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); + + expect(await JourneySideBarHeaderOne.getText()).toEqual('Create Your Journey'); + await JourneyInfoIcon.click().then(function() { + browser.sleep(1000); + }); + expect(await JourneyInfoDivTitle.getText()).toEqual('Create Your Journey'); + expect(await JourneyInfoDivSubText.getText()).toEqual('A Journey is your driving direction. Enter a starting location, such as your current grade, as well as the destination you are trying to reach, like an occupation. From there we will provide you with possible pathways to reach your goal.'); + await JourneyInfoDivXCloseIcon.click().then(function() { + browser.sleep(1000); + }); + await JourneyEntryPoint.click(); + browser.waitForAngular(); + await JourneyEntryPoint.sendKeys('9'); + await SelectEntryPointDropDown.click(); + browser.waitForAngular(); + await StartYourJourneyButton.click(); + browser.waitForAngular(); + expect(await JourneysActionTitleHeader.getText()).toEqual('Journey Search Results'); + expect(await JourneyResultTitleOne.getText()).toEqual('9 to Administrative Services Managers through Business Administration B.A./B.S.'); + expect(await JourneyResultTitleTwo.getText()).toEqual('9 to Administrative Services Managers through Business Administration Minor'); + expect(await JourneyResultTitleThree.getText()).toEqual('9 to Administrative Services Managers through Master of Business Administration (MBA)'); + browser.actions().mouseMove(JourneySaveIcon).perform().then(function() { + browser.sleep(1000); + }); + await JourneySaveIcon.click().then(function() { + browser.sleep(10000); + }); + expect(await JourneyStopDIVTitle.getText()).toEqual('Now that you have saved a journey, feel free to add any additional degree(s) and certification(s) to your journey by selecting from below!'); + expect(await JourneyStopDIVCertificateTitle.getText()).toEqual('Certification'); + expect(await JourneyStopDIVDegreeTitle.getText()).toEqual('Degree Program'); + expect(await JourneyStopDIVTitleCardOne.getText()).toEqual('Certified Legal Manager'); + expect(await JourneyStopDIVTitleCardTwo.getText()).toEqual('Certified Medical Office Manager'); + expect(await JourneyStopDIVTitleCardThree.getText()).toEqual('Strategic Meeting Management Certification'); + expect(await JourneyStopDIVSubText.getText()).toEqual('Your added stops will show up here.'); + expect(await JourneyStopDIVSkipLink.getText()).toEqual('Skip'); + await JourneyStopDIVSkipLink.click().then(function() { + browser.sleep(5000); + }); + expect(await JourneysActionTitleHeader.getText()).toEqual('Journey Search Results'); + expect(await JourneyResultTitleOne.getText()).toEqual('9 to Administrative Services Managers through Business Administration B.A./B.S.'); + await DashboardHeaderLink.click().then(function() { + browser.sleep(5000); + }); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function SignOut() { + 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 SignOutButton.click().then(function() { + browser.sleep(2500); + }); + }); +} \ No newline at end of file diff --git a/journeysmap_spec.js b/journeysmap_spec.js index 2f9acff..0a56177 100644 --- a/journeysmap_spec.js +++ b/journeysmap_spec.js @@ -2,33 +2,33 @@ describe('Journeysmap script', function () { //app-journeysmap landing page - var UserNameTextBox = element(by.css('#txtUsername')); - var PasswordTextBox = element(by.css('#txtPassword')); + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); //Open browser //browser.driver.manage().window().setSize(1600, 800); browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); it('should have a title', async function () { - await expect(browser.getTitle()).toEqual('Journeys'); + await expect(browser.getTitle()).toEqual('Login'); }); //Sign In SignIn(UserNameTextBox, PasswordTextBox); it('should have a title', async function () { - await expect(browser.getTitle()).toEqual('Journeys'); + await expect(browser.getTitle()).toEqual('My Dashboard'); }); function SignIn(UserNameTextBox, PasswordTextBox) { it('should sign into journeysmap.com', async function () { var PageGreetingText = element(by.css('td > div > div:nth-child(1)')); - var PageSubTextOne = element(by.css('div:nth-child(5) > div:nth-child(1)')); - var PageSubTextTwo = element(by.css('div:nth-child(5) > div:nth-child(2)')); + var PageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); + var PageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); var NextButton = element(by.css('.btn')); var EC = protractor.ExpectedConditions; var InvalidIcon = element(by.css('.far:nth-child(4)')); - var PageValidationText = element(by.css('.ng-scope:nth-child(5)')); + var PageValidationText = element(by.css('.ng-binding:nth-child(1)')); var EyeIcon = element(by.css('.fa-eye')); var JourneysGreeting = element(by.css('.dropdown')); @@ -70,7 +70,7 @@ describe('Journeysmap script', function () { }); } - /*<<<>>> + //<<<>>> ProfileWidget(); MyProgressWidget(); @@ -85,10 +85,10 @@ describe('Journeysmap script', function () { MyCareersCarousel(); - //Top Career Widget - EditTopCareer();*/ + /*Top Career Widget + EditTopCareer(); TopCareerWidget(); - /*NearbyPlacesOccupationCard(); + NearbyPlacesOccupationCard(); FollowingPage(); AtAGlance(); Personality(); @@ -113,7 +113,7 @@ describe('Journeysmap script', function () { MyJourneys(); - /*<<<>>> + //<<<>>> MyJourneysPage(); //<<<>>> @@ -642,7 +642,7 @@ function InterestSurveyResultsClusters() { var AtAGlanceIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); var AtAGlanceBackOfCardXCloseLink = element(by.xpath('//div[2]/div/div[2]/span')); var OccupationCardEllipsis = element(by.xpath('//div/div/div[2]/div/i')); - var JourneymanIcon = element(by.xpath('//div[5]/div[2]')) + var JourneymanIcon = element(by.xpath('/html/body/div[1]/div/div[2]/div[3]/div/survey-result-career/div/div/div[2]/div[1]/div[1]/div/career-territory-card/territory-card/div/div[3]/div[2]/territory-card-more-back/div/div/div/div/div[4]/div[2]')) var LearnMoreButton = element(by.xpath('//div/div/div/div/div[2]/div[2]')); var EC = protractor.ExpectedConditions; var JourneyInfoIcon = element(by.css('.journey-info-circle')); @@ -1463,7 +1463,7 @@ function MyCareersCarousel() { await SkillsAssessmentResultsCheckBox.click().then(function() { browser.sleep(1000); }); - expect(await MyFollowing.getText()).toEqual('My Following (7)'); + expect(await MyFollowing.getText()).toEqual('My Following (5)'); expect(await RequiredJobPrepHeader.getText()).toEqual('Required Job Prep'); expect(await MayRequireHighSchoolDiplomaOrGED.getText()).toContain('May Require High School Diploma or GED ('); await MayRequireHighSchoolDiplomaOrGEDCheckBox.click().then(function() { @@ -1487,7 +1487,7 @@ function MyCareersCarousel() { expect(await BrightOutlook.getText()).toContain('Bright Outlook ('); expect(await Green.getText()).toContain('Green ('); expect(await Apprenticeships.getText()).toContain('Apprenticeship ('); - expect(await Following.getText()).toEqual('Following (7)'); + expect(await Following.getText()).toEqual('Following (5)'); await FollowingCheckBox.click().then(function() { browser.sleep(1000); }); @@ -1523,7 +1523,7 @@ function MyCareersCarousel() { expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 expect(await SecondOccupationCardTitle.getText()).toEqual('Business Intelligence Analysts'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Airfield Operations Specialists'); + expect(await ThirdOccupationCardTitle.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); await RemoveRightFilterButton.click().then(function() { browser.sleep(2500); }); @@ -1532,15 +1532,15 @@ function MyCareersCarousel() { expect(await FirstOccupationCardAtAGlanceIcon.getText()).toContain('Glance'); expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 - expect(await SecondOccupationCardTitle.getText()).toEqual('Airfield Operations Specialists'); - expect(await ThirdOccupationCardTitle.getText()).toEqual('Business Intelligence Analysts'); + expect(await SecondOccupationCardTitle.getText()).toEqual('Business Intelligence Analysts'); + expect(await ThirdOccupationCardTitle.getText()).toEqual('Wind Energy Project Managers'); await FollowFirstOccupationCardIcon.click().then(function() { browser.sleep(2500); }); await WidgetFilterIcon.click().then(function() { browser.sleep(2500); }); - expect(await Following.getText()).toEqual('Following (6)'); + expect(await Following.getText()).toEqual('Following (4)'); await FollowingCheckBox.click().then(function() { browser.sleep(1000); }); diff --git a/loginWithInstitution_config.js b/loginWithInstitution_config.js new file mode 100644 index 0000000..202a072 --- /dev/null +++ b/loginWithInstitution_config.js @@ -0,0 +1,43 @@ +//loginWithInstitution_config.js + +var today = new Date(); +var mm = today.getMonth()+1; //January is 0 +var dd = today.getDate(); +var yyyy = today.getFullYear(); +var hour = today.getHours(); +var minute = today.getMinutes(); + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['loginWithInstitution_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + params: { + username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com', + code: 'N0R7Y7RO', + password: '3Dm!nAuto' + } + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/loginWithInstitution_spec.js b/loginWithInstitution_spec.js new file mode 100644 index 0000000..91417ff --- /dev/null +++ b/loginWithInstitution_spec.js @@ -0,0 +1,477 @@ +//createAccount_spec.js + +describe('OnBoarding script', function () { + + //Open browser + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/signup'); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Sign up'); + }); + + var FirstNameTextBox = element(by.css('#txtFirstName')); + var LastNameTextBox = element(by.css('#txtLastName')); + var EmailTextBox = element(by.css('#txtEmail')); + var UsernameTextBox = element(by.css('#txtUsername')); + + //Sign Up + 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 () { + //Page 1 - First & Last Name + var EC = protractor.ExpectedConditions; + var PageCloseXIcon = element(by.css('.fa-times-circle:nth-child(2)')); + var PageOneGreetingText = element(by.css('table:nth-child(3) .jmLoginBox > div:nth-child(1) > .jmLoginTitle')); + var PageOneNextButton = element(by.css('tr:nth-child(2) > td > div > div:nth-child(1) > div > div:nth-child(1)')); + var PageOneValidationText = element(by.css('.jmLoginMsg:nth-child(6) > .ng-binding')); + //Page 2 - Username + var PageTwoGreetingText = element(by.css('td > div > div:nth-child(2) > div:nth-child(1)')); + var PageTwoSubText = element(by.css('div:nth-child(2) > .jmLoginInput:nth-child(3)')); + var PageTwoNextButton = element(by.css('div:nth-child(2) > div > div > .btn')); + var PageTwoValidationText = element(by.css('div:nth-child(2) > .ng-scope > .ng-binding')); + var UsernameLinkText = element(by.linkText('with a username')); + var PageTwoAltGreetingText = element(by.css('td > div > div:nth-child(3) > div:nth-child(1)')); + var PageTwoAltSubText = element(by.css('div:nth-child(3) > .jmLoginInput:nth-child(3)')); + var PageTwoAltNextButton = element(by.css('div:nth-child(3) > .jmLoginAction .btn')); + var PageTwoAltValidationText = element(by.css('div:nth-child(3) > .jmLoginMsg > .ng-binding')); + var EmailLinkText = element(by.linkText('with your email')); + //Page 3 Password + var PageThreeGreetingText = element(by.css('td > div > div:nth-child(4) > div:nth-child(1)')); + var PasswordTextBoxOne = element(by.css('#txtPw1')); + var EyeIconOne = element(by.css('div:nth-child(2) > .fa-eye')); + var PasswordTextBoxTwo = element(by.css('#txtPw2')); + var PageThreeNextButton = element(by.css('#btnPwNext')); + var PageThreeValidationText = element(by.css('div:nth-child(4) > .jmLoginMsg > .ng-binding')); + //Page 4 Birthday + var PageFourGreetingText = element(by.css('td > div > div:nth-child(5) > div:nth-child(1)')); + var DOBMonth = element(by.css('#txtDobMonth')); + var DOBDay = element(by.css('#txtDobDate')); + var DOBYear = element(by.css('#txtDobYear')); + var today = new Date(); + var yyyy = today.getFullYear()-5; + //var Under13 = today.getFullYear()-5;delete + var PageFourValidationText = element(by.css('div:nth-child(5) > .jmLoginMsg > .ng-binding')); + var PermissionButton = element(by.css('div:nth-child(1) > div:nth-child(1) > .btn')); + //Page 5 Connection Code + var PageFiveGreetingText = element(by.css('div:nth-child(6) > div:nth-child(1) > div:nth-child(1)')); + var PageFiveSubText = element(by.css('.jmLoginMsg:nth-child(3) > div:nth-child(1)')); + var CodeButton = element(by.css('.btn:nth-child(2)')); + var ConnectionGreetingText = element(by.css('div:nth-child(6) > div:nth-child(2) > div:nth-child(1)')); + var ConnectionCodeTextBox = element(by.css('#txtConnection')); + var ConnectionCodeSubText = element(by.css('div:nth-child(2) > .jmLoginMsg > div:nth-child(1)')); + var ConnectionCodeNextButton = element(by.css('div:nth-child(6) > div:nth-child(2) > div:nth-child(3)')); + var ConnectionCodeValidationText = element(by.css('div:nth-child(2) > .jmLoginMsg:nth-child(4) > .ng-binding')); + //What Do you want to explore? (page) + var WhatDoYouWantToExplorePage = element(by.css('#divMyProgressBlocker > div:nth-child(3) > div:nth-child(1) > div')); + var DiscoverMyInterestButton = element(by.css('.col-xs-10 > div > div:nth-child(1) > .btn')); + var LearnMySkillsButton = element(by.css('div:nth-child(2) > .btn')); + var ExploreCareersButton = element(by.css('div:nth-child(3) > .btn')); + var CloseXIcon = element(by.css('.fas')); + //Journeys Dashboard + var JourneysDashboardGreeting = element(by.css('.dropdown')); + //Update Security Question + var ProfileImageIcon = element(by.css('.roundCenterBackgroundImage')); + var ProfileLinkText = element(by.linkText('Profile')); + var AccountInformation = element(by.css('.view-title')); + var ManageSecurityQuestionsButton = element(by.css('.btn:nth-child(15)')); + var SecurityQuestion = element(by.css('#secQuestion0')); + var SecuritySelection = element(by.css('option:nth-child(8)')); + var SecurityAnswer = element(by.css('.ng-pristine')); + var SecurityQuestionSaveButton = element(by.css('.col-lg-4 > #photoBtn')); + + //Page 1 - First & Last Name + browser.wait(EC.elementToBeClickable(PageCloseXIcon)); + expect(await PageOneGreetingText.getText()).toEqual("Let's start with the basics."); + await FirstNameTextBox.sendKeys('J').then(function() { + browser.sleep(1000); + }); + await LastNameTextBox.sendKeys('H').then(function() { + browser.sleep(1000); + }); + await PageOneNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); + await FirstNameTextBox.sendKeys('H').then(function() { + browser.sleep(1000); + }); + await PageOneNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageOneValidationText.getText()).toEqual('Oops! The minimum length is 2 characters.'); + await LastNameTextBox.clear().then(function() { + browser.sleep(1000); + LastNameTextBox.sendKeys('AutomatedTesting'); + browser.sleep(1000); + }); + await PageOneNextButton.click().then(function() { + browser.sleep(2500); + }); + //Page 2 - Username + expect(await PageTwoGreetingText.getText()).toEqual('Your email goes here.'); + await EmailTextBox.sendKeys('AutomatedTesting').then(function() { + browser.sleep(1000); + }); + expect(await PageTwoSubText.getText()).toEqual('No email? Create an account with a username instead.'); + await PageTwoNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageTwoValidationText.getText()).toEqual('Oops! Something is funky. Please enter a valid email address.'); + await UsernameLinkText.click().then(function() { + browser.sleep(1000); + }); + expect(await PageTwoAltGreetingText.getText()).toEqual("Let's make a username!"); + await UsernameTextBox.sendKeys('JHZ').then(function() { + browser.sleep(1000); + }); + expect(await PageTwoAltSubText.getText()).toEqual('Create an account with your email instead.'); + await PageTwoAltNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageTwoAltValidationText.getText()).toEqual('Oops! Please enter a valid username.'); + await EmailLinkText.click().then(function() { + browser.sleep(1000); + }); + await EmailTextBox.sendKeys(browser.params.username).then(function() { + browser.sleep(1000); + }); + await PageTwoNextButton.click().then(function() { + browser.sleep(2500); + }); + //Page 3 Password + expect(await PageThreeGreetingText.getText()).toEqual("Let's keep your account safe and secure."); + await PasswordTextBoxOne.sendKeys('ED'); + await PasswordTextBoxTwo.sendKeys('3Dm!n123'); + await PageThreeNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); + await EyeIconOne.click().then(function() { + browser.sleep(2500); + }); + await PasswordTextBoxOne.sendKeys('min123').then(function() { + browser.sleep(1000); + }); + await PageThreeNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageThreeValidationText.getText()).toEqual('Oops! Please make sure both passwords are the same.'); + await EyeIconOne.click().then(function() { + browser.sleep(1000); + }); + await PasswordTextBoxOne.clear().then(function() { + browser.sleep(1000); + PasswordTextBoxOne.sendKeys('3Dm!n123'); + browser.sleep(1000); + }); + await PageThreeNextButton.click().then(function() { + browser.sleep(2500); + }); + //Page 4 Birthday + expect(await PageFourGreetingText.getText()).toEqual("It's Your Birthday! When do we party?"); + await DOBMonth.sendKeys('2'); + await DOBDay.sendKeys('15'); + await DOBYear.sendKeys('2').then(function() { + browser.sleep(1000); + }); + expect(await PageFourValidationText.getText()).toEqual('Please check that date is formatted as MM-DD-YYYY'); + await DOBYear.clear().then(function() { + browser.sleep(1000); + DOBYear.sendKeys(yyyy); + browser.sleep(1000); + }); + expect(await PageFourValidationText.getText()).toEqual("Looks like you're younger than 13. Get your guardian's permission before moving ahead!"); + await PermissionButton.click().then(function() { + browser.sleep(2500); + }); + //Page 5 Connection Code + expect(await PageFiveGreetingText.getText()).toEqual('Do you have a connection code?'); + expect(await PageFiveSubText.getText()).toEqual("Not sure what this is? Don't feel bad, just skip ahead!"); + await CodeButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ConnectionGreetingText.getText()).toEqual('Connect with your code!'); + await ConnectionCodeTextBox.sendKeys('JMHZ19').then(function() { + browser.sleep(1000); + }); + expect(await ConnectionCodeSubText.getText()).toContain("Not sure what this is? Don't feel bad, just skip ahead!"); + await ConnectionCodeNextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ConnectionCodeValidationText.getText()).toContain("Hmmm we don't recognize your code, please try again. Please contact help@journeysmap.com."); + await ConnectionCodeTextBox.clear().then(function() { + ConnectionCodeTextBox.sendKeys(browser.params.code); + }); + await ConnectionCodeNextButton.click().then(function() { + browser.sleep(2500); + }); + //What do you want to explore? (page) + browser.wait(EC.visibilityOf(WhatDoYouWantToExplorePage)).then(function() { + browser.sleep(2500); + }); + expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?'); + expect(await DiscoverMyInterestButton.getText()).toEqual('Discover My Interests'); + expect(await LearnMySkillsButton.getText()).toEqual('Learn My Skills'); + expect(await ExploreCareersButton.getText()).toEqual('Explore Careers'); + await CloseXIcon.click().then(function() { + browser.sleep(2500); + }); + //Dashboard + browser.waitForAngular(); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); + //Update Security Question + await ProfileImageIcon.click().then(function() { + browser.sleep(1000); + }); + browser.actions().mouseMove(ProfileLinkText).perform().then(function() { + browser.sleep(1500); + }); + await ProfileLinkText.click().then(function() { + browser.sleep(1000); + }); + expect(await AccountInformation.getText()).toEqual('Account Information'); + await ManageSecurityQuestionsButton.click().then(function() { + browser.sleep(2500); + }); + await SecurityQuestion.click(); + await SecuritySelection.click(); + await SecurityAnswer.sendKeys('War Games'); + await SecurityQuestionSaveButton.click().then(function() { + browser.sleep(5000); + }); + }); + } + + //Action Calls + SignOut(); + Login(); + SignOut(); + LoginWithNewPassword(); +}); + +function SignOut() { + 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(); + await ProfileImage.click().then(function() { + browser.sleep(1000); + }); + await SignOutButton.click().then(function() { + browser.sleep(2500); + }); + }); +} + +function Login() { + it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () { + var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope')); + var UsernameTextBoxOne = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); + var NextButton = element(by.css('.btn')); + var ValidationText = element(by.css('.ng-binding:nth-child(1)')); + var PasswordEyeIcon = element(by.css('.fa-eye')); + var ClickHereLinkText = element(by.css('.ng-scope > a')); + var UsernameTextBoxTwo = element(by.css('#txtUsername')); + //Account Recovery + var PageGreetingText = element(by.css('.jmLoginTitle')); + var PageOneValidationText = element(by.css('.jmLoginMsg')); + //Select Recovery Option + var PageTwoEmailButton = element(by.css('.btn:nth-child(2)')); + var PageTwoSecurityQuestionButton = element(by.css('.btn:nth-child(1)')); + var SecurityQuestionText = element(by.css('.ng-binding:nth-child(2)')); + var SecurityAnswerTextBox = element(by.css('#txtSecurityAnswer')); + //Reset Password + var NewPasswordTextBoxOne = element(by.css('#txtNewPassword')); + var NewPasswordTextBoxTwo = element(by.css('#txtNewPassword2')); + //What Do you want to explore? + var WhatDoYouWantToExplorePage = element(by.css('#divMyProgressBlocker > div:nth-child(3) > div:nth-child(1) > div')); + var ExploreCareersButton = element(by.css('div:nth-child(3) > .btn')); + var CareerExplorationPageTitle = element(by.css('.col-sm-12')); + var ClusterCardThreeSelectButton = element(by.xpath('//div[3]/div/career-territory-card/territory-card/div/div/div[4]/territory-card-action-bar/div/button')); + var PathwayCardTwoSelectButton = element(by.xpath('//div[2]/div/career-territory-card/territory-card/div/div/div[4]/territory-card-action-bar/div/button')); + var OccupationCardOneLearnMoreIcon = element(by.xpath('//action-learn-more/i')); + var WagesLocalStatText = element(by.css('g:nth-child(3) > g > text')); + //Journeys Dashboard + var JourneysDashboardGreeting = element(by.css('.dropdown')); + + //Navigate to Login page + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); + browser.sleep(2500); + expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); + await UsernameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com'); + await PasswordTextBox.sendKeys('edmin123').then(function() { + browser.sleep(1000); + }); + expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await LoginPageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); + await PasswordEyeIcon.click().then(function() { + browser.sleep(1000); + }); + await PasswordTextBox.clear().then(function() { + PasswordTextBox.sendKeys('EDmin123'); + }); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await ValidationText.getText()).toEqual("Uh oh. Something isn't quite right. Please try again."); + await ClickHereLinkText.click().then(function() { + browser.sleep(2500); + }); + //Account Recovery + expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); + await UsernameTextBoxTwo.sendKeys('AutomatedTest332020913@edmin.com'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageOneValidationText.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); + await UsernameTextBoxTwo.clear().then(function() { + browser.sleep(1000); + UsernameTextBoxTwo.sendKeys(browser.params.username); + }); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + //Select Recovery Option + expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your'); + await PageTwoEmailButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageGreetingText.getText()).toContain('Woo-Hoo! Your Email Has Been Sent!'); + expect(await PageGreetingText.getText()).toContain('The link will expire in 10 minutes!'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + await ClickHereLinkText.click().then(function() { + browser.sleep(2500); + }); + expect(await PageGreetingText.getText()).toEqual("Can't Get Into Your Account?"); + await UsernameTextBoxTwo.sendKeys(browser.params.username); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageGreetingText.getText()).toEqual('Awesome. Reset Your Password With Your'); + await PageTwoSecurityQuestionButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageGreetingText.getText()).toEqual('Answer Your Security Questions'); + expect(await SecurityQuestionText.getText()).toEqual('What is your favorite movie?'); + await SecurityAnswerTextBox.sendKeys('2001: A Space Odyssey'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageOneValidationText.getText()).toEqual("Sorry! Your answers don't match what we have on file. Please contact help@journeysmap.com."); + await SecurityAnswerTextBox.clear().then(function() { + browser.sleep(1000); + SecurityAnswerTextBox.sendKeys('War Games'); + }); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + //Reset Password + expect(await PageGreetingText.getText()).toEqual('Create A New Password!'); + await NewPasswordTextBoxOne.sendKeys('edmin123'); + await NewPasswordTextBoxTwo.sendKeys('EDmin123'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + expect(await PageOneValidationText.getText()).toEqual('Oops. Looks like both passwords not match. Use 1 uppercase letter or 1 number. Please try again.'); + await NewPasswordTextBoxOne.clear().then(function() { + browser.sleep(1000); + NewPasswordTextBoxOne.sendKeys(browser.params.password); + }); + await NewPasswordTextBoxTwo.clear().then(function() { + browser.sleep(1000); + NewPasswordTextBoxTwo.sendKeys(browser.params.password); + }); + await NextButton.click().then(function() { + browser.sleep(5000); + }); + //What do you want to explore? (page) + expect(await WhatDoYouWantToExplorePage.getText()).toEqual('What do you want to explore?'); + await ExploreCareersButton.click().then(function() { + browser.sleep(2500); + }); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); + expect(await CareerExplorationPageTitle.getText()).toEqual('Career Exploration'); + await ClusterCardThreeSelectButton.click().then(function() { + browser.sleep(2500); + }); + await PathwayCardTwoSelectButton.click().then(function() { + browser.sleep(2500); + }); + await OccupationCardOneLearnMoreIcon.click().then(function() { + browser.sleep(5000); + }); + browser.executeScript('window.scrollTo(0, 395);').then(function() { + browser.sleep(5000); + }); + //expect(await WagesLocalStatText.getText()).toEqual('San Diego-Carlsbad, CA'); Hank reviewing bug - adding message + }); +} + +function LoginWithNewPassword() { + it(': LoginWithNewPassword; should log in with new password.', async function () { + var LoginPageGreetingText = element(by.css('td > div > div:nth-child(1)')); + var UsernameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + var LoginPageSubTextOne = element(by.css('.jmLoginMsg > div > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg .ng-scope')); + var NextButton = element(by.css('.btn')); + //EDM-1748 + var EC = protractor.ExpectedConditions; + var SecurityQuestion = element(by.css('#secQuestion0')); + var SecuritySelection = element(by.css('option:nth-child(8)')); + var SecurityAnswer = element(by.css('.ng-pristine')); + var SecurityQuestionSaveButton = element(by.css('.col-lg-4 > #photoBtn')); + //Journeys Dashboard + var JourneysDashboardGreeting = element(by.css('.dropdown')); + var MyProgressWidgetGreeting = element(by.css('tr:nth-child(2) > td > div:nth-child(1)')); + var MyProgressWiegetSubText = element(by.css('td > div:nth-child(2)')); + var VideoIcon = element(by.css('.fa-video')); + var CloseVideoXIcon = element(by.css('.close')); + + //Navigate to Login page + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); + browser.sleep(2500); + expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); + await UsernameTextBox.sendKeys(browser.params.username); + await PasswordTextBox.sendKeys(browser.params.password).then(function() { + browser.sleep(1000); + }); + expect(await LoginPageSubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); + expect(await LoginPageSubTextTwo.getText()).toEqual('Forgot your password? Click here.'); + await NextButton.click().then(function() { + browser.sleep(2500); + }); + //Security Question DIV | EDM-1748 + browser.wait(EC.visibilityOf(SecurityQuestion)); + await SecurityQuestion.click(); + await SecuritySelection.click(); + await SecurityAnswer.sendKeys('War Games'); + await SecurityQuestionSaveButton.click().then(function() { + browser.sleep(5000); + }); + //Dashboard + browser.waitForAngular(); + expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Jh'); + expect(await MyProgressWidgetGreeting.getText()).toEqual('Hello, Jh!'); + expect(await MyProgressWiegetSubText.getText()).toContain("Do you feel anxious about what you're going to do with your life?"); + expect(await MyProgressWiegetSubText.getText()).toContain('Take a deep breath because Journeys Map is here to help you'); + expect(await MyProgressWiegetSubText.getText()).toContain('find your path in four easy steps.'); + await VideoIcon.click().then(function() { + browser.sleep(5000); + }); + await CloseVideoXIcon.click().then(function() { + browser.sleep(2500); + }); + }); +} \ No newline at end of file diff --git a/myCareersWidget_config.js b/myCareersWidget_config.js new file mode 100644 index 0000000..421e6b1 --- /dev/null +++ b/myCareersWidget_config.js @@ -0,0 +1,30 @@ +//myCareersWidget_config.js + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['myCareersWidget_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/myCareersWidget_spec.js b/myCareersWidget_spec.js new file mode 100644 index 0000000..33e15bc --- /dev/null +++ b/myCareersWidget_spec.js @@ -0,0 +1,435 @@ +//myCareersWidget_spec.js + +describe('Journeysmap script', function () { + //app-journeysmap landing page + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + + //Open browser + //browser.driver.manage().window().setSize(1600, 800); + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login').then(function() { + browser.sleep(1000); + }); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Login'); + }); + + //Sign In + SignIn(UserNameTextBox, PasswordTextBox); + + function SignIn(UserNameTextBox, PasswordTextBox) { + 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.'); + browser.sleep(2500); + await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + browser.sleep(2500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(2500); + }); + await NextButton.click().then(function() { + browser.sleep(5000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + } + + //<<<>>> + MyCareersWidget(); + + //Sign Out*/ + SignOut(); +}); + +function MyCareersWidget() { + it(': MyCareersWidget, should cycle through Recommended Careers carousel and click the View More link', async function () { + var WidgetTitle = element(by.css('.fullHeight > .jrnys_lead-body-copy')); + var AdministrativeLawJudgesAdjudicatorsAndHearingOfficers = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AdministrativeServicesManagers = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var MyCareersWidgetCardTwoAtAGlanceIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardItemText')); + var MyCareersWidgetBackOfCardTwoTitle = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer > div:nth-child(2) .territoryCardTitleText')); + var MyCareersWidgetBackOfCardTwoDescription = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardDescriptionText')); + var MyCareersWidgetBackOfCardTwoDegreeHeader = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoDegreeDataOne = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoDegreeDataTwo = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoDegreeDataThree = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoSalaryHeader = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(16) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoSalaryData = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(17) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoGrowthHeader = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(19) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoGrowthDataOne = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(20) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoGrowthDataTwo = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(20) > td:nth-child(2) > div:nth-child(3)')); + var MyCareersWidgetBackOfCardTwoJobOpeningsHeader = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(22) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoJobOpeningsData = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(23) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoEmployedHeader = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(25) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoEmployedData = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > territory-card-at-a-glance-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(26) > td:nth-child(2) > div:nth-child(1)')); + var MyCareersWidgetBackOfCardTwoCloseIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer > div:nth-child(2) > #territoryCardTitleHeader .glyphicon')); + var MyCareersWidgetCardTwoEllipsisIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer > div > div > div > .territoryCardIcon > .fas')); + var MyCareersWidgetBackOfCardTwoLearnMoreIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(3) > div:nth-child(2) > territory-card-more-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2)')); + var MyCareersWidgetBackOfCardTwoMapIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(3) > div:nth-child(2) > territory-card-more-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2)')); + var MyCareersWidgetBackOfCardTwoJourneyIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(3) > div:nth-child(2) > territory-card-more-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div:nth-child(2)')); + var MyCareersWidgetBackOfCardTwoVideoIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(3) > div:nth-child(2) > territory-card-more-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(4) > div:nth-child(2)')); + var MyCareersWidgetBackOfCardTwoVideoTitle = element(by.css('.modal-content .ng-binding')); + var MyCareersWidgetBackOfCardTwoVideoFooter = element(by.css('.modal-content div:nth-child(3)')); + var MyCareersWidgetBackOfCardTwoVideoCloseIcon = element(by.css('.close')); + var MyCareersWidgetBackOfCardTwoAtAGlanceIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > div:nth-child(1) > div:nth-child(3) > div:nth-child(2) > territory-card-more-back:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(5) > div:nth-child(2)')); + var MyCareersWidgetBackOfCardTwoEllipsisCloseIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer > div:nth-child(3) > #territoryCardTitleHeader .glyphicon')); + var MyCareersWidgetCardTwoLearnMoreIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(1) > .territoryCardActionBarText')); + var MyCareersWidgetCardTwoMapIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(2) > .territoryCardActionBarText')); + var MyCareersWidgetCardTwoJourneyIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(3) > .territoryCardActionBarText')); + var MyCareersWidgetCardTwoVideoIcon = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardActionBarItemContainer:nth-child(4) > .territoryCardActionBarText')); + var MyCareersWidgetClusterDIVTitle = element(by.css('.ng-scope > .territoryCardTitleText')); + var HealthScience = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(1) .ng-scope > div > .territoryCardTitleText > .ng-binding')); + var TransportationDistributionAndLogistics = element(by.css('.col-xs-4:nth-child(2) .ng-scope > div > .territoryCardTitleText > .ng-binding')); + var BusinessManagementAndAdministration = element(by.css('.col-xs-4:nth-child(3) .ng-scope > div > .territoryCardTitleText > .ng-binding')); + var MyCareersWidgetDIVRightArrowIcon = element(by.css('td > .carousel > .right > .glyphicon')); + var GovernmentAndPublicAdministration = element(by.css('.item:nth-child(2) .ng-scope > div > .territoryCardTitleText > .ng-binding')); + var MyCareersWidgetDIVLeftArrowIcon = element(by.css('td > .carousel > .left > .glyphicon')); + var MyCareersWidgetDIVCardTwoSelectButton = element(by.css('.col-xs-4:nth-child(2) .btn')); + var MyCareersWidgetDIVLearnMoreTitle = element(by.css('td .jrnys_lead-body-copy')); + var BackLink = element(by.css('.btn-primary-back-mod')); + var AirTrafficControllers = element(by.css('#\\30 2c1f459-be14-4ea7-8229-404af8ccb881 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var CarrouselRightScroll = element(by.css('.glyphicon-chevron-right')); + var AircraftCargoHandlingSupervisors = element(by.css('#\\36 62659b9-7faa-4b77-bce1-b8f92bfe8573 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AirfieldOperationsSpecialists = element(by.css('#\\33 b760692-c82e-4868-98e1-f7a5fa410ab4 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AppraisersRealEstate = element(by.css('#\\30 16e2bd5-6460-490b-8e50-a2a372ded8a2 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AquaculturalManagers = element(by.css('#\\31 48561a2-47fe-409c-ab67-21ed88954038 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ArchitectsExceptLandscapeAndNaval = element(by.css('#\\34 729871a-cff9-4010-8f1c-2688fe8c4def > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ArchitecturalAndEngineeringManagers = element(by.css('#\\32 dbe648d-2f34-41d0-8ada-5042e198dbdc > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ArchitecturalDrafters = element(by.css('#\\30 efba013-dfb9-47b1-b244-a7a32d0b29d2 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var Assessors = element(by.css('#\\32 1e8e637-0720-4ca9-9164-25c9420c5f3f > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var Auditors = element(by.css('#\\38 c8c2aff-431d-45bc-867e-54ac3acd2e9a > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AuthorizingOfficialDesignatingRepresentative = element(by.css('#ceff912f-2195-4cb7-b77a-87c3bd0792fe > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var BiofuelsProductionManagers = element(by.css('#f76ab5f4-ba1c-4412-bacf-3fcd9a85b8cd > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var ViewMoreLink = element(by.linkText('View More')); + var PageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); + var AdministrativeLawJudgesAdjudicatorsAndHearingOfficersFollow = element(by.css('#\\39 d53706e-b04f-4fcb-a36e-d9c48934c2e1 > #territoryCardContainer > div > div > div .journey-follow')); + var TransportationEngineers = element(by.css('#\\35 d25e23b-3acb-474c-807d-57e20f77cc18 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var FilterIcon = element(by.css('.widgetControlContainer')); + var FilterTitle = element(by.css('.modal-content > .ng-scope > .ng-binding')); + var MyResultsHeader = element(by.css('#recommendedCareerFilter tr:nth-child(1) > td')); + var InterestSurveyResults = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(2)')); + var InterestSurveyResultsCheckBox = element(by.css('.ng-scope:nth-child(2) > td > input')); + var SkillsAssessmentResults = element(by.css('.ng-scope:nth-child(3) > .ng-binding:nth-child(2)')); + var SkillsAssessmentResultsCheckBox = element(by.css('.ng-scope:nth-child(3) > td > input')); + var MyFollowing = element(by.css('.ng-scope:nth-child(4) > .ng-binding:nth-child(2)')); + var MyFollowingCheckBox = element(by.css('.ng-scope:nth-child(4) input')); + var JobPrepHeader = element(by.css('#recommendedCareerFilter tr:nth-child(5) > td')); + var MayRequireHighSchoolDiplomaOrGED = element(by.css('.ng-scope:nth-child(6) > .ng-binding:nth-child(2)')); + var MayRequireHighSchoolDiplomaOrGEDCheckBox = element(by.css('.ng-scope:nth-child(6) input')); + var HighSchoolDiploma = element(by.css('.ng-scope:nth-child(7) > .ng-binding:nth-child(2)')); + var HighSchoolDiplomaCheckBox = element(by.css('.ng-scope:nth-child(7) input')); + var VocationalTrainingOrAssociatesDegrees = element(by.css('.ng-scope:nth-child(8) > .ng-binding:nth-child(2)')); + var VocationalTrainingOrAssociatesDegreesCheckBox = element(by.css('.ng-scope:nth-child(8) input')); + var FourYearBachelorDegrees = element(by.css('.ng-scope:nth-child(9) > .ng-binding')); + var FourYearBachelorDegreesCheckBox = element(by.css('.ng-scope:nth-child(9) input')); + var GraduateSchoolOrProfessionalDegree = element(by.css('.ng-scope:nth-child(10) > .ng-binding')); + var GraduateSchoolOrProfessionalDegreeCheckBox = element(by.css('.ng-scope:nth-child(10) input')); + var FitHeader = element(by.css('#recommendedCareerFilter tr:nth-child(11) > td')); + var Best = element(by.css('.ng-scope:nth-child(12) > .ng-binding')); + var BestCheckBox = element(by.css('.ng-scope:nth-child(12) input')); + var Great = element(by.css('.ng-scope:nth-child(13) > .ng-binding')); + var GreatCheckBOx = element(by.css('.ng-scope:nth-child(13) input')); + var Good = element(by.css('.ng-scope:nth-child(14) > .ng-binding')); + var GoodCheckBox = element(by.css('.ng-scope:nth-child(14) input')); + var CategoryHeader = element(by.css('#recommendedCareerFilter tr:nth-child(15) > td')); + var BrightOutlook = element(by.css('.ng-scope:nth-child(16) > .ng-binding')); + var BrightOutlookCheckBox = element(by.css('.ng-scope:nth-child(16) input')); + var Green = element(by.css('.ng-scope:nth-child(17) > .ng-binding')); + var GreenCheckBox = element(by.css('.ng-scope:nth-child(17) input')); + var Apprenticeships = element(by.css('.ng-scope:nth-child(18) > .ng-binding')); + var ApprenticeshipsCheckBox = element(by.css('.ng-scope:nth-child(18) input')); + var Following = element(by.css('.ng-scope:nth-child(19) > .ng-binding')); + var FollowingCheckBox = element(by.css('.ng-scope:nth-child(19) input')); + var SortHeader = element(by.css('#recommendedCareerFilter tr:nth-child(20) > td')); + var AtoZ = element(by.css('tr:nth-child(21) > td:nth-child(2)')); + var AtoZRadioButton = element(by.css('td > .ng-pristine')); + var ZtoA = element(by.css('#recommendedCareerFilter tr:nth-child(22) > td:nth-child(2)')); + var ZtoARadioButton = element(by.css('tr:nth-child(22) .ng-pristine')); + var FilterButton = element(by.css('td > .btn-info')); + var WindEngergyProjectManagers = element(by.css('#\\38 bcbe02a-c522-4035-b0e1-48534bdfc37a > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var WholesaleAndRetailBuyersExceptFarmProducts = element(by.css('#\\39 a1cba50-6587-49a1-add0-dcc66a9bea71 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));//xpath('/html/body/div[1]/div/div[2]/div[2]/div/my-careers-view-all/div/div[2]/div/div/div/div/div[2]/div/div/career-territory-card/territory-card/div/div[1]/div[3]/div/div[2]/span')); + var TreasurersAndControllers = element(by.css('#\\33 1a506f8-ad4e-4af9-ba38-6e606ca7a7ed > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var SupplyChainManagers = element(by.css('#dceb040f-09f8-494a-b9c8-83d8505a42ce > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var FilterBubbleOne = element(by.css('.statusBtn:nth-child(1)')); + var FilterBubbleTwo = element(by.css('.statusBtn:nth-child(2)')); + var FilterBubbleThree = element(by.css('.statusBtn:nth-child(3)')); + var FilterBubbleFour = element(by.css('.statusBtn:nth-child(4)')); + var FilterBubbleFive = element(by.css('.statusBtn:nth-child(5)')); + var JobPrepFilterButton = element(by.css('.statusBtn:nth-child(1) > .xIcon')); + var WidgetFilterIcon = element(by.css('.fa-sliders-h')); + var FilterButtonTwo = element(by.css('tr:nth-child(23) .btn-info')); + var RemoveZtoAFilterButton = element(by.css('.statusBtn:nth-child(2) > .xIcon')); + var RemoveShowMyResultsFilterButton = element(by.css('.xIcon')); + + /*Resolution 1366 x 768 + browser.executeScript('window.scrollTo(0, 932);').then(function() { + browser.sleep(5000); + });*/ + + browser.executeScript('window.scrollTo(0, 1250);').then(function() { + browser.sleep(5000); + }); + expect(await WidgetTitle.getText()).toEqual('My Careers View All'); + expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + expect(await MyCareersWidgetCardTwoAtAGlanceIcon.getText()).toContain('At a'); + expect(await MyCareersWidgetCardTwoAtAGlanceIcon.getText()).toContain('Glance'); + await MyCareersWidgetCardTwoAtAGlanceIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await MyCareersWidgetBackOfCardTwoTitle.getText()).toEqual('Administrative Services Managers'); + expect(await MyCareersWidgetBackOfCardTwoDescription.getText()).toEqual('Plan, direct, or coordinate one or more administrative services of an organization, such as records and information management, mail distribution, facilities planning and maintenance, custodial operations, and other office support services.'); + expect(await MyCareersWidgetBackOfCardTwoDegreeHeader.getText()).toEqual('Typical Degree'); + expect(await MyCareersWidgetBackOfCardTwoDegreeDataOne.getText()).toEqual('High school - 34%'); + expect(await MyCareersWidgetBackOfCardTwoDegreeDataTwo.getText()).toEqual('College (4 Year) - 24%'); + expect(await MyCareersWidgetBackOfCardTwoDegreeDataThree.getText()).toEqual('Professional degree certificate - 13%'); + expect(await MyCareersWidgetBackOfCardTwoSalaryHeader.getText()).toEqual('Average Annual Salary'); + expect(await MyCareersWidgetBackOfCardTwoSalaryData.getText()).toEqual('$94,020'); + expect(await MyCareersWidgetBackOfCardTwoGrowthHeader.getText()).toEqual('Projected Growth'); + expect(await MyCareersWidgetBackOfCardTwoGrowthDataOne.getText()).toEqual('10.1%'); + expect(await MyCareersWidgetBackOfCardTwoGrowthDataTwo.getText()).toEqual('ABOVE AVERAGE'); + expect(await MyCareersWidgetBackOfCardTwoJobOpeningsHeader.getText()).toEqual('Projected Job Openings'); + expect(await MyCareersWidgetBackOfCardTwoJobOpeningsData.getText()).toEqual('26,200'); + expect(await MyCareersWidgetBackOfCardTwoEmployedHeader.getText()).toEqual('Currently Employed'); + expect(await MyCareersWidgetBackOfCardTwoEmployedData.getText()).toEqual('281,700'); + await MyCareersWidgetBackOfCardTwoCloseIcon.click().then(function() { + browser.sleep(2500); + }); + await MyCareersWidgetCardTwoEllipsisIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await MyCareersWidgetBackOfCardTwoLearnMoreIcon.getText()).toEqual('Learn More'); + expect(await MyCareersWidgetBackOfCardTwoMapIcon.getText()).toEqual('Map'); + expect(await MyCareersWidgetBackOfCardTwoJourneyIcon.getText()).toEqual('Journey'); + expect(await MyCareersWidgetBackOfCardTwoVideoIcon.getText()).toEqual('Video'); + await MyCareersWidgetBackOfCardTwoVideoIcon.click().then(function() { + browser.sleep(20000); + }); + expect(await MyCareersWidgetBackOfCardTwoVideoTitle.getText()).toEqual('Administrative Services Managers'); + expect(await MyCareersWidgetBackOfCardTwoVideoFooter.getText()).toEqual('Produced by CareerOneStop'); + await MyCareersWidgetBackOfCardTwoVideoCloseIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await MyCareersWidgetBackOfCardTwoAtAGlanceIcon.getText()).toEqual('At A Glance'); + await MyCareersWidgetBackOfCardTwoEllipsisCloseIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await MyCareersWidgetCardTwoLearnMoreIcon.getText()).toEqual('Learn More'); + expect(await MyCareersWidgetCardTwoMapIcon.getText()).toEqual('Map'); + expect(await MyCareersWidgetCardTwoJourneyIcon.getText()).toEqual('Journey'); + expect(await MyCareersWidgetCardTwoVideoIcon.getText()).toEqual('Video'); + await MyCareersWidgetCardTwoLearnMoreIcon.click().then(function() { + browser.sleep(5000); + }); + expect(await MyCareersWidgetClusterDIVTitle.getText()).toEqual('Administrative Services Managers is found in a few different clusters. Select the cluster below that you would like to Learn More about:'); + expect(await HealthScience.getText()).toEqual('Health Science'); + expect(await TransportationDistributionAndLogistics.getText()).toEqual('Transportation, Distribution & Logistics'); + expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration'); + await MyCareersWidgetDIVRightArrowIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await GovernmentAndPublicAdministration.getText()).toEqual('Government & Public Administration'); + await MyCareersWidgetDIVLeftArrowIcon.click().then(function() { + browser.sleep(2500); + }); + await MyCareersWidgetDIVCardTwoSelectButton.click().then(function() { + browser.sleep(5000); + }); + expect(await MyCareersWidgetDIVLearnMoreTitle.getText()).toEqual('Administrative Services Managers'); + await BackLink.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 1250);').then(function() { + browser.sleep(5000); + }); + expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); + //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Interest'); EDM-1726 + //expect(await FirstOccupationCardBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + await CarrouselRightScroll.click().then(function() { + browser.sleep(2500); + }); + expect(await AircraftCargoHandlingSupervisors.getText()).toEqual('Aircraft Cargo Handling Supervisors'); + expect(await AirfieldOperationsSpecialists.getText()).toEqual('Airfield Operations Specialists'); + expect(await AppraisersRealEstate.getText()).toEqual('Appraisers, Real Estate'); + await CarrouselRightScroll.click().then(function() { + browser.sleep(2500); + }); + expect(await AquaculturalManagers.getText()).toEqual('Aquacultural Managers'); + expect(await ArchitectsExceptLandscapeAndNaval.getText()).toEqual('Architects, Except Landscape and Naval'); + expect(await ArchitecturalAndEngineeringManagers.getText()).toEqual('Architectural and Engineering Managers'); + await CarrouselRightScroll.click().then(function() { + browser.sleep(2500); + }); + expect(await ArchitecturalDrafters.getText()).toEqual('Architectural Drafters'); + expect(await Assessors.getText()).toEqual('Assessors'); + expect(await Auditors.getText()).toEqual('Auditors'); + await CarrouselRightScroll.click().then(function() { + browser.sleep(2500); + }); + expect(await AuthorizingOfficialDesignatingRepresentative.getText()).toEqual('Authorizing Official/Designating Representative'); + expect(await BiofuelsProductionManagers.getText()).toEqual('Biofuels Production Managers'); + await ViewMoreLink.click().then(function() { + browser.sleep(5000); + }); + expect(await PageTitle.getText()).toEqual('My Careers'); + expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); + await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersFollow.click().then(function() { + browser.sleep(2500); + }); + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + expect(await AircraftCargoHandlingSupervisors.getText()).toEqual('Aircraft Cargo Handling Supervisors'); + /*expect(await MyCareersPageCardTwoTitle.getText()).toEqual('Administrative Services Managers'); + expect(await MyCareersPageCardThreeTitle.getText()).toEqual('Air Traffic Controllers'); + expect(await TransportationEngineers.getText()).toEqual('Aircraft Cargo Handling Supervisors');*/ + await FilterIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await FilterTitle.getText()).toEqual('Filter'); + expect(await MyResultsHeader.getText()).toEqual('My Results'); + expect(await InterestSurveyResults.getText()).toContain('Interest Survey Results ('); + expect(await SkillsAssessmentResults.getText()).toContain('Skills Assessment Results ('); + await SkillsAssessmentResultsCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await MyFollowing.getText()).toContain('My Following ('); + expect(await JobPrepHeader.getText()).toEqual('Job Prep'); + expect(await MayRequireHighSchoolDiplomaOrGED.getText()).toContain('May Require High School Diploma or GED ('); + await MayRequireHighSchoolDiplomaOrGEDCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await HighSchoolDiploma.getText()).toContain('High School Diploma ('); + expect(await VocationalTrainingOrAssociatesDegrees.getText()).toContain('Vocational Training or Associates Degree ('); + expect(await FourYearBachelorDegrees.getText()).toContain('4 Year Bachelor Degree ('); + expect(await GraduateSchoolOrProfessionalDegree.getText()).toContain('Graduate School or Professional Degree ('); + expect(await FitHeader.getText()).toEqual('Fit'); + expect(await Best.getText()).toContain('Best ('); + await BestCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await Great.getText()).toContain('Great ('); + expect(await Good.getText()).toContain('Good ('); + await GoodCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await CategoryHeader.getText()).toEqual('Category'); + expect(await BrightOutlook.getText()).toContain('Bright Outlook ('); + expect(await Green.getText()).toContain('Green ('); + expect(await Apprenticeships.getText()).toContain('Apprenticeship ('); + expect(await Following.getText()).toContain('Following ('); + await FollowingCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await SortHeader.getText()).toEqual('Sort'); + expect(await AtoZ.getText()).toEqual('A to Z'); + expect(await ZtoA.getText()).toEqual('Z to A'); + await ZtoARadioButton.click().then(function() { + browser.sleep(1000); + }); + await FilterButton.click().then(function() { + browser.sleep(5000); + }); + expect(await FilterBubbleOne.getText()).toEqual('Job PrepX'); + expect(await FilterBubbleTwo.getText()).toEqual('FitX'); + expect(await FilterBubbleThree.getText()).toEqual('My ResultsX'); + expect(await FilterBubbleFour.getText()).toEqual('CategoryX'); + expect(await FilterBubbleFive.getText()).toEqual('Z to AX'); + expect(await WindEngergyProjectManagers.getText()).toEqual('Wind Energy Project Managers'); + expect(await WholesaleAndRetailBuyersExceptFarmProducts.getText()).toEqual('Wholesale and Retail Buyers, Except Farm Products'); + expect(await TreasurersAndControllers.getText()).toEqual('Treasurers and Controllers'); + expect(await TransportationEngineers.getText()).toEqual('Transportation Engineers'); + await JobPrepFilterButton.click().then(function() { + browser.sleep(5000); + }); + expect(await FilterBubbleOne.getText()).toEqual('FitX'); + expect(await FilterBubbleTwo.getText()).toEqual('My ResultsX'); + expect(await FilterBubbleThree.getText()).toEqual('CategoryX'); + expect(await FilterBubbleFour.getText()).toEqual('Z to AX'); + expect(await WindEngergyProjectManagers.getText()).toEqual('Wind Energy Project Managers'); + expect(await TreasurersAndControllers.getText()).toEqual('Treasurers and Controllers'); + expect(await TransportationEngineers.getText()).toEqual('Transportation Engineers'); + expect(await SupplyChainManagers.getText()).toEqual('Supply Chain Managers'); + /*await MyCareersPageCardOneFollow.click().then(function() { + browser.sleep(2500); + });*/ + await BackLink.click().then(function() { + browser.sleep(2500); + }); + browser.executeScript('window.scrollTo(0, 1250);').then(function() { + browser.sleep(5000); + }); + expect(await FilterBubbleOne.getText()).toEqual('FitX'); + expect(await FilterBubbleTwo.getText()).toEqual('My ResultsX'); + expect(await FilterBubbleThree.getText()).toEqual('CategoryX'); + expect(await FilterBubbleFour.getText()).toEqual('Z to AX'); + expect(await WindEngergyProjectManagers.getText()).toEqual('Wind Energy Project Managers'); + expect(await TreasurersAndControllers.getText()).toEqual('Treasurers and Controllers'); + expect(await TransportationEngineers.getText()).toEqual('Transportation Engineers'); + await WidgetFilterIcon.click().then(function() { + browser.sleep(2500); + }); + await BestCheckBox.click().then(function() { + browser.sleep(1000); + }); + await GoodCheckBox.click().then(function() { + browser.sleep(1000); + }); + expect(await Following.getText()).toContain('Following ('); + await FollowingCheckBox.click().then(function() { + browser.sleep(2500); + }); + await FilterButtonTwo.click().then(function() { + browser.sleep(5000); + }); + expect(await FilterBubbleOne.getText()).toEqual('My ResultsX'); + expect(await FilterBubbleTwo.getText()).toEqual('Z to AX'); + expect(await WindEngergyProjectManagers.getText()).toEqual('Wind Energy Project Managers'); + expect(await TreasurersAndControllers.getText()).toEqual('Treasurers and Controllers'); + expect(await TransportationEngineers.getText()).toEqual('Transportation Engineers'); + await RemoveZtoAFilterButton.click().then(function() { + browser.sleep(5000); + }); + expect(await FilterBubbleOne.getText()).toEqual('My ResultsX'); + expect(await ArchitectsExceptLandscapeAndNaval.getText()).toEqual('Architects, Except Landscape and Naval'); + expect(await ArchitecturalAndEngineeringManagers.getText()).toEqual('Architectural and Engineering Managers'); + expect(await ArchitecturalDrafters.getText()).toEqual('Architectural Drafters'); + await RemoveShowMyResultsFilterButton.click().then(function() { + browser.sleep(5000); + }); + expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficers.getText()).toEqual('Administrative Law Judges, Adjudicators, and Hearing Officers'); + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + browser.sleep(2500); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function SignOut() { + 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 SignOutButton.click().then(function() { + browser.sleep(2500); + }); + }); +} \ No newline at end of file diff --git a/profileAndMyProgress_config.js b/profileAndMyProgress_config.js new file mode 100644 index 0000000..9e26b95 --- /dev/null +++ b/profileAndMyProgress_config.js @@ -0,0 +1,30 @@ +//profileAndMyProgress_config.js + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['profileAndMyProgress_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/profileAndMyProgress_spec.js b/profileAndMyProgress_spec.js new file mode 100644 index 0000000..55e38b0 --- /dev/null +++ b/profileAndMyProgress_spec.js @@ -0,0 +1,218 @@ +//profileAndMyProgress_spec.js + +describe('Journeysmap script', function () { + //app-journeysmap landing page + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + + //Open browser + //browser.driver.manage().window().setSize(1600, 800); + browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login').then(function() { + browser.sleep(1000); + }); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Login'); + }); + + //Sign In + SignIn(UserNameTextBox, PasswordTextBox); + + function SignIn(UserNameTextBox, PasswordTextBox) { + 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.'); + browser.sleep(2500); + await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + browser.sleep(2500); + }); + await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { + browser.sleep(2500); + }); + await NextButton.click().then(function() { + browser.sleep(5000); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); + } + + //<<<>>> + ProfileWidget(); + + MyProgressWidget(); + + //Sign Out*/ + SignOut(); +}); + +function ProfileWidget() { + it(': ProfileWidget, should expand profile widget, edit About Me widget, then validate Role Model and Education Widgets', async function () { + var ProfileWidgetExpandCollapseIcon = element(by.css('span > .fa')); + var ConnectionsLink = element(by.css('.col-md-3:nth-child(2) .jrnys_support-text')); + var FollowersLink = element(by.css('.col-md-3:nth-child(3) .jrnys_support-text')); + var FollowersDivTitle = element(by.css('.default-color2 > h3')); + var FollowersDivSubText = element(by.css('.col-md-12:nth-child(1)')); + var FollowersDivGotItButton = element(by.css('.btn-lg')); + + var AboutMeWidgetTitle = element(by.css('#aboutMeFull > .jrnys_lead-body-copy')); + var AboutMePencil = element(by.css('#aboutMeFull .fa-pencil')); + var ABoutMeInputArea = element(by.id('inputArea')); + + var RoleModelWidgetTitle = element(by.css('td > .jrnys_lead-body-copy')); + var RoleModelNameOne = element(by.css('.inner-content-padding > .textSize:nth-child(1)')); + var RoleModelNameTwo = element(by.css('.textSize:nth-child(2)')); + + var EducationWidgetTitle = element(by.css('#education > .jrnys_lead-body-copy')); + var EducationStartEndDate = element(by.css('.col-xs-4 > .ng-binding:nth-child(1)')); + var EducationSchoolName = element(by.css('.col-xs-8')); + + expect(await ConnectionsLink.getText()).toEqual('CONNECTIONS'); + await FollowersLink.click().then(function() { + browser.sleep(1000); + }); + expect(await FollowersDivTitle.getText()).toEqual('This feature is on its way!'); + expect(await FollowersDivSubText.getText()).toEqual("Love Journeys? Then you'll love what is coming next."); + await FollowersDivGotItButton.click().then(function() { + browser.sleep(1000); + }); + await ProfileWidgetExpandCollapseIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await AboutMeWidgetTitle.getText()).toEqual('About Me'); + browser.actions().mouseMove(element(by.css('.ng-scope > #aboutMeFull'))).perform().then(function() { + browser.sleep(1000); + }); + await AboutMePencil.click().then(function() { + browser.sleep(1000); + }); + await ABoutMeInputArea.clear().then(function() { + browser.sleep(2500); + }); + await ABoutMeInputArea.sendKeys('This is my automated bio, there are many like it but this one is mine.'); + await AboutMePencil.click().then(function() { + browser.sleep(1000); + }); + browser.executeScript('window.scrollTo(0, 780);').then(function() { + browser.sleep(2500); + }); + expect(await RoleModelWidgetTitle.getText()).toEqual('Role Model'); + expect(await RoleModelNameOne.getText()).toEqual('Elon Musk'); + expect(await RoleModelNameTwo.getText()).toEqual('Emma Watson'); + expect(await EducationWidgetTitle.getText()).toEqual('Education'); + expect(await EducationStartEndDate.getText()).toEqual('06/2005'); + expect(await EducationSchoolName.getText()).toEqual('SUNNYSIDE ELEMENTARY'); + browser.executeScript('window.scrollTo(0, 0);').then(function() { + browser.sleep(2500); + }); + await ProfileWidgetExpandCollapseIcon.click().then(function() { + browser.sleep(2500); + }); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function MyProgressWidget() { + it(': MyProgressWidget, should interact with My Progress widget, navigate to Interest Survey, toggle language to Spanish then back to English and complete survey', async function () { + var MyProgressWidgetTitle = element(by.css('.yourProgressTitle')); + var ProgressLevel = element(by.css('.myProgressLevel')); + var ProgressWidgetExpandIcon = element(by.css('.full-width .ng-scope')); + var ActionOneCompleted = element(by.css('.col-md-3:nth-child(1) > .ng-scope')); + var ActionTwo = element(by.css('.col-md-3:nth-child(2) > .ng-scope')); + var ActionTwoCompleted = element(by.css('.col-md-3:nth-child(2) > .ng-scope')); + var ActionTwoRetake = element(by.css('div:nth-child(3) > .fa-tasks')); + + var InterestSurveyTitle = element(by.css('.jrnys_lead-body-copy')); + var TextOne = element(by.css('.col-md-4:nth-child(1) > .ng-binding:nth-child(1)')); + var TextTwo = element(by.css('.col-md-4:nth-child(2) > .ng-binding:nth-child(1)')); + var TextThree = element(by.css('.col-md-4:nth-child(3) > .ng-binding:nth-child(1)')); + var InactiveLanguageButton = element(by.css('.btn-info > .ng-scope')); + var LanguageAlertDIV = element(by.css('p:nth-child(7)')); + var LanguageAlterConfirmButton = element(by.css('.confirm')); + var DislikeEmoji = element(by.id('emoji_0_0')); + var LikeItEmoji = element(by.id('emoji_0_3')); + var LoveItEmoji = element(by.id('emoji_0_4')); + var PreviousQuestion = element(by.linkText('< Previous Question')); + var CancelSurveyButton = element(by.css('.btn-md')); + + 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')); + var AdministrativeServicesManagers = element(by.css('#aa3ce6df-8851-4f10-8341-a4b7cdac7b7d > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + var AirTrafficControllers = element(by.css('#\\30 2c1f459-be14-4ea7-8229-404af8ccb881 > #territoryCardContainer .territoryCardTitleText > .ng-binding')); + + expect(await MyProgressWidgetTitle.getText()).toEqual('MY PROGRESS'); + expect(await ProgressLevel.getText()).toEqual('Level: Scout'); + await ProgressWidgetExpandIcon.click().then(function() { + browser.sleep(2500); + }); + expect(await ActionOneCompleted.getText()).toContain('Account Creation'); + expect(await ActionOneCompleted.getText()).toContain('Completed'); + expect(await ActionTwo.getText()).toContain('Interest Survey'); + expect(await ActionTwoCompleted.getText()).toContain('Completed'); + //Interest Survey page - validate English & Spanish text + await ActionTwoRetake.click().then(function() { + browser.sleep(5000); + }); + expect(await InterestSurveyTitle.getText()).toEqual('Interest Survey'); + expect(await TextOne.getText()).toEqual("In less than 10 minutes you'll be matched to some exciting careers!"); + expect(await TextTwo.getText()).toEqual('For each option, select the emotion that matches how you feel about the activity.'); + expect(await TextThree.getText()).toEqual('Say how you really feel, there are no wrong answers!'); + await LikeItEmoji.click(); + await PreviousQuestion.click(); + await InactiveLanguageButton.click().then(function() { + browser.sleep(5000) + }); + expect(await LanguageAlertDIV.getText()).toEqual('Changing the language setting will result in starting the survey over again. Do you want to change languages and start at question 1?'); + await LanguageAlterConfirmButton.click(); + expect(await TextOne.getText()).toEqual('¡En menos de 10 minutos te conectamos con las mejores carreras para ti!'); + expect(await TextTwo.getText()).toEqual('Por cada opción, selecciona la emocion que indica como te siendes sobre este tema.'); + expect(await TextThree.getText()).toEqual('Indica cómo te sientes realmente, se sincero. ¡no hay respuesta incorrecta!'); + await DislikeEmoji.click(); + await LikeItEmoji.click(); + await LoveItEmoji.click().then(function() { + browser.sleep(5000) + }); + await CancelSurveyButton.click().then(function() { + browser.sleep(5000); + browser.waitForAngular(); + }); + browser.executeScript('window.scrollTo(0, 1405);').then(function() { + browser.sleep(5000); + }); + 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'); + //expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtBestFitIcon.getText()).toContain('Interest'); EDM-1726 + //expect(await AdministrativeLawJudgesAdjudicatorsAndHearingOfficersAtBestFitIcon.getText()).toContain('Best Fit'); EDM-1726 + expect(await AdministrativeServicesManagers.getText()).toEqual('Administrative Services Managers'); + expect(await AirTrafficControllers.getText()).toEqual('Air Traffic Controllers'); + browser.executeScript('window.scrollTo(0, 0);').then(function() { + browser.sleep(5000); + }); + }); +} + +function SignOut() { + 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 SignOutButton.click().then(function() { + browser.sleep(2500); + }); + }); +} \ No newline at end of file