diff --git a/app_journeysmap_spec.js b/app_journeysmap_spec.js index 07d6252..e27f940 100644 --- a/app_journeysmap_spec.js +++ b/app_journeysmap_spec.js @@ -22,7 +22,7 @@ describe('Journeysmap script', function () { }); function SignIn(UserNameTextBox, PasswordTextBox, SignInButton) { - it('should sign into journeys', async function () { + it('should sign into journeysmap.com', async function () { var JourneysGreeting = element(by.css('.dropdown')); //var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); @@ -32,7 +32,7 @@ describe('Journeysmap script', function () { browser.waitForAngular(); browser.getCurrentUrl(); expect(await JourneysGreeting.getText()).toEqual('Hi, Automated'); - /*DELETE await DashboardHeaderLink.click().then(function() { + /*await DashboardHeaderLink.click().then(function() { browser.sleep(5000); });*/ //browser.refresh();//Role Model doesn't always load properly EDM-1603 @@ -45,12 +45,22 @@ describe('Journeysmap script', function () { //<<<>>> ProfileWidget(); + MyProgressWidget(); + InterestSurveyResultsWidget(); InterestSurveyResultsClusters(); InterestSurveyResultsCreateJourney(); + + SkillsAssessmentWidget(); + SkillsAssessmentResults(); + + BeginCareerExploration(); + + MyRecommendedCareers(); + + EditTopCareer(); TopCareerWidget(); - TopCareer(); NearbyPlacesOccupationCard(); AtAGlance(); Personality(); @@ -69,19 +79,10 @@ describe('Journeysmap script', function () { WorkActivities(); Ability(); - //My Resources MyResources(); - //Institutions Instititions(); - //My Recommended Careers - MyRecommendedCareers(); - - //Following Page - FollowingPage(); - - //My Journeys MyJourneys(); //<<<>>> @@ -305,7 +306,6 @@ function MyProgressWidget() { 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() { @@ -351,7 +351,7 @@ function InterestSurveyResultsWidget() { 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) .color3a-color')); + 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')); @@ -403,8 +403,6 @@ function InterestSurveyResultsWidget() { var DivAlertMessage = element(by.css('p:nth-child(7)')); var DivOKButton = element(by.css('.confirm')); - var InterestRetakeLink = element(by.css('div:nth-child(3) > .fa-tasks')); - browser.actions().mouseMove(element(by.css('#recommendedCareersCollapsed .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); }); @@ -651,6 +649,7 @@ function InterestSurveyResultsCreateJourney() { var JourneySaveDivTitle = element(by.css('h2')); var JourneySaveDivDescription = element(by.css('p:nth-child(7)')); var JourneyPersistButton = element(by.css('.confirm')); + var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); await JourneymanIcon.click().then(function() { browser.sleep(1000); @@ -691,15 +690,384 @@ function InterestSurveyResultsCreateJourney() { expect(await JourneySaveDivTitle.getText()).toEqual('Journey saved!'); expect(await JourneySaveDivDescription.getText()).toEqual('Would you like this journey to persist on the map?'); await JourneyPersistButton.click(); - browser.sleep(1000); + browser.sleep(2500); + await DashboardHeaderLink.click().then(function() { + browser.sleep(5000); + }); browser.waitForAngular(); browser.getCurrentUrl(); }); } -function TopCareerWidget() { - it('should edit Top Career', async function () { +function SkillsAssessmentWidget() { + it('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); + }); + 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'); + 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'); + await DashboardHeaderLink.click().then(function() { + browser.sleep(5000); + }); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function SkillsAssessmentResults() { + it('should interact with Skills Assessment widget', 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 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); + }); + expect(await SkillsAssessmentWidgetTitle.getText()).toEqual('Skills Assessment Results'); + expect(await BestFitHeader.getText()).toEqual('BEST FIT'); + 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(10000); + }); + 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 SkillsAssessmentResultPageTitle.getText()).toEqual('Skills Assessment Result'); + 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('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); + }); + 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 MyRecommendedCareers() { + it('should cycle through Recommended Careers carousel and click the View More link', async function () { + var WidgetTitle = element(by.css('#recommendedCareersCollapsed .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 FollowFirstOccupationCard = element(by.xpath('//div[3]/div/div/territory-card-social/div/social-interaction-icon/span/i')); DELETE + var FollowFirstOccupationCard = 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 RequiredJobPrepHeader = element(by.css('#recommendedCareerFilter tr:nth-child(2) > td')); + var MayRequireHighSchoolDiplomaOrGED = element(by.css('tr:nth-child(3) .ng-pristine')); + var FitHeader = element(by.css('#recommendedCareerFilter tr:nth-child(9) > td')); + var Best = element(by.css('.ng-scope:nth-child(10) > td > input')); + var Good = element(by.css('.ng-scope:nth-child(12) > td > input')); + var ShowResultsByHeader = element(by.css('#recommendedCareerFilter tr:nth-child(13) > td')); + var BrightOutlook = element(by.css('tr:nth-child(14) .ng-pristine')); + var Following = element(by.css('tr:nth-child(17) .ng-pristine')); + var MyFavorites = element(by.css('tr:nth-child(18) .ng-pristine')); + var SortHeader = element(by.css('#recommendedCareerFilter tr:nth-child(19) > td')); + var ZtoA = element(by.css('tr:nth-child(21) .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 ZtoAFilterButton = element(by.css('.statusBtn:nth-child(4) > .xIcon')); + var ShowResultsByFilterButton = element(by.css('.statusBtn:nth-child(3) > .xIcon')); + var FitFilterButton = element(by.css('.statusBtn:nth-child(2) > .xIcon')); + var RequiredJobPrepFilterButton = element(by.css('.xIcon')); + + browser.actions().mouseMove(element(by.css('.widget-padding:nth-child(2) > .jrnys_lead-body-copy'))).perform().then(function() { + browser.sleep(1000); + }); + expect(await WidgetTitle.getText()).toEqual('My Recommended Careers View All'); + await CarrouselRightScroll.click(); + browser.sleep(1000); + await CarrouselRightScroll.click(); + browser.sleep(1000); + await CarrouselRightScroll.click(); + browser.sleep(1000); + await CarrouselRightScroll.click(); + browser.sleep(1000); + await ViewMoreLink.click(); + browser.sleep(2500); + expect(await PageTitle.getText()).toEqual('My Recommended Careers'); + await FollowFirstOccupationCard.click(); + browser.sleep(1000); + await FilterIcon.click(); + browser.sleep(1000); + expect(await FilterTitle.getText()).toEqual('Filter'); + expect(await RequiredJobPrepHeader.getText()).toEqual('Required Job Prep'); + await MayRequireHighSchoolDiplomaOrGED.click(); + browser.sleep(1000); + expect(await FitHeader.getText()).toEqual('Fit'); + await Best.click(); + browser.sleep(1000); + await Good.click(); + browser.sleep(1000); + expect(await ShowResultsByHeader.getText()).toEqual('Show Results By'); + await Following.click(); + browser.sleep(1000); + expect(await SortHeader.getText()).toEqual('Sort'); + await ZtoA.click(); + browser.sleep(1000); + await FilterButton.click(); + 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); + }); + expect(await NoResultsFound.getText()).toContain('Sorry, Journeys found no matching results for that combination of filters. Please change the applied filters.'); + await ZtoAFilterButton.click(); + browser.sleep(2500); + await ShowResultsByFilterButton.click(); + browser.sleep(2500); + await FitFilterButton.click(); + browser.sleep(2500); + await RequiredJobPrepFilterButton.click(); + browser.sleep(2500); + browser.waitForAngular(); + browser.getCurrentUrl(); + }); +} + +function EditTopCareer() { + it('should edit Top Career', async function () { var WidgetTitle = element(by.css('.widget-padding:nth-child(2) > .jrnys_lead-body-copy')); var TopCareerEditIcon = element(by.css('.full-width .fa-pencil')); var TopCareerDivXRemoveLink = element(by.css('.col-xs-1 > .glyphicon')); @@ -715,9 +1083,6 @@ function TopCareerWidget() { var TopCareerDivSaveButton = element(by.css('.row:nth-child(12) #photoBtn')); var TopCareerDescription = element(by.css('.jrEllipsis3Lines')); - await DashboardHeaderLink.click().then(function() { - browser.sleep(5000); - }); browser.actions().mouseMove(element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); }); @@ -759,7 +1124,7 @@ function TopCareerWidget() { }); } -function TopCareer() { +function TopCareerWidget() { it('should click the Top Career link and interact with Learn More page', async function () { var TopCareerLink = element(by.css('td>.jrnys_support-text')); var LearnMoreTitle = element(by.css('td > div:nth-child(1) > .jrnys_lead-body-copy')); @@ -768,8 +1133,7 @@ function TopCareer() { var DescriptionSubText = element(by.css('.col-lg-12:nth-child(3)')); var XCloseLink = element(by.css('.close')); var VideoIcon = element(by.css('.text-right .far')); - var FollowIcon = element(by.css('.text-right .journey-follow:nth-child(2)')); - var FavoriteIcon = element(by.css('.text-right .journey-favorite:nth-child(3)')); + var FollowIcon = element(by.css('.text-right > span .journey-follow')); var JourneymanIcon = element(by.css('.text-right .socialImgIcon .socialImgIconJourneyableSvg')); var AtAGlanceHeader = element(by.css('#atAGlanceWidget .jrnys_lead-body-copy')); var AtAGlanceHeaderOne = element(by.css('.row-height:nth-child(1) .jrnys_support-text')); @@ -783,7 +1147,7 @@ function TopCareer() { var AtAGlanceStatFour = element(by.css('.row-height:nth-child(4) .dataFontSize')); var AtAGlanceHeaderFive = element(by.css('.row-height:nth-child(5) .jrnys_support-text')); var AtAGlanceStatFive = element(by.css('.row-height:nth-child(5) .dataFontSize')); - var PersonalityHeader = element(by.css('.widget-round-corners:nth-child(3) .fullHeight .jrnys_lead-body-copy')); + var PersonalityWidgetTitle = element(by.css('.widget-round-corners:nth-child(3) .fullHeight .jrnys_lead-body-copy')); var PersonalityDescriptionOne = element(by.css('.carouselHeight > .ng-scope > tbody > tr > td > .ng-binding')); var PersonalityDescriptionTwo = element(by.css('.ng-scope > tbody > tr:nth-child(2) div')); var PersonalityBulletOne = element(by.css('table:nth-child(1) .ng-scope:nth-child(1) > td:nth-child(1) > .ng-binding:nth-child(2)')); @@ -792,7 +1156,7 @@ function TopCareer() { var PersonalityBulletFour = element(by.css('.ng-scope:nth-child(2) > td:nth-child(2) > .ng-binding')); var PersonalityBulletFive = element(by.css('table:nth-child(1) .ng-scope:nth-child(3) > td:nth-child(1) > .ng-binding:nth-child(2)')); var PersonalityBulletSix = element(by.css('.ng-scope:nth-child(3) > td:nth-child(2) > .ng-binding')); - var WagesHeader = element(by.css('.widget-round-corners:nth-child(4) .fullHeight .jrnys_lead-body-copy')); + var WagesWidgetTitle = element(by.css('.widget-round-corners:nth-child(4) .fullHeight .jrnys_lead-body-copy')); var WagesInfoIcon = element(by.css('.jrnys_lead-body-copy > .journey-info-circle')); var WagesSubTextOne = element(by.css('table:nth-child(2) > tbody > tr:nth-child(2) div:nth-child(1)')); var WagesSubTextTwo = element(by.xpath('//occupation-wages/div/div[2]/table/tbody/tr[2]/td/div[2]')); @@ -811,15 +1175,21 @@ function TopCareer() { var ChangeLocationLinkText = element(by.css('.dropdown > .widgetRightControlContainer')); var ZipCodeTextBox = element(by.css('.ng-valid-maxlength:nth-child(1)')); var ApplyButton = element(by.css('tr:nth-child(1) > td > .btn')); - var DegreesHeader = element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy')); + var DegreesWidgetTitle = element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy')); + var DegreesCardHeader = element(by.css('#id > table > tbody > tr > td > div > div > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(1) > div > div > table > tbody > tr:nth-child(1) > td > div')); var DegreesRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon')); - var CertificatesHeader = element(by.css('.widget-round-corners:nth-child(6) #id > .jrnys_lead-body-copy')); + var CertificatesWidgetTitle = element(by.css('.widget-round-corners:nth-child(6) #id > .jrnys_lead-body-copy')); + var CertificatesCardHeader = element(by.css('#id > table > tbody > tr > td > div > div > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(2) > div > div > table > tbody > tr:nth-child(1) > td > div')); + var CertificatesCardSubHeader = element(by.xpath('/html/body/div[1]/div/div/div[2]/ul/li[6]/div/div[2]/div[1]/table/tbody/tr/td/div/div/div/div[1]/div[1]/div/div/table/tbody/tr[1]/td/span')); //('#id > table > tbody > tr > td > div > div > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(1) > div > div > table > tbody > tr:nth-child(1) > td > span')); var CertificatesRightScroll = element(by.css('.widget-round-corners:nth-child(6) .right:nth-child(4) > .glyphicon:nth-child(1)')); - var InstitutionsHeader = element(by.xpath('//li[7]/div/div/div[2]/div/div')); + var InstitutionsWidgetTitle = element(by.xpath('//li[7]/div/div/div[2]/div/div')); + var InstitutionsCardHeader = element(by.css('#recommendedColleges > div > div > div.item.text-center.ng-isolate-scope.active > div:nth-child(1) > div > table > tbody > tr:nth-child(1) > td')); var InstitutionsRightScroll = element(by.css('#recommendedColleges .right > .glyphicon')); - var TopResourcesHeader = element(by.css('#id > .fullHeight > .jrnys_lead-body-copy')); + var TopResourcesWidgetTitle = element(by.css('#id > .fullHeight > .jrnys_lead-body-copy')); + var TopResources3rdCardHeader = element(by.css('.item:nth-child(1) > .col-xs-4:nth-child(3) .hotTitles')); + var TopResources3rdCardSaveIcon = element(by.xpath('/html/body/div[1]/div/div/div[2]/ul/li[8]/resource-carousel/div[2]/div/table/tbody/tr/td/div[2]/div/div/div[1]/div[3]/div/resource-card/div/table/tbody/tr[3]/td/social-follow-icon/span/i')); var TopResourcesRightScroll = element(by.css('.table-height:nth-child(3) .right > .glyphicon')); - var FindOpportunitiesHeader = element(by.css('.widgetTitleContainerFindJob > .noPaddingCol')); + var FindOpportunitiesWidgetTitle = element(by.css('.widgetTitleContainerFindJob > .noPaddingCol')); var FindOpportunitiesSubText = element(by.css('.col-sm-12:nth-child(2)')); var JobTotals = element(by.css('.col-sm-4:nth-child(1) .col-sm-8 .jrnys_stand-out-text')); var JobListingsDivHeader = element(by.css('.col-xs-12 > h6:nth-child(1) > .ng-binding')); @@ -833,23 +1203,23 @@ function TopCareer() { var SubmitResourceWidgetSubTextOne = element(by.css('.row:nth-child(2) > .jrnys_body-copy:nth-child(1)')); var TotalInJourneys = element(by.css('.col-xs-offset-1 .col-xs-offset-1')); var MySubmittedResourcesLink = element(by.css('.col-xs-offset-1 > .row .jrnys_lead-body-copy')); - var MySubmittedResourcesHeader = element(by.css('.col-sm-12 > .ng-binding')); + var MySubmittedResourcesWidgetTitle = element(by.css('.col-sm-12 > .ng-binding')); var EllipsisResource = element(by.css('.glyphicon-option-vertical:nth-child(1)')); var ForThisMapPoint = element(by.css('.display-right .col-xs-offset-1')); var SubmitResourceWidgetSubTextTwo = element(by.css('.row:nth-child(4) > .col-sm-12')); var SubmitAResourceWidgetButton = element(by.css('.col-sm-12 > .jrnys_support-text')); var SubmitAResourceDivTitle = element(by.css('h3')); var SubmitAResourceDivCancelButton = element(by.css('.btn-blue-RoundTabsinfo')); - var TasksHeader = element(by.css('#tasksid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var TasksWidgetTitle = element(by.css('#tasksid > .widgetHeaderContainer > .jrnys_lead-body-copy')); var TasksRowOne = element(by.css('#tasksid .ng-scope:nth-child(1) > .no-padding:nth-child(1)')); var ImportanceStatOne = element(by.css('.ng-scope:nth-child(1) > .no-padding:nth-child(3)')); var CategoryStatOne = element(by.css('.ng-scope:nth-child(1) > .text-center:nth-child(4)')); - var TechnologyHeader = element(by.css('#technologyid > .widgetHeaderContainer > .jrnys_lead-body-copy')); - var KnowledgeHeader = element(by.css('#knowledgeid > .widgetHeaderContainer > .jrnys_lead-body-copy')); - var SkillsHeader = element(by.css('#skillsid > .widgetHeaderContainer > .jrnys_lead-body-copy')); - var WorkActivitiesHeader = element(by.css('#workActivitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy')); - var AbilityHeader = element(by.css('#abilitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy')); - var NearbyPlacesHeader = element(by.css('#nearByid > .jrnys_lead-body-copy')); + var TechnologyWidgetTitle = element(by.css('#technologyid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var KnowledgeWidgetTitle = element(by.css('#knowledgeid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var SkillsWidgetTitle = element(by.css('#skillsid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var WorkActivitiesWidgetTitle = element(by.css('#workActivitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var AbilityWidgetTitle = element(by.css('#abilitiesid > .widgetHeaderContainer > .jrnys_lead-body-copy')); + var NearbyPlacesWidgetTitle = element(by.css('#nearByid > .jrnys_lead-body-copy')); var NearbyPlacesRightScroll = element(by.css('#nearByid .right > .glyphicon')); var NearbyPlacesLeftScroll = element(by.css('#nearByid .left > .glyphicon')); //var NearbyPlacesRightScroll = element(by.xpath('//li[17]')).element(by.css('.glyphicon-chevron-right')); @@ -876,9 +1246,6 @@ function TopCareer() { browser.actions().mouseMove(FollowIcon).perform().then(function() { browser.sleep(1000); }); - browser.actions().mouseMove(FavoriteIcon).perform().then(function() { - browser.sleep(1000); - }); browser.actions().mouseMove(JourneymanIcon).perform().then(function() { browser.sleep(1000); }); @@ -898,14 +1265,14 @@ function TopCareer() { expect(await AtAGlanceStatFour.getText()).toEqual('2,500'); expect(await AtAGlanceHeaderFive.getText()).toEqual('Currently Employed'); expect(await AtAGlanceStatFive.getText()).toEqual('27,900'); - browser.actions().mouseMove(DegreesHeader).perform().then(function() { + browser.actions().mouseMove(DegreesWidgetTitle).perform().then(function() { browser.sleep(1000); }); browser.actions().mouseMove(element(by.css('.widget-round-corners:nth-child(5) #id > .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); }); //Personality - expect(await PersonalityHeader.getText()).toEqual('Personality'); + expect(await PersonalityWidgetTitle.getText()).toEqual('Personality'); expect(await PersonalityDescriptionOne.getText()).toEqual('People interested in this work like activities that include ideas, thinking, and figuring things out.'); expect(await PersonalityDescriptionTwo.getText()).toEqual('They do well at jobs that need:'); expect(await PersonalityBulletOne.getText()).toEqual('Analytical Thinking'); @@ -915,7 +1282,7 @@ function TopCareer() { expect(await PersonalityBulletFive.getText()).toEqual('Achievement/Effort'); expect(await PersonalityBulletSix.getText()).toEqual('Initiative'); //Wages - expect(await WagesHeader.getText()).toContain('Wages'); + expect(await WagesWidgetTitle.getText()).toContain('Wages'); await WagesInfoIcon.click().then(function() { browser.sleep(1000); }); @@ -925,9 +1292,9 @@ function TopCareer() { await WagesCloseBackOfCardIcon.click().then(function() { browser.sleep(1000); }); - expect(await WagesHeader.getText()).toContain('Change Location'); + expect(await WagesWidgetTitle.getText()).toContain('Change Location'); expect(await CurrentDataNationalHeader.getText()).toEqual('National'); - expect(await CurrentDataLocalHeader.getText()).toEqual('San Diego-Carlsbad, CA'); + expect(await CurrentDataLocalHeader.getText()).toContain('San Diego-Carlsbad-San Marcos, CA'); expect(await WagesHighText.getText()).toEqual('High'); expect(await WagesMedianText.getText()).toEqual('Median'); expect(await WagesLowText.getText()).toEqual('Low'); @@ -948,44 +1315,51 @@ function TopCareer() { browser.sleep(2500); }); expect(await CurrentDataNationalHeader.getText()).toEqual('National'); - expect(await CurrentDataLocalHeader.getText()).toEqual('Phoenix-Mesa-Scottsdale, AZ'); - browser.actions().mouseMove(CertificatesHeader).perform().then(function() { + expect(await CurrentDataLocalHeader.getText()).toContain('Phoenix-Mesa-Scottsdale, AZ'); + browser.actions().mouseMove(CertificatesWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Degrees - expect(await DegreesHeader.getText()).toEqual('Degrees'); + expect(await DegreesWidgetTitle.getText()).toEqual('Degrees'); + expect(await DegreesCardHeader.getText()).toEqual('Computer Applications Minor—College-Wide'); await DegreesRightScroll.click(); browser.sleep(1000); - browser.actions().mouseMove(InstitutionsHeader).perform().then(function() { + browser.actions().mouseMove(InstitutionsWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Certificates - expect(await CertificatesHeader.getText()).toEqual('Certificates'); + expect(await CertificatesWidgetTitle.getText()).toEqual('Certificates'); + expect(await CertificatesCardHeader.getText()).toEqual('Certified Associate LabVIEW Developer'); + expect(await CertificatesCardSubHeader.getText()).toEqual('Business Analysis'); await CertificatesRightScroll.click(); browser.sleep(1000); - browser.actions().mouseMove(TopResourcesHeader).perform().then(function() { + browser.actions().mouseMove(TopResourcesWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Institutions - expect(await InstitutionsHeader.getText()).toEqual('Institutions View All'); + expect(await InstitutionsWidgetTitle.getText()).toEqual('Institutions View All'); + expect(await InstitutionsCardHeader.getText()).toEqual('University of San Diego'); await InstitutionsRightScroll.click(); - browser.actions().mouseMove(FindOpportunitiesHeader).perform().then(function() { + browser.actions().mouseMove(FindOpportunitiesWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Top Resources - expect(await TopResourcesHeader.getText()).toEqual('Top Resources View All'); + expect(await TopResourcesWidgetTitle.getText()).toEqual('Top Resources View All'); + expect(await TopResources3rdCardHeader.getText()).toEqual('Computer and Information Research Scientists'); + await TopResources3rdCardSaveIcon.click(); + browser.sleep(2500); await TopResourcesRightScroll.click(); browser.sleep(1000); - browser.actions().mouseMove(TasksHeader).perform().then(function() { + browser.actions().mouseMove(TasksWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Find Opportunities - expect(await FindOpportunitiesHeader.getText()).toEqual('Find Opportunities'); + expect(await FindOpportunitiesWidgetTitle.getText()).toEqual('Find Opportunities'); expect(await FindOpportunitiesSubText.getText()).toEqual('Great News! We found lots of opportunities within a 50 mile radius of you.'); expect(await Totals.getText()).toContain('Jobs'); //expect(await Totals.getText()).toContain('85');//stored value needed expect(await Totals.getText()).toContain('Internships'); - expect(await Totals.getText()).toContain('0'); + //expect(await Totals.getText()).toContain('0');//stored value needed expect(await Totals.getText()).toContain('Apprenticeships'); expect(await Totals.getText()).toContain('0'); await ChangeLocationLink.click().then(function() { @@ -1012,7 +1386,7 @@ function TopCareer() { expect(await Totals.getText()).toContain('Jobs'); //expect(await Totals.getText()).toContain('68');//stored value needed expect(await Totals.getText()).toContain('Internships'); - expect(await Totals.getText()).toContain('0'); + //expect(await Totals.getText()).toContain('0');//stored value needed expect(await Totals.getText()).toContain('Apprenticeships'); expect(await Totals.getText()).toContain('0'); //Submit A Resource @@ -1023,7 +1397,7 @@ function TopCareer() { await MySubmittedResourcesLink.click().then(function() { browser.sleep(1000); }); - expect(await MySubmittedResourcesHeader.getText()).toContain('My Submitted Resources'); + expect(await MySubmittedResourcesWidgetTitle.getText()).toContain('My Submitted Resources'); await EllipsisResource.click().then(function() { browser.sleep(1000); }); @@ -1040,37 +1414,37 @@ function TopCareer() { await SubmitAResourceDivCancelButton.click().then(function() { browser.sleep(1000); }); - browser.actions().mouseMove(KnowledgeHeader).perform().then(function() { + browser.actions().mouseMove(KnowledgeWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Tasks - expect(await TasksHeader.getText()).toEqual('Tasks View All'); + expect(await TasksWidgetTitle.getText()).toEqual('Tasks View All'); expect(await TasksRowOne.getText()).toEqual('Analyze problems to develop solutions in...'); expect(await ImportanceStatOne.getText()).toEqual('82%'); expect(await CategoryStatOne.getText()).toEqual('Core'); //Technology - expect(await TechnologyHeader.getText()).toEqual('Technology View All'); + expect(await TechnologyWidgetTitle.getText()).toEqual('Technology View All'); browser.sleep(1000); - browser.actions().mouseMove(WorkActivitiesHeader).perform().then(function() { + browser.actions().mouseMove(WorkActivitiesWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Knowledge - expect(await KnowledgeHeader.getText()).toEqual('Knowledge View All'); + expect(await KnowledgeWidgetTitle.getText()).toEqual('Knowledge View All'); //Skills - expect(await SkillsHeader.getText()).toEqual('Skills View All'); + expect(await SkillsWidgetTitle.getText()).toEqual('Skills View All'); browser.sleep(1000); - browser.actions().mouseMove(NearbyPlacesHeader).perform().then(function() { + browser.actions().mouseMove(NearbyPlacesWidgetTitle).perform().then(function() { browser.sleep(1000); }); //Work Activities - expect(await WorkActivitiesHeader.getText()).toEqual('Work Activities View All'); + expect(await WorkActivitiesWidgetTitle.getText()).toEqual('Work Activities View All'); //Ability - expect(await AbilityHeader.getText()).toEqual('Ability View All'); + expect(await AbilityWidgetTitle.getText()).toEqual('Ability View All'); //Nearby Places browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() { browser.sleep(1000); }); - expect(await NearbyPlacesHeader.getText()).toEqual('Nearby Places'); + expect(await NearbyPlacesWidgetTitle.getText()).toEqual('Nearby Places'); await NearbyPlacesRightScroll.click(); browser.sleep(2500); await NearbyPlacesLeftScroll.click(); @@ -1081,9 +1455,9 @@ function TopCareer() { } function NearbyPlacesOccupationCard() { - it('should click the interact with Occupation Card', async function () { + it('should interact with Occupation cards on Nearby Places widget in Learn More page, then navigate to Following page an unfollow occupation', async function () { var OccupationCardTitle = element(by.xpath('//territory-card/div/div/div[3]/div/div[2]/span')); - var OccupatonCardFollow = element(by.xpath('//div[3]/div/div/territory-card-social/div/social-interaction-icon/span/i')); + var OccupatonCardFollow = element(by.xpath('//div[3]/div/div/territory-card-social/div/social-follow-icon/span/i')); var AtAGlanceHeaderRowIcon = element(by.xpath('//territory-card/div/div/div/div/div/div[2]')); var AtAGlanceBackOfCardTitle = element(by.xpath('//territory-card/div/div[2]/div/div')); var AtAGlanceBackOfCardDescription = element(by.xpath('//territory-card-at-a-glance-back/div/div/div/div')); @@ -1122,9 +1496,16 @@ function NearbyPlacesOccupationCard() { var VideoTitle = element(by.css('.modal-content > .ng-scope > div > .ng-binding')); var XCloseVideoDivLink = element(by.css('.close:nth-child(2)')); var FollowingLink = element(by.css('.col-md-3:nth-child(4) .jrnys_stand-out-text')); + var ConnectionsTab = element(by.css('.col-md-4 > .row-follow-type > .col-xs-4:nth-child(1)')); + var DivTitle = element(by.css('.default-color2 > h3')); + var DivSubText = element(by.css('.col-lg-12:nth-child(1)')); + var DivGotItButton = element(by.css('.row > .btn')); + var FollowersTab = element(by.css('.col-md-4 > .row-follow-type > .col-xs-4:nth-child(2)')); + var DivCloseLlink = element(by.css('.glyphicon-remove')); + var FollowingTab = element(by.css('.col-md-4 > .row-follow-type > .col-selected')); var FollowingTitle = element(by.css('.card-last-col:nth-child(1) .title:nth-child(3)')); var FollowingPathway = element(by.css('.card-last-col:nth-child(1) .subtitle:nth-child(4)')); - var FollowingUnfollowIcon = element(by.css('#viewTemp > div > div > div:nth-child(3) > div > div > follow > div:nth-child(2) > div.row.hidden-sm.hidden-xs.ng-scope > div > div > div:nth-child(2) > div > div:nth-child(4) > span > span > div > div > div:nth-child(1) > table > tbody > tr:nth-child(4) > td > div:nth-child(1) > div > i.journey-follow-selected')); + var FollowingUnfollowIcon = element(by.css('#viewTemp > div > div > div:nth-child(3) > div > div > following > div:nth-child(2) > div.row.hidden-sm.hidden-xs.ng-scope > div > div > div:nth-child(2) > div > div:nth-child(4) > section > section > div > div > div:nth-child(1) > table > tbody > tr:nth-child(4) > td > div:nth-child(1) > div > span:nth-child(2) > social-follow-icon > span > i')); var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); expect(await OccupationCardTitle.getText()).toEqual('Software Developers, Applications'); @@ -1226,9 +1607,25 @@ function NearbyPlacesOccupationCard() { await DashboardHeaderLink.click().then(function() { browser.sleep(15000); }); + //Following Page await FollowingLink.click().then(function() { browser.sleep(5000); }); + await ConnectionsTab.click().then(function() { + browser.sleep(1000); + }); + expect(await DivTitle.getText()).toEqual('This feature is on its way!'); + expect(await DivSubText.getText()).toEqual("Love Journeys? Then you'll love what is coming next."); + await DivGotItButton.click().then(function() { + browser.sleep(1000); + }); + await FollowersTab.click().then(function() { + browser.sleep(1000); + }); + await DivCloseLlink.click().then(function() { + browser.sleep(1000); + }); + expect(await FollowingTab.getText()).toEqual('Following'); expect(await FollowingTitle.getText()).toEqual('Software Developers, Applications'); expect(await FollowingPathway.getText()).toEqual('Information Technology'); await FollowingUnfollowIcon.click().then(function() { @@ -1260,7 +1657,7 @@ function AtAGlance() { var XCloseLink = element(by.css('.close')); browser.actions().mouseMove(element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); await AtAGlanceLink.click().then(function() { browser.sleep(1000); @@ -1303,7 +1700,7 @@ function Personality() { var XCloseLink = element(by.css('.close')); await PersonatlityLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Personality'); expect(await WidgetDescriptionOne.getText()).toEqual('People interested in this work like activities that include ideas, thinking, and figuring things out.'); @@ -1325,17 +1722,17 @@ function Personality() { function Wages() { it('should click the Wages link and change State drop down to Nevada', async function () { var WagesLink = element(by.css('tr:nth-child(5) > td:nth-child(1) > .text-color-7a')); - var CurrentDataNational = element(by.css('g:nth-child(2) > g:nth-child(2) > text')); + var CurrentDataNational = element(by.css('g:nth-child(2) > g > text')); var CurrentDataLocal = element(by.css('g:nth-child(3) > g > text')); var XCloseLink = element(by.css('.close')); var ChangeLocationLink = element(by.css('.dropdown > .widgetRightControlContainer')); var ApplyButton = element(by.css('tr:nth-child(2) .btn-xs')); await WagesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await CurrentDataNational.getText()).toEqual('National'); - expect(await CurrentDataLocal.getText()).toEqual('San Diego-Carlsbad, CA'); + expect(await CurrentDataLocal.getText()).toContain('San Diego-Carlsbad, CA'); await ChangeLocationLink.click().then(function() { browser.sleep(1000); }); @@ -1359,17 +1756,35 @@ function Degrees() { it('should click the Degrees link, expand/collapse first career card by title', async function () { var DegreesLink = element(by.css('tr:nth-child(3) > td:nth-child(2) > .text-color-7a')); var WidgetTitle = element(by.css('#id > .jrnys_lead-body-copy')); + var DegreeTitle = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .textSize:nth-child(1)')); var ExpandDegreeCard = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .textSize')); + var InstitutionTitle = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(2) .item-title')); + var InstitutionData = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(2) .item-body > .ng-binding')); + var CourseTitle = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(3) .item-title')); + var CourseData = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(3) .item-body > .ng-binding')); + var OccupationTitle = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(4) .item-title')); + var OccupationData = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(4) .item-body > .ng-binding')); + var SalaryTitle = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(5) .item-title')); + var SalaryData = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .row:nth-child(5) .item-body > .ng-binding')); var CollapseDegreeCard = element(by.css('#dropDownDataComputerApplicationsMinorCollegeWideDegreesundefined > .col-xs-1')); var CarrouselRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon')); var XCloseLink = element(by.css('.close')); await DegreesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Degrees'); + expect(await DegreeTitle.getText()).toEqual('Computer Applications Minor—College-Wide'); await ExpandDegreeCard.click(); browser.sleep(1000); + expect(await InstitutionTitle.getText()).toEqual('Institutions'); + expect(await InstitutionData.getText()).toEqual('2,431'); + expect(await CourseTitle.getText()).toEqual('Courses'); + expect(await CourseData.getText()).toEqual('0'); + expect(await OccupationTitle.getText()).toEqual('Occupations'); + expect(await OccupationData.getText()).toEqual('75'); + expect(await SalaryTitle.getText()).toEqual('Average Salary'); + expect(await SalaryData.getText()).toEqual('$98,931'); await CollapseDegreeCard.click(); browser.sleep(1000); await CarrouselRightScroll.click(); @@ -1386,16 +1801,42 @@ function Certificates() { it('should click the Certificate link, expand/collapse first card by ellipsis and scroll to second set', async function () { var CertificatesLink = element(by.css('tr:nth-child(4) > td:nth-child(2) > .text-color-7a')); var WidgetTitle = element(by.css('#id > .jrnys_lead-body-copy')); - var EllipsisCertificate = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(2) .col-sm-1')); + var CertificateTitle = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .textSize:nth-child(1)')); + var CertificateSubTitle = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .row .text-color-4a')); + var EllipsisCertificate = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(1) .col-sm-1')); + var CertificateDetailsIcon = element(by.css('#dropDownSocialOptionsCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 .row:nth-child(4) > .col-xs-9')); + var EducationTitle = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(2) .item-title')); + var EducationData = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(2) .item-body > .ng-binding')); + var WorkExperienceTitle = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(3) .item-title')); + var WorkExperienceData = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(3) .item-body > .ng-binding')); + var ExamTitle = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(4) .item-title')); + var ExamData = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(4) .item-body > .ng-binding')); + var RenewalTitle = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(5) .item-title')); + var RenewalData = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .row:nth-child(5) .item-body > .ng-binding')); + var CertificateXCloseIcon = element(by.css('#dropDownDataCertifiedAssociateLabVIEWDeveloperCertificates06943e36d76a4fcc9e67780aff668435 > .col-xs-1')) var CarrouselRightScroll = element(by.css('.table-height:nth-child(2) .right > .glyphicon')); var XCloseLink = element(by.css('.close')); await CertificatesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Certificates'); + expect(await CertificateTitle.getText()).toEqual('Certified Associate LabVIEW Developer'); + expect(await CertificateSubTitle.getText()).toEqual('Business Analysis'); await EllipsisCertificate.click(); browser.sleep(1000); + await CertificateDetailsIcon.click(); + browser.sleep(1000); + expect(await EducationTitle.getText()).toEqual('Education and Training Required'); + expect(await EducationData.getText()).toEqual('No'); + expect(await WorkExperienceTitle.getText()).toEqual('Work Experience Required'); + expect(await WorkExperienceData.getText()).toEqual('No'); + expect(await ExamTitle.getText()).toEqual('Oral or Written Exam Required'); + expect(await ExamData.getText()).toEqual('Yes'); + expect(await RenewalTitle.getText()).toEqual('Renewal Required'); + expect(await RenewalData.getText()).toEqual('No'); + await CertificateXCloseIcon.click(); + browser.sleep(1000); await EllipsisCertificate.click(); browser.sleep(1000); await CarrouselRightScroll.click(); @@ -1412,31 +1853,57 @@ function Institutions() { it('should click the Institutions link, navigate to next set, expand by ellipsis, favorite second card, collapse by ellipsis, then scroll back to first set', async function () { var InstitutionsLink = element(by.css('tr:nth-child(5) > td:nth-child(2) > .text-color-7a')); var WidgetTitle = element(by.xpath('//recommended-colleges/div/div[2]/div/div')); - var EllipsisInstitutions = element(by.css('.item:nth-child(2) > .col-xs-12:nth-child(2) .col-sm-1')); - var InstitutionFavoriteButton = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-favorite')); - var InstitutionDetailsButton = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-info')); - var InstitutionDetailsXCloseLink = element(by.css('#dropDownDataInstitutions_1_1 > .col-xs-1')); - var InstitutionFollowButton = element(by.css('.social-panel-spacing > .journey-follow-selected')); var CarrouselRightScroll = element(by.css('#recommendedColleges .right > .glyphicon')); + var SchoolNameTitle = element(by.css('.item:nth-child(2) > .col-xs-12:nth-child(2) .textSize')); + var EllipsisInstitutions = element(by.css('.item:nth-child(2) > .col-xs-12:nth-child(2) .col-sm-1')); + var InstitutionFollowIcon = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-follow')); + var InstitutionDetailsIcon = element(by.css('#dropDownSocialOptionsInstitutions_1_1 .journey-info')); + var UndergraduateTitle = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(2) .item-title')); + var UndergraduateData = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(2) .ng-binding > span')); + var NotRated = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(2) .item-body div')); + var TuitionTitle = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(3) .item-title')); + var TuitionData = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(3) .ng-binding > span')); + var TuitionAverage = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(3) .item-body div')); + var GraduateTitle = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(4) .item-title')); + var GraduateData = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(4) .ng-binding > span')); + var GraduateAverage = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(4) .item-body div')); + var EarningsTitle = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(5) .item-title')); + var EarningsData = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(5) .ng-binding > span')); + var EarningsAverage = element(by.css('#dropDownDataInstitutions_1_1 > .row:nth-child(5) .item-body div')); + var InstitutionDetailsXCloseLink = element(by.css('#dropDownDataInstitutions_1_1 > .col-xs-1')); + var InstitutionUnFollowIcon = element(by.css('.col-xs-2 .journey-follow-selected')); var CarrouselLeftScroll = element(by.css('#recommendedColleges .left > .glyphicon')); var XCloseLink = element(by.css('.close')); await InstitutionsLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Institutions'); await CarrouselRightScroll.click(); browser.sleep(1000); + expect(await SchoolNameTitle.getText()).toEqual('San Diego State University'); await EllipsisInstitutions.click(); browser.sleep(1000); - await InstitutionFavoriteButton.click(); + await InstitutionFollowIcon.click(); browser.sleep(1000); - await InstitutionDetailsButton.click(); - browser.sleep(1000); - await InstitutionFollowButton.click(); + await InstitutionDetailsIcon.click(); browser.sleep(1000); + expect(await UndergraduateTitle.getText()).toEqual('Undergraduate Students'); + expect(await UndergraduateData.getText()).toEqual('29,781'); + expect(await NotRated.getText()).toEqual('Not Rated'); + expect(await TuitionTitle.getText()).toEqual('Tuition'); + expect(await TuitionData.getText()).toEqual('$14,030'); + expect(await TuitionAverage.getText()).toEqual('Lower Than Average'); + expect(await GraduateTitle.getText()).toEqual('Graduation Rate'); + expect(await GraduateData.getText()).toEqual('74%'); + expect(await GraduateAverage.getText()).toEqual('Above Average'); + expect(await EarningsTitle.getText()).toEqual('Earnings After School'); + expect(await EarningsData.getText()).toEqual('$51,000'); + expect(await EarningsAverage.getText()).toEqual('Above Average'); await InstitutionDetailsXCloseLink.click(); browser.sleep(1000); + await InstitutionUnFollowIcon.click(); + browser.sleep(1000); await EllipsisInstitutions.click(); browser.sleep(1000); await CarrouselLeftScroll.click(); @@ -1454,15 +1921,18 @@ function TopResources() { var TopResourcesLink = element(by.css('tr:nth-child(3) > td:nth-child(3) > .text-color-7a')); var ExpandFourthResourceCard = element(by.css('.panel:nth-child(4) .ng-binding')); var ExpandFirstResourceCard = element(by.css('.panel:nth-child(1) .ng-binding')); + var FollowFirstResourceCard = element(by.css('#pageBody > div.modal.fade.ng-isolate-scope.in > div > div > div > div.color-card-background.widget-padding > accordion > div > div:nth-child(1) > div.panel-collapse.in > div > resource-card > div > div > div > div:nth-child(1) > a > social-follow-icon > span > i')); var XCloseLink = element(by.css('.close')); await TopResourcesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); await ExpandFourthResourceCard.click(); browser.sleep(1000); await ExpandFirstResourceCard.click(); browser.sleep(1000); + await FollowFirstResourceCard.click(); + browser.sleep(2500); await XCloseLink.click().then(function() { browser.sleep(1000); }); @@ -1478,9 +1948,9 @@ function FindOpportunities() { var XCloseLink = element(by.css('.close')); await FindOpportunitiesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); - expect(await WidgetTitle.getText()).toContain('Job Listings: 88');//stored value needed + expect(await WidgetTitle.getText()).toContain('Job Listings: 87');//stored value needed browser.waitForAngular(); await XCloseLink.click().then(function() { browser.sleep(1000); @@ -1501,7 +1971,7 @@ function SubmitAResource() { var XCloseLink = element(by.css('.close')); await SubmitAResourceLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Submit a Resource'); browser.waitForAngular(); @@ -1525,32 +1995,55 @@ function SubmitAResource() { function NearbyPlaces() { it('should click Nearby Places link, expand 3rd card and play video', async function () { var NearbyPlacesLink = element(by.css('tr:nth-child(3) > td:nth-child(4) > .text-color-7a')); - var WidgetTitle = element(by.css('#nearByid > .jrnys_lead-body-copy')); + var NearbyPlcaesWidgetTitle = element(by.css('#nearByid > .jrnys_lead-body-copy')); + var NearbyPlacesTitle = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(3) .textSize:nth-child(1)')); + var NearbyPlacesSubTitle = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(3) .row .text-color-4a')); var EllipsisNearyByPlaces = element(by.css('.item:nth-child(1) > .col-xs-12:nth-child(3) .col-sm-1')); - var DetailsButton = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .row:nth-child(6) > .col-xs-9')); - var VideoButton = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .far')); + var DegreeTitle = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(2) .item-title')); + var VideoIcon = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .far')); var VideoTitle = element(by.css('.modal-content > .ng-scope > div > .ng-binding')); var XCloseVideoDivLink = element(by.css('.close:nth-child(2)')); + var DetailsIcon = element(by.css('#dropDownSocialOptionsComputerandInformationResearchScientistsNearbyPlacesundefined .row:nth-child(5) > .col-xs-9')); + var DegreeTitle = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(2) .item-title')); + var DegreeData = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(2) .item-body > .ng-binding')); + var SalaryTitle = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(3) .item-title')); + var SalaryData = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(3) .item-body > .ng-binding')); + var EmployedTitle = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(4) .item-title')); + var EmployedData = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(4) .item-body > .ng-binding')); + var GrowthTitle = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(5) .item-title')); + var GrowthData = element(by.css('#dropDownDataComputerandInformationResearchScientistsNearbyPlacesundefined > .row:nth-child(5) .item-body > .ng-binding')); var XCloseLink = element(by.css('.close')); browser.actions().mouseMove(element(by.css('#id > .ng-scope > .jrnys_lead-body-copy'))).perform().then(function() { - browser.sleep(1000); + browser.sleep(2500); + }); + await NearbyPlacesLink.click().then(function() { + browser.sleep(2500); }); - await NearbyPlacesLink.click(); browser.waitForAngular(); - expect(await WidgetTitle.getText()).toEqual('Nearby Places'); + expect(await NearbyPlcaesWidgetTitle.getText()).toEqual('Nearby Places'); browser.waitForAngular(); + expect(await NearbyPlacesTitle.getText()).toEqual('Computer and Information Research Scientists'); + expect(await NearbyPlacesSubTitle.getText()).toEqual('Network Systems'); await EllipsisNearyByPlaces.click(); browser.sleep(2500); - await DetailsButton.click(); - browser.sleep(2500); - await VideoButton.click().then(function() { + await VideoIcon.click().then(function() { browser.sleep(15000); }); expect(await VideoTitle.getText()).toEqual('Computer and Information Research Scientists'); await XCloseVideoDivLink.click().then(function() { browser.sleep(1000); }); + await DetailsIcon.click(); + browser.sleep(2500); + expect(await DegreeTitle.getText()).toEqual('Degree Required'); + expect(await DegreeData.getText()).toEqual('Master Degree - 59%'); + expect(await SalaryTitle.getText()).toEqual('Average Annual Salary'); + expect(await SalaryData.getText()).toEqual('$114,520'); + expect(await EmployedTitle.getText()).toEqual('Currently Employed'); + expect(await EmployedData.getText()).toEqual('27,900'); + expect(await GrowthTitle.getText()).toEqual('Projected Growth'); + expect(await GrowthData.getText()).toEqual('19.2%'); browser.waitForAngular(); await XCloseLink.click().then(function() { browser.sleep(1000); @@ -1566,7 +2059,7 @@ function Tasks() { var WidgetTitle = element(by.css('h6 > .ng-binding')); var ImportanceHeader = element(by.css('th:nth-child(2) > .text-color-7a')); var CategoryHeader = element(by.css('th:nth-child(3) > .text-color-7a')); - var TasksRowOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); + var TasksRowOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); var ImportanceStatOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a:nth-child(2)')); var CategoryStatOne = element(by.css('.ng-scope:nth-child(1) > .text-center:nth-child(3)')); var TasksRowTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); @@ -1614,7 +2107,7 @@ function Tasks() { var XCloseLink = element(by.css('.close')); await TasksLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Tasks'); expect(await ImportanceHeader.getText()).toEqual('Importance'); @@ -1677,7 +2170,7 @@ function Technology() { it('should click Technology link', async function () { var TechnologyLink = element(by.css('tr:nth-child(5) > td:nth-child(4) > .text-color-7a')); var WidgetTitle = element(by.css('h6 > .ng-binding')); - var TechnologyTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding')); + var TechnologyTitleOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding')); var TechnologyDataOne = element(by.css('.ng-scope:nth-child(1) > .text-left > .ng-binding:nth-child(1)')); var TechnologyTitleTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); var TechnologyDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-left > .ng-binding:nth-child(1)')); @@ -1746,7 +2239,7 @@ function Technology() { var XCloseLink = element(by.css('.close')); await TechnologyLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Technology'); expect(await TechnologyTitleOne.getText()).toEqual('Development environment software'); @@ -1825,11 +2318,11 @@ function Technology() { } function Knowledge() { - it('should click Technology link', async function () { + it('should click Knowledge link', async function () { var KnowledgeLink = element(by.css('tr:nth-child(3) > td:nth-child(5) > .text-color-7a')); var WidgetTitle = element(by.css('h6 > .ng-binding')); var ImportanceHeader = element(by.css('.text-right > .text-color-7a')); - var KnowledgeTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); + var KnowledgeTitleOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); var KnowledgeDataOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a')); var KnowledgeTitleTwo = element(by.css('tbody > .ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); var KnowledgeDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-color-7a:nth-child(2)')); @@ -1854,7 +2347,7 @@ function Knowledge() { var XCloseLink = element(by.css('.close')); await KnowledgeLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Knowledge'); expect(await ImportanceHeader.getText()).toEqual('Importance'); @@ -1894,7 +2387,7 @@ function Skills() { var SkillsLink = element(by.css('tr:nth-child(4) > td:nth-child(5) > .text-color-7a')); var WidgetTitle = element(by.css('h6 > .ng-binding')); var ImportanceHeader = element(by.css('.text-right > .text-color-7a')); - var SkillsTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); + var SkillsTitleOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); var SkillsDataOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a')); var SkillsTitleTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); var SkillsDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-color-7a:nth-child(2)')); @@ -1935,7 +2428,7 @@ function Skills() { var XCloseLink = element(by.css('.close')); await SkillsLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Skills'); expect(await ImportanceHeader.getText()).toEqual('Importance'); @@ -1991,7 +2484,7 @@ function WorkActivities() { var WorkActivitiesLink = element(by.css('tr:nth-child(5) > td:nth-child(5) > .text-color-7a')); var WidgetTitle = element(by.css('h6 > .ng-binding')); var ImportanceHeader = element(by.css('.text-right > .text-color-7a')); - var WorkActivitiesTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); + var WorkActivitiesTitleOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); var WorkActivitiesDataOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a')); var WorkActivitiesTitleTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); var WorkActivitiesDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-color-7a:nth-child(2)')); @@ -2040,7 +2533,7 @@ function WorkActivities() { var XCloseLink = element(by.css('.close')); await WorkActivitiesLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Work Activities'); expect(await ImportanceHeader.getText()).toEqual('Importance'); @@ -2104,7 +2597,7 @@ function Ability() { var AbilityLink = element(by.css('td:nth-child(6) > .text-color-7a')); var WidgetTitle = element(by.css('h6 > .ng-binding')); var ImportanceHeader = element(by.css('.text-right > .text-color-7a')); - var AbilityTitleOne = element(by.css('tbody > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); + var AbilityTitleOne = element(by.css('tbody:nth-child(2) > .ng-scope:nth-child(1) > .ng-binding:nth-child(1)')); var AbilityDataOne = element(by.css('.ng-scope:nth-child(1) > .text-color-7a')); var AbilityTitleTwo = element(by.css('.ng-scope:nth-child(2) > .ng-binding:nth-child(1)')); var AbilityDataTwo = element(by.css('.ng-scope:nth-child(2) > .text-color-7a:nth-child(2)')); @@ -2143,7 +2636,7 @@ function Ability() { var XCloseLink = element(by.css('.close')); await AbilityLink.click().then(function() { - browser.sleep(1000); + browser.sleep(2500); }); expect(await WidgetTitle.getText()).toEqual('Ability'); expect(await ImportanceHeader.getText()).toEqual('Importance'); @@ -2195,16 +2688,21 @@ function Ability() { function MyResources() { it('should click My Resources View All link, expand and collapse resource', async function () { var WidgetTitle = element(by.css('#id > .ng-scope > .jrnys_lead-body-copy')); + var TopResources1stCardHeader = element(by.css('.col-xs-4:nth-child(1) tr:nth-child(2) > .hotTitles')); + var TopResources1stCardSaveIcon = element(by.css('.col-xs-4:nth-child(1) .journey-save:nth-child(1)')); var ViewAllLink = element(by.css('#id > .ng-scope .text-color-7a')); var WidgetDivTitle = element(by.css('.col-sm-12 > .ng-binding')); var MyResourceTitle = element(by.css('.col-xs-9 > .ng-binding')); var EllipsisMyResources = element(by.css('.glyphicon-option-vertical')); var XCloseLink = element(by.css('.close')); - browser.actions().mouseMove(element(by.css('#myInstitutionsFull #id .jrnys_lead-body-copy'))).perform().then(function() { + browser.actions().mouseMove(element(by.css('#myInstitutionsCollapsed #id .jrnys_lead-body-copy'))).perform().then(function() { browser.sleep(1000); }); expect(await WidgetTitle.getText()).toEqual('My Resources View All'); + expect(await TopResources1stCardHeader.getText()).toEqual('Computer and Information Research Scientists'); + await TopResources1stCardSaveIcon.click(); + browser.sleep(2500); await ViewAllLink.click(); browser.waitForAngular(); browser.getCurrentUrl(); @@ -2224,19 +2722,19 @@ function MyResources() { function Instititions() { it('should click Institution View All link', async function () { - var WidgetTitle = element(by.css('#myInstitutionsFull #id .jrnys_lead-body-copy')); - var ViewAllLink = element(by.css('#myInstitutionsFull .text-color-7a')); - var PageTitle = element(by.css('.panel-with-page > .row > b')); + var WidgetTitle = element(by.css('#myInstitutionsCollapsed #id .jrnys_lead-body-copy')); + var ViewAllLink = element(by.css('#myInstitutionsCollapsed .text-color-7a')); + var EditSearchWidgetTitle = element(by.css('.panel-with-page > .row > b')); var BackLink = element(by.css('.btn-primary-back-mod')); - browser.actions().mouseMove(element(by.css('#recommendedCareersFull .fullHeight .jrnys_lead-body-copy'))).perform().then(function() { + browser.actions().mouseMove(element(by.css('#myjourneys > .jrnys_lead-body-copy > span:nth-child(1)'))).perform().then(function() { browser.sleep(1000); }); expect(await WidgetTitle.getText()).toEqual('Institutions View All'); await ViewAllLink.click(); browser.waitForAngular(); browser.getCurrentUrl(); - expect(await PageTitle.getText()).toEqual('Edit Search'); + expect(await EditSearchWidgetTitle.getText()).toEqual('Edit Search'); browser.sleep(2500); browser.executeScript('window.scrollTo(0, 0);').then(function() { browser.sleep(1000); @@ -2247,134 +2745,8 @@ function Instititions() { }); } -function MyRecommendedCareers() { - it('should cycle through Recommended Careers carousel and click the View More link', async function () { - var WidgetTitle = element(by.css('#recommendedCareersFull .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 FollowFirstOccupationCard = element(by.xpath('//div[3]/div/div/territory-card-social/div/social-interaction-icon/span/i')); - var FilterIcon = element(by.css('.widgetControlContainer')); - var FilterTitle = element(by.css('tr:nth-child(1) > .ng-binding')); - var RequiredJobPrepHeader = element(by.css('#recommendedCareerFilter tr:nth-child(2) > td')); - var MayRequireHighSchoolDiplomaOrGED = element(by.css('tr:nth-child(3) .ng-pristine')); - var FitHeader = element(by.css('#recommendedCareerFilter tr:nth-child(9) > td')); - var Best = element(by.css('.ng-scope:nth-child(10) > td > input')); - var Good = element(by.css('.ng-scope:nth-child(12) > td > input')); - var ShowResultsByHeader = element(by.css('#recommendedCareerFilter tr:nth-child(13) > td')); - var BrightOutlook = element(by.css('tr:nth-child(14) .ng-pristine')); - var Following = element(by.css('tr:nth-child(17) .ng-pristine')); - var MyFavorites = element(by.css('tr:nth-child(18) .ng-pristine')); - var SortHeader = element(by.css('#recommendedCareerFilter tr:nth-child(20) > td')); - var ZtoA = element(by.css('tr:nth-child(22) .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 ZtoAFilterButton = element(by.css('.statusBtn:nth-child(4) > .xIcon')); - var ShowResultsByFilterButton = element(by.css('.statusBtn:nth-child(3) > .xIcon')); - var FitFilterButton = element(by.css('.statusBtn:nth-child(2) > .xIcon')); - var RequiredJobPrepFilterButton = element(by.css('.xIcon')); - - expect(await WidgetTitle.getText()).toEqual('My Recommended Careers View All'); - browser.actions().mouseMove(element(by.linkText('View Results'))).perform().then(function() { - browser.sleep(1000); - }); - await CarrouselRightScroll.click(); - browser.sleep(1000); - await CarrouselRightScroll.click(); - browser.sleep(1000); - await CarrouselRightScroll.click(); - browser.sleep(1000); - await CarrouselRightScroll.click(); - browser.sleep(1000); - await ViewMoreLink.click(); - browser.sleep(2500); - expect(await PageTitle.getText()).toEqual('My Recommended Careers'); - await FollowFirstOccupationCard.click(); - browser.sleep(1000); - await FilterIcon.click(); - browser.sleep(1000); - expect(await FilterTitle.getText()).toEqual('Filter'); - expect(await RequiredJobPrepHeader.getText()).toEqual('Required Job Prep'); - await MayRequireHighSchoolDiplomaOrGED.click(); - browser.sleep(1000); - expect(await FitHeader.getText()).toEqual('Fit'); - await Best.click(); - browser.sleep(1000); - await Good.click(); - browser.sleep(1000); - expect(await ShowResultsByHeader.getText()).toEqual('Show Results By'); - await Following.click(); - browser.sleep(1000); - expect(await SortHeader.getText()).toEqual('Sort'); - await ZtoA.click(); - browser.sleep(1000); - await FilterButton.click(); - 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.linkText('View Results'))).perform().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 ZtoAFilterButton.click(); - browser.sleep(2500); - await ShowResultsByFilterButton.click(); - browser.sleep(2500); - await FitFilterButton.click(); - browser.sleep(2500); - await RequiredJobPrepFilterButton.click(); - browser.sleep(2500); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - -function FollowingPage() { - it('should click Following link and un-follow Occupation card', async function () { - var FollowingLink = element(by.css('.col-lg-4:nth-child(3) .jrnys_stand-out-text')); - var ConnectionsTab = element(by.css('.col-md-4 > .row-follow-type > .col-xs-4:nth-child(1)')); - var DivTitle = element(by.css('.default-color2 > h3')); - var DivSubText = element(by.css('.col-lg-12:nth-child(1)')); - var DivGotItButton = element(by.css('.row > .btn')); - var FollowersTab = element(by.css('.col-md-4 > .row-follow-type > .col-xs-4:nth-child(2)')); - var DivCloseLlink = element(by.css('.glyphicon-remove')); - var FollowingTab = element(by.css('.col-md-4 > .row-follow-type > .col-selected')); - var UnFollowOccupationCard = element(by.css('.ng-scope:nth-child(1) > span:nth-child(1) .journey-follow-selected:nth-child(2)')); - var BackLink = element(by.css('.btn-primary-back-mod')); - var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); - - browser.executeScript('window.scrollTo(0, 0);').then(function() { - browser.sleep(1000); - }); - await FollowingLink.click().then(function() { - browser.sleep(5000); - }); - await ConnectionsTab.click(); - browser.sleep(1000); - expect(await DivTitle.getText()).toEqual('This feature is on its way!'); - expect(await DivSubText.getText()).toEqual("Love Journeys? Then you'll love what is coming next."); - await DivGotItButton.click(); - browser.sleep(1000); - await FollowersTab.click(); - browser.sleep(1000); - await DivCloseLlink.click(); - browser.sleep(1000); - expect(await FollowingTab.getText()).toEqual('Following'); - await UnFollowOccupationCard.click(); - browser.sleep(2500); - await DashboardHeaderLink.click().then(function() { - browser.sleep(10000); - }); - browser.waitForAngular(); - browser.getCurrentUrl(); - }); -} - function MyJourneys() { - it('should jump to latest created journey learn more page', async function () { + it('should navigate 4th journey in My Journeys widget on dashboard and view journey', async function () { var WidgetTitle = element(by.css('#myjourneys > .jrnys_lead-body-copy > span:nth-child(1)')); var JourneySteps = element(by.css('.journeyListWidgetJourneyContainer:nth-child(4) > div')); var LearnMoreLink = element(by.css('.journeyListWidgetJourneyContainer:nth-child(4) #appendHere > .jrnys_support-text')); @@ -2388,12 +2760,12 @@ function MyJourneys() { browser.actions().mouseMove(element(by.id('journeyListWidget'))).perform(); browser.sleep(5000); expect(await WidgetTitle.getText()).toEqual('My Journeys'); - expect(await JourneySteps.getText()).toContain('10 to First-Line Supervisors of Aquacultural Workers through Sustainable Food Systems Graduate Certificate'); + expect(await JourneySteps.getText()).toContain('10 to Computer and Information Systems Managers through Computer Security Graduate Certificate'); expect(await JourneySteps.getText()).toContain('Learn More'); expect(await JourneySteps.getText()).toContain('5 steps (0 Complete)'); await LearnMoreLink.click(); browser.sleep(5000); - expect(await JourneyLearnMoreTitle.getText()).toEqual('10 to First-Line Supervisors of Aquacultural Workers through Sustainable Food Systems Graduate Certificate'); + expect(await JourneyLearnMoreTitle.getText()).toEqual('10 to Computer and Information Systems Managers through Computer Security Graduate Certificate'); expect(await JourneyWayPoint.getText()).toEqual('10'); expect(await JourneyResource.getText()).toEqual('cnn'); await RightScroll.click(); @@ -2406,20 +2778,20 @@ function MyJourneys() { expect(await JourneyResource.getText()).toEqual('cnn'); await RightScroll.click(); browser.sleep(5000); - expect(await JourneyWayPoint.getText()).toEqual('Sustainable Food Systems Graduate Certificate'); + expect(await JourneyWayPoint.getText()).toEqual('Computer Security Graduate Certificate'); expect(await JourneyNoResource.getText()).toEqual('Sorry, no related resources!'); await RightScroll.click(); browser.sleep(5000); - expect(await JourneyWayPoint.getText()).toEqual('First-Line Supervisors of Aquacultural Workers'); - expect(await JourneyResource.getText()).toEqual('First-Line Supervisors of Aquacultural Workers (Agriculture, Food and Natural Resources)'); - await BackLink.click(); + expect(await JourneyWayPoint.getText()).toEqual('Computer and Information Systems Managers'); + expect(await JourneyResource.getText()).toEqual('Computer and Information Systems Managers (Business, Management and Administration)'); + //await BackLink.click(); browser.waitForAngular(); browser.getCurrentUrl(); }); } function MyJourneysPage() { - it('should navigate to My Journeys and delete 3rd journey', async function () { + it('should navigate to My Journeys page and delete 3rd journey', async function () { var MyJourneysHeaderLink = element(by.css('#nbMyJourneys .span-navbar-hover')); var PageTitle = element(by.css('.jrnys_lead-body-copy')); var PageSubTitle = element(by.css('.col-md-10 .ng-scope:nth-child(1)')); @@ -2438,18 +2810,19 @@ function MyJourneysPage() { await expect(PageTitle.getText()).toEqual('My Saved Journeys'); expect(await PageSubTitle.getText()).toEqual('Select a Journey to show it on the map'); await Select3rdJourney.click(); + browser.sleep(5000); expect(await JourneyLearnMoreSubTitle.getText()).toEqual('Try these resources'); await ViewOnMapButton.click(); browser.sleep(20000); await MyJourneysHeaderLink.click(); await Select3rdJourney.click(); - browser.sleep(1000); + browser.sleep(5000); await RemoveJourneyButton.click(); - browser.sleep(1000); + browser.sleep(5000); expect(await RemoveDivTitle.getText()).toEqual('Are you sure?'); expect(await RemoveDivSubTitle.getText()).toEqual('You will not be able to recover this journey!'); await RemoveDivDeleteButton.click(); - browser.sleep(1000); + browser.sleep(5000); expect(await RemoveDivTitle.getText()).toEqual('Deleted!'); expect(await RemoveDivSubTitle.getText()).toEqual('Your journey has been deleted.'); await RemoveDivDeleteButton.click(); @@ -2716,11 +3089,11 @@ function SurveyMetrics() { browser.sleep(5000); expect(await SurveyMetricsTitle.getText()).toEqual('Survey Metrics View All'); expect(await MostRecentResultsTitle.getText()).toEqual('Most Recent Result'); + expect(await MostRecentResultsStat.getText()).toEqual('Enterprising, Investigative, and Conventiona'); expect(await SurveyHistoryTitle.getText()).toEqual('Survey History'); expect(await SurveyHistoryStat.getText()).toContain('Last Taken 2019'); expect(await TimesTakenTitle.getText()).toEqual('Times Taken'); expect(await NumberOfManualChangesTitle.getText()).toEqual('Number of Manual Changes'); - expect(await NumberOfManualChangesStat.getText()).toEqual('3'); await SurveyResultsViewAll.click().then(function() { browser.sleep(1000); });