diff --git a/beginCareerExplorationWidget_config.js b/beginCareerExplorationWidget_config.js new file mode 100644 index 0000000..77abad0 --- /dev/null +++ b/beginCareerExplorationWidget_config.js @@ -0,0 +1,35 @@ +//beginCareerExplorationWidget_config.js + +exports.config = { + framework: 'jasmine', + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['beginCareerExplorationWidget_spec.js'], + + jasmineNodeOpts: { + defaultTimeoutInterval: 360000 + }, + + capabilities: { + browserName: 'chrome' + }, + + onPrepare: function() { + browser.sleep(2500); + browser.driver.manage().window().maximize(); + }, + + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + + /*multiCapabilities: [{ + browserName: 'chrome' + }, { + browserName: 'firefox' + }]/*, { + browserName: 'internet explorer' + }], { + browserName: 'safari' + }]*/ +} \ No newline at end of file diff --git a/beginCareerExplorationWidget_spec.js b/beginCareerExplorationWidget_spec.js new file mode 100644 index 0000000..3ec70d4 --- /dev/null +++ b/beginCareerExplorationWidget_spec.js @@ -0,0 +1,107 @@ +//beginCareerExplorationWidget_spec.js + +describe('Begin Career Exploration Widget script', function () { + //login-journeysmap landing page + var UserNameTextBox = element(by.css('#txtU')); + var PasswordTextBox = element(by.css('#txtP')); + + //Open browser + browser.get(browser.params.login); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('Login'); + }); + + //Sign In + SignIn(UserNameTextBox, PasswordTextBox); + + it('should have a title', async function () { + await expect(browser.getTitle()).toEqual('My Dashboard'); + }); + + //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(browser.params.userName).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(); + }); + } + + //<<<>>> + //BeginCareerExplorationWidget(); + SignOut(); +}); + +function BeginCareerExplorationWidget() { + it(': BeginCareerExplorationWidget, 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')); + var CareerExplorationPageTitle = element(by.css('.col-sm-12')); + var SearchOccupationsTextBox = element(by.css('.ng-dirty')); + var SkillsFilterButton = element(by.css('div:nth-child(3) > .filter-category:nth-child(3)')); + var InterestsFilterButton = element(by.css('.filter-category:nth-child(4)')); + var WidgetText = element(by.css('.row > .jrnys_lead-body-copy')); + var WidgetSubText = element(by.css('.row > span:nth-child(2)')); + + var DashboardHeaderLink = element(by.css('.ng-scope:nth-child(1) > a > .span-navbar-hover')); + + 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); + }); + expect(await CareerExplorationPageTitle.getText()).toEqual('1'); + expect(await SkillsFilterButton.getText()).toEqual('2'); + expect(await InterestsFilterButton.getText()).toEqual('3'); + expect(await WidgetText.getText()).toEqual('4'); + expect(await WidgetSubText.getText()).toEqual('5'); + + + await DashboardHeaderLink.click().then(function() { + browser.sleep(10000); + }); + 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/createAccount_config.js b/createAccount_config.js index 6047094..ef1b969 100644 --- a/createAccount_config.js +++ b/createAccount_config.js @@ -26,8 +26,10 @@ exports.config = { }, params: { + signup: 'https://app-qa.journeysmap.com/Journey/index.html#/signup', + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + code: 'N0R7Y7RO', //QA N0R7Y7RO //PROD 0W3SNBQ7 username: 'AutomatedTest' + mm + dd + yyyy + hour + minute + '@journeysmap.com', - code: 'N0R7Y7RO', password: '3Dm!nAuto' } diff --git a/createAccount_spec.js b/createAccount_spec.js index 91417ff..2ed6720 100644 --- a/createAccount_spec.js +++ b/createAccount_spec.js @@ -1,9 +1,9 @@ //createAccount_spec.js -describe('OnBoarding script', function () { +describe('Create Account script', function () { //Open browser - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/signup'); + browser.get(browser.params.signup); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Sign up'); @@ -270,8 +270,8 @@ function Login() { 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 LoginPageSubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg:nth-child(7) > .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')); @@ -300,7 +300,7 @@ function Login() { var JourneysDashboardGreeting = element(by.css('.dropdown')); //Navigate to Login page - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); + browser.get(browser.params.login); browser.sleep(2500); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); await UsernameTextBoxOne.sendKeys('AutomatedTest332020913@edmin.com'); @@ -423,8 +423,8 @@ function LoginWithNewPassword() { 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 LoginPageSubTextOne = element(by.css('.jmLoginMsg > div:nth-child(1)')); + var LoginPageSubTextTwo = element(by.css('.jmLoginMsg > .ng-scope')); var NextButton = element(by.css('.btn')); //EDM-1748 var EC = protractor.ExpectedConditions; @@ -440,7 +440,7 @@ function LoginWithNewPassword() { var CloseVideoXIcon = element(by.css('.close')); //Navigate to Login page - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); + browser.get(browser.params.login); browser.sleep(2500); expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); await UsernameTextBox.sendKeys(browser.params.username); @@ -454,9 +454,12 @@ function LoginWithNewPassword() { }); //Security Question DIV | EDM-1748 browser.wait(EC.visibilityOf(SecurityQuestion)); + browser.sleep(1000); await SecurityQuestion.click(); + browser.sleep(1000); await SecuritySelection.click(); await SecurityAnswer.sendKeys('War Games'); + browser.sleep(1000); await SecurityQuestionSaveButton.click().then(function() { browser.sleep(5000); }); diff --git a/createJourney_config.js b/createJourney_config.js index 098abae..c85183e 100644 --- a/createJourney_config.js +++ b/createJourney_config.js @@ -18,6 +18,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/createJourney_spec.js b/createJourney_spec.js index 535c9f7..6c04bdd 100644 --- a/createJourney_spec.js +++ b/createJourney_spec.js @@ -8,10 +8,7 @@ describe('Create Journey Script', function () { 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); - }); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -28,7 +25,7 @@ describe('Create Journey Script', function () { expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + await UserNameTextBox.sendKeys(browser.params.userName).then(function() { browser.sleep(2500); }); await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { diff --git a/interestSurveyResultsWidget_config.js b/interestSurveyResultsWidget_config.js index 4c012a1..ad117eb 100644 --- a/interestSurveyResultsWidget_config.js +++ b/interestSurveyResultsWidget_config.js @@ -18,6 +18,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/interestSurveyResultsWidget_spec.js b/interestSurveyResultsWidget_spec.js index 0e6ffc0..8241b44 100644 --- a/interestSurveyResultsWidget_spec.js +++ b/interestSurveyResultsWidget_spec.js @@ -6,10 +6,7 @@ describe('Interest Survey Results Widget Script', function () { 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); - }); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -26,7 +23,7 @@ describe('Interest Survey Results Widget Script', function () { expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + await UserNameTextBox.sendKeys(browser.params.userName).then(function() { browser.sleep(2500); }); await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { @@ -150,7 +147,7 @@ function InterestSurveyResultsWidgetRetake() { await LikeItEmoji.click(); await LoveItEmoji.click(); await LoveItEmoji.click(); - await LoveItEmoji.click();//5 + await DislikeEmoji.click();//5 await LoveItEmoji.click(); await LikeItEmoji.click(); await UnsureEmoji.click(); @@ -162,7 +159,7 @@ function InterestSurveyResultsWidgetRetake() { await LoveItEmoji.click(); await DislikeEmoji.click();//15 await LoveItEmoji.click(); - await LoveItEmoji.click(); + await DislikeEmoji.click(); await LoveItEmoji.click(); await MehEmoji.click(); await DislikeEmoji.click();//20 @@ -180,8 +177,8 @@ function InterestSurveyResultsWidgetRetake() { await LikeItEmoji.click(); await LoveItEmoji.click(); await LoveItEmoji.click(); - await LoveItEmoji.click();//35 - await LoveItEmoji.click(); + await DislikeEmoji.click();//35 + await DislikeEmoji.click(); await LikeItEmoji.click(); await LikeItEmoji.click(); await LikeItEmoji.click(); @@ -190,7 +187,7 @@ function InterestSurveyResultsWidgetRetake() { await LikeItEmoji.click(); await LikeItEmoji.click(); await LoveItEmoji.click(); - await LoveItEmoji.click();//45 + await LikeItEmoji.click();//45 await DislikeEmoji.click(); await LoveItEmoji.click(); await LoveItEmoji.click(); @@ -201,7 +198,7 @@ function InterestSurveyResultsWidgetRetake() { await DislikeEmoji.click(); await LikeItEmoji.click(); await LikeItEmoji.click();//55 - await LoveItEmoji.click(); + await DislikeEmoji.click(); await LoveItEmoji.click(); await LikeItEmoji.click(); await LoveItEmoji.click(); @@ -278,7 +275,7 @@ function InterestSurveyResultsWidgetEdit() { var EC = protractor.ExpectedConditions; //Scroll down to Interest Survey Results widget - browser.executeScript('window.scrollTo(0, 612);').then(function() { + browser.executeScript('window.scrollTo(0, 610);').then(function() { browser.sleep(2500); }); await InterestEditLink.click().then(function() { @@ -387,7 +384,11 @@ function InterestSurveyResultsWidgetEdit() { function InterestSurveyResultsWidgetResults() { it(': InterestSurveyResultsWidgetResults, should verify the Interest Survey Clusters widget and jump to learn more page', async function () { var ExploreCareersButton = element(by.css('div:nth-child(2) > .btn')); - var CareerExplorationPageTitle = element(by.css('.surveyContainer > .col-xs-offset-1')); + var CareerExplorationPageTitle = element(by.css('.col-sm-12')); + var CareerExplorationSearchTextBox = element(by.css('.ng-touched')); + var SkillsFilterButtonInactive = element(by.css('.filter-category-off:nth-child(3)')); + var SkillsFilterButtonActive = element(by.css('div:nth-child(3) > .filter-category:nth-child(3)')); + var InterestsFilterButton = element(by.css('.filter-category:nth-child(4)')); 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')); @@ -450,8 +451,8 @@ function InterestSurveyResultsWidgetResults() { browser.sleep(2500); }); expect(await CareerExplorationPageTitle.getText()).toEqual('Career Exploration'); - expect(await WidgetTitle.getText()).toEqual('Clusters'); - expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.'); + 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 BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration'); expect(await Finance.getText()).toEqual('Finance'); expect(await LawPublicSafetyCorrectionsAndSecurity.getText()).toEqual('Law, Public Safety, Corrections & Security'); diff --git a/loginWithInstitution_config.js b/loginWithInstitution_config.js index e2deba9..7a3f9c3 100644 --- a/loginWithInstitution_config.js +++ b/loginWithInstitution_config.js @@ -14,10 +14,15 @@ exports.config = { }, onPrepare: function() { - browser.sleep(2500); + browser.sleep(5000); browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'GNight147' //QA GNight147 //PROD ProdUser147 + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/loginWithInstitution_spec.js b/loginWithInstitution_spec.js index 660cbb9..f608a89 100644 --- a/loginWithInstitution_spec.js +++ b/loginWithInstitution_spec.js @@ -3,7 +3,7 @@ describe('Login With Institution Script', function () { //Open browser - browser.get('https://app-qa.journeysmap.com/Journey/index.html#/login'); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -15,10 +15,10 @@ describe('Login With Institution Script', function () { var NextButton = element(by.css('.btn')); //Sign Up - SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton); + LoginWithDuplicateAccount(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton); - function SignUp(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) { - it(': Login; should attempt to log in then reset new account password and complete Explore Careers task.', async function () { + function LoginWithDuplicateAccount(CloseIcon, UsernameTextBox, PasswordTextBox, NextButton) { + it(': Login; should attempt to log in with duplicate accont then reset new account password and complete Explore Careers task.', async function () { var LoginPageGreetingText = element(by.css('.jmLoginTitle > .ng-scope')); var InstitutionTextBox = element(by.css('#txtZ')); var SubTextOne = element(by.css('.jmLoginMsg:nth-child(7) > div:nth-child(1)')); @@ -38,30 +38,45 @@ describe('Login With Institution Script', function () { expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.'); - await UsernameTextBox.sendKeys('gnight147').then(function() { - browser.sleep(2500); + expect(InstitutionTextBox.isDisplayed()).toBe(false); + browser.sleep(1000); + await UsernameTextBox.sendKeys(browser.params.userName).then(function() { + browser.sleep(1000); + UsernameTextBox.sendKeys(protractor.Key.TAB); + browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); }); await PasswordTextBox.sendKeys('EDmin').then(function() { - browser.sleep(2500); + browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); - expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); await InstitutionTextBox.sendKeys('j').then(function() { browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); - expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); await InstitutionTextBox.sendKeys('o').then(function() { browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); + expect(InstitutionDropDownList.isDisplayed()).toBe(true); }); - await InstitutionTextBox.sendKeys('in').then(function() { + expect(InstitutionDropDownList.isDisplayed()).toBe(true); + await InstitutionTextBox.sendKeys('rn').then(function() { browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); - expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); await InstitutionTextBox.clear(); - await InstitutionTextBox.sendKeys('jour').then(function() { + expect(InstitutionTextBox.isDisplayed()).toBe(true); + await InstitutionTextBox.sendKeys('journeys').then(function() { browser.sleep(1000); + expect(InstitutionTextBox.isDisplayed()).toBe(true); + expect(InstitutionDropDownList.isDisplayed()).toBe(true); }); await InstitutionDropDownList.click().then(function() { - browser.sleep(2500); + browser.sleep(1000); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); await NextButton.click().then(function() { browser.sleep(2500); @@ -77,23 +92,29 @@ describe('Login With Institution Script', function () { await ResetPasswordUsernameTextBox.sendKeys('jhuerta').then(function() { browser.sleep(2500); }); - expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); await NextButton.click().then(function() { browser.sleep(2500); }); - expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); + expect(ResetPasswordInstitutionTextBox.isDisplayed()).toBe(false); expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); await ResetPasswordUsernameTextBox.clear(); - await ResetPasswordUsernameTextBox.sendKeys('gnight147').then(function() { - browser.sleep(2500); + browser.sleep(1000); + await ResetPasswordUsernameTextBox.sendKeys(browser.params.userName).then(function() { + browser.sleep(1000); }); - expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); await NextButton.click().then(function() { browser.sleep(2500); - }); + expect(ResetPasswordInstitutionTextBox.isDisplayed()).toBe(true); + expect(browser.isElementPresent(ResetPasswordValidationMessage)).toBe(false); + }); expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?"); await ResetPasswordInstitutionTextBox.sendKeys('journeys').then(function() { - browser.sleep(2000); + browser.sleep(2500); + expect(ResetPasswordInstitutionDropDownList.isDisplayed()).toBe(true); + }); + await ResetPasswordInstitutionDropDownList.click().then(function() { + browser.sleep(1000); + expect(browser.isElementPresent(ResetPasswordInstitutionDropDownList)).toBe(false); }); await NextButton.click().then(function() { browser.sleep(2500); @@ -101,33 +122,40 @@ describe('Login With Institution Script', function () { expect(await ResetPasswordGreetingText.getText()).toEqual("Can't Get Into Your Account?"); expect(await ResetPasswordValidationMessage.getText()).toEqual("Oops. Looks like we don't recognize your information. Please try again. Or contact help@journeysmap.com."); await CloseIcon.click().then(function() { - browser.sleep(2500); + browser.sleep(1000); }); //Back to Login Page expect(await LoginPageGreetingText.getText()).toEqual('Login and start exploring.'); expect(await SubTextOne.getText()).toEqual("Don't have an account? Creating one is free! Sign up here."); expect(await SubTextTwo.getText()).toEqual('Forgot your password? Click here.'); - await UsernameTextBox.sendKeys('gnight147').then(function() { - browser.sleep(2500); + expect(InstitutionTextBox.isDisplayed()).toBe(false); + await UsernameTextBox.sendKeys(browser.params.userName).then(function() { + browser.sleep(1000); }); await PasswordTextBox.sendKeys('EDmin123').then(function() { - browser.sleep(2500); + browser.sleep(1000); }); - expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); + expect(InstitutionTextBox.isDisplayed()).toBe(true); await InstitutionTextBox.sendKeys('journeys').then(function() { - browser.sleep(2500); + browser.sleep(1000); + expect(InstitutionDropDownList.isDisplayed()).toBe(true); + }); + await InstitutionDropDownList.click().then(function() { + browser.sleep(1000); + expect(browser.isElementPresent(InstitutionDropDownList)).toBe(false); }); await NextButton.click().then(function() { browser.sleep(2500); }); //Journeys Dashboard browser.waitForAngular(); - expect(await JourneysDashboardGreeting.getText()).toEqual('Hi, Good'); + expect(await JourneysDashboardGreeting.getText()).toContain('Hi, '); + browser.sleep(2500); }); } //Action Calls - //SignOut(); + SignOut(); }); function SignOut() { diff --git a/myCareersWidget_config.js b/myCareersWidget_config.js index 421e6b1..6b01dd4 100644 --- a/myCareersWidget_config.js +++ b/myCareersWidget_config.js @@ -18,6 +18,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/myCareersWidget_spec.js b/myCareersWidget_spec.js index b05e79b..eb30093 100644 --- a/myCareersWidget_spec.js +++ b/myCareersWidget_spec.js @@ -1,15 +1,12 @@ //myCareersWidget_spec.js describe('My Careers Widget Script', function () { - //app-journeysmap landing page + //login-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); - }); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -26,7 +23,7 @@ describe('My Careers Widget Script', function () { expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + await UserNameTextBox.sendKeys(browser.params.userName).then(function() { browser.sleep(2500); }); await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { diff --git a/profileAndMyProgressWidgets_config.js b/profileAndMyProgressWidgets_config.js index 30795d6..3af51bd 100644 --- a/profileAndMyProgressWidgets_config.js +++ b/profileAndMyProgressWidgets_config.js @@ -1,4 +1,4 @@ -//profileAndMyProgress_config.js +//profileAndMyProgressWidgets_config.js exports.config = { framework: 'jasmine', @@ -18,6 +18,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/profileAndMyProgressWidgets_spec.js b/profileAndMyProgressWidgets_spec.js index 87c6c95..28b4f55 100644 --- a/profileAndMyProgressWidgets_spec.js +++ b/profileAndMyProgressWidgets_spec.js @@ -1,15 +1,12 @@ -//profileAndMyProgress_spec.js +//profileAndMyProgressWidgets_spec.js describe('Profile And My Progress Widget Scripts', function () { - //app-journeysmap landing page + //login-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); - }); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -26,7 +23,7 @@ describe('Profile And My Progress Widget Scripts', function () { expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + await UserNameTextBox.sendKeys(browser.params.userName).then(function() { browser.sleep(2500); }); await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { diff --git a/skillsMatcherResultsWidget_config.js b/skillsMatcherResultsWidget_config.js index e154fb7..ffc1a61 100644 --- a/skillsMatcherResultsWidget_config.js +++ b/skillsMatcherResultsWidget_config.js @@ -18,6 +18,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/skillsMatcherResultsWidget_spec.js b/skillsMatcherResultsWidget_spec.js index 1fb43c4..09b96ee 100644 --- a/skillsMatcherResultsWidget_spec.js +++ b/skillsMatcherResultsWidget_spec.js @@ -1,15 +1,12 @@ //skillsMatcherResultsWidget_spec.js -describe('Interest Survey Results Widget Script', function () { - //app-journeysmap landing page +describe('Skills Matcher Results Widget Script', function () { + //login-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); - }); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -26,7 +23,7 @@ describe('Interest Survey Results Widget Script', function () { expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); browser.sleep(2500); - await UserNameTextBox.sendKeys('QA_AutomatedRegression').then(function() { + await UserNameTextBox.sendKeys(browser.params.userName).then(function() { browser.sleep(2500); }); await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() { diff --git a/topCareerWidget_config.js b/topCareerWidget_config.js index ee27ca1..4cc2142 100644 --- a/topCareerWidget_config.js +++ b/topCareerWidget_config.js @@ -1,4 +1,4 @@ -// config.js +//topCareerWidget_config.js exports.config = { framework: 'jasmine', @@ -17,6 +17,11 @@ exports.config = { browser.driver.manage().window().maximize(); }, + params: { + login: 'https://app-qa.journeysmap.com/Journey/index.html#/login', + userName: 'QA_AutomatedRegression' + } + /*multiCapabilities: [{ browserName: 'chrome' }, { diff --git a/topCareerWidget_spec.js b/topCareerWidget_spec.js index 7aadbf3..2f232ae 100644 --- a/topCareerWidget_spec.js +++ b/topCareerWidget_spec.js @@ -1,13 +1,12 @@ -//journeysmap_spec.js +//topCareerWidget_spec.js -describe('Journeysmap script', function () { - //app-journeysmap landing page +describe('Top Career Widget script', function () { + //login-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'); + browser.get(browser.params.login); it('should have a title', async function () { await expect(browser.getTitle()).toEqual('Login'); @@ -27,7 +26,7 @@ describe('Journeysmap script', function () { var JourneysGreeting = element(by.css('.dropdown')); expect(await PageGreetingText.getText()).toEqual('Login and start exploring.'); - await UserNameTextBox.sendKeys('QA_AutomatedRegression'); + await UserNameTextBox.sendKeys(browser.params.userName); browser.sleep(1000); await PasswordTextBox.sendKeys('3Dm!nAuto'); browser.sleep(1000);