Added new button checks

This commit is contained in:
2020-12-01 11:47:45 -08:00
parent f6eaf6b361
commit 5ea0bd61da
2 changed files with 60 additions and 30 deletions

View File

@@ -19,8 +19,8 @@ exports.config = {
},
params: {
login: 'https://app.journeysmap.com/Journey/index.html#/login',
username: 'PROD_AutomatedRegression'
login: 'https://app-qa.journeysmap.com/Journey/index.html#/login',
username: 'QA_AutomatedRegression'
}
/*multiCapabilities: [{

View File

@@ -1,5 +1,7 @@
//profileAndMyProgressWidgets_spec.js
const { buildPath } = require("selenium-webdriver/http");
describe('Profile And My Progress Widget Scripts', function () {
//login-journeysmap landing page
var UserNameTextBox = element(by.css('#txtU'));
@@ -85,7 +87,7 @@ function ProfileWidget() {
});
//About Me Widget
expect(await AboutMeWidgetTitle.getText()).toEqual('About Me');
browser.actions().mouseMove(element(by.css('.ng-scope > #aboutMeFull'))).perform().then(function() {
browser.actions().mouseMove(element(by.css('#aboutMeFull > .jrnys_lead-body-copy'))).perform().then(function() {
browser.sleep(1000);
});
await AboutMePencil.click().then(function() {
@@ -98,8 +100,8 @@ function ProfileWidget() {
await AboutMePencil.click().then(function() {
browser.sleep(1000);
});
browser.executeScript('window.scrollTo(0, 780);').then(function() {
browser.sleep(2500);
browser.executeScript('window.scrollTo(0, 772);').then(function() {
browser.sleep(1000);
});
//Role Model Widget
expect(await RoleModelWidgetTitle.getText()).toEqual('Role Model');
@@ -167,22 +169,18 @@ function MyProgressWidget() {
var WidgetTitle = element(by.css('.row > .jrnys_lead-body-copy'));
var WidgetDescription = element(by.css('span:nth-child(2)'));
var AgricultureFoodAndNaturalResources = element(by.css('#\\34 f4b40f7-4d4a-4dbd-98ad-900e43307920 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var AgricultureFoodAndNaturalResourcesTwo = element(by.css('.col-md-4:nth-child(2) #\\34 f4b40f7-4d4a-4dbd-98ad-900e43307920 .ng-binding'));
var ArchitectureAndConstruction = element(by.css('#b3ebc784-a26e-4134-87ea-87a44d90049a > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var ArchitectureAndConstructionTwo = element(by.css('.col-md-4:nth-child(1) #b3ebc784-a26e-4134-87ea-87a44d90049a .ng-binding'));
var ArtsAVTechnologyAndCommunications = element(by.css('#\\31 48161d3-2bf8-4703-bf6b-17f05cafc9f0 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var BusinessManagementAndAdministration = element(by.css('#\\35 db8efa4-0809-4e9e-8096-db5d5d1dafd5 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var BusinessManagementAndAdministrationTwo = element(by.css('.col-md-4:nth-child(3) #\\35 db8efa4-0809-4e9e-8096-db5d5d1dafd5 .ng-binding'));
var CyberSecurity = element(by.css('#\\37 22f5c71-9689-4f5d-817e-286843e3335a > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var EducationAndTraining = element(by.css('#f5ef3fd0-e006-4326-a127-9a51cd68b62d > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var PreviousLinkText = element(by.css('.col-xs-2:nth-child(2)'));
var NextLinkText = element(by.linkText('Next'));
//Skills Filter Applied
var HospitalityAndTourism = element(by.css('#\\30 6927b2f-12ec-4a78-a72b-8aa6c8576788 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var HumanServices = element(by.css('#\\33 2cf59de-d8b7-463c-86a1-5a872fca4293 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var Finance = element(by.css('#\\36 ad08707-5c2b-44c7-b293-015236495276 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var MarketingSalesAndService = element(by.css('#\\38 d94c030-7c25-4491-8706-57a9a83a5221 > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
//Interests Filter Applied
var HealthScience = element(by.css('#\\33 7735fc5-77f8-4a3c-8814-51c377b7affd > #territoryCardContainer .territoryCardTitleText > .ng-binding'));
var DashboardHeaderLink = element(by.css('.navbar-brand > img'));
//My Progress Widget
expect(await MyProgressWidgetTitle.getText()).toEqual('MY PROGRESS');
expect(await ProgressLevel.getText()).toEqual('Level: Scout');
@@ -297,6 +295,9 @@ function MyProgressWidget() {
browser.sleep(5000);
browser.waitForAngular();
});
await ProgressWidgetExpandIcon.click().then(function() {
browser.sleep(2500);
});
//Skills Matcher
expect(await ActionThreeRetake.getText()).toEqual('Retake');
await ActionThreeRetake.click().then(function() {
@@ -313,6 +314,9 @@ function MyProgressWidget() {
await CancelButton.click().then(function() {
browser.sleep(5000);
});
await ProgressWidgetExpandIcon.click().then(function() {
browser.sleep(2500);
});
//Career Exploration
expect(await ActionFourKeepExploring.getText()).toEqual('Keep Exploring');
await ActionFourKeepExploring.click().then(function() {
@@ -329,11 +333,17 @@ function MyProgressWidget() {
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
expect(await ArtsAVTechnologyAndCommunications.getText()).toEqual('Arts, A/V Technology & Communications');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
expect(await CyberSecurity.getText()).toEqual('Cyber Security');
expect(await EducationAndTraining.getText()).toEqual('Education & Training');
expect(await PreviousLinkText.getText()).toEqual('Previous');
expect(await NextLinkText.getText()).toEqual('Next');
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
//Skills Filter Applied
await SkillsFilterButton.click().then(function() {
browser.sleep(5000);
@@ -345,12 +355,18 @@ function MyProgressWidget() {
expect(await InterestsFilterButton.getText()).toEqual('Interests');
expect(await WidgetTitle.getText()).toEqual('Clusters');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.');
expect(await HospitalityAndTourism.getText()).toEqual('Hospitality and Tourism');
expect(await HumanServices.getText()).toEqual('Human Services');
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
expect(await Finance.getText()).toEqual('Finance');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await CyberSecurity.getText()).toEqual('Cyber Security');
expect(await MarketingSalesAndService.getText()).toEqual('Marketing, Sales & Service');
expect(await EducationAndTraining.getText()).toEqual('Education & Training');
expect(await Finance.getText()).toEqual('Finance');
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
await SkillsFilterButton.click().then(function() {
browser.sleep(2500);
});
@@ -365,11 +381,17 @@ function MyProgressWidget() {
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
expect(await ArtsAVTechnologyAndCommunications.getText()).toEqual('Arts, A/V Technology & Communications');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
expect(await CyberSecurity.getText()).toEqual('Cyber Security');
expect(await EducationAndTraining.getText()).toEqual('Education & Training');
expect(await PreviousLinkText.getText()).toEqual('Previous');
expect(await NextLinkText.getText()).toEqual('Next');
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
await InterestsFilterButton.click().then(function() {
browser.sleep(2500);
});
@@ -381,12 +403,18 @@ function MyProgressWidget() {
expect(await InterestsFilterButton.getText()).toEqual('Interests');
expect(await WidgetTitle.getText()).toEqual('Clusters');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.');
expect(await HospitalityAndTourism.getText()).toEqual('Hospitality and Tourism');
expect(await HumanServices.getText()).toEqual('Human Services');
expect(await HealthScience.getText()).toEqual('Health Science');
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await CyberSecurity.getText()).toEqual('Cyber Security');
expect(await EducationAndTraining.getText()).toEqual('Education & Training');
expect(await Finance.getText()).toEqual('Finance');
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
await InterestsFilterButton.click().then(function() {
browser.sleep(2500);
});
@@ -401,11 +429,17 @@ function MyProgressWidget() {
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
expect(await ArtsAVTechnologyAndCommunications.getText()).toEqual('Arts, A/V Technology & Communications');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
expect(await CyberSecurity.getText()).toEqual('Cyber Security');
expect(await EducationAndTraining.getText()).toEqual('Education & Training');
expect(await PreviousLinkText.getText()).toEqual('Previous');
expect(await NextLinkText.getText()).toEqual('Next');
browser.executeScript('window.scrollTo(0, 0);').then(function() {
browser.sleep(1000);
});
//Both Filters Applied
await SkillsFilterButton.click().then(function() {
browser.sleep(2500);
@@ -420,19 +454,15 @@ function MyProgressWidget() {
expect(await InterestsFilterButton.getText()).toEqual('Interests');
expect(await WidgetTitle.getText()).toEqual('Clusters');
expect(await WidgetDescription.getText()).toEqual('To start your career exploration, select a cluster below.');
expect(await HospitalityAndTourism.getText()).toEqual('Hospitality and Tourism');
expect(await HumanServices.getText()).toEqual('Human Services');
expect(await HealthScience.getText()).toEqual('Health Science');
expect(await AgricultureFoodAndNaturalResources.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await AgricultureFoodAndNaturalResourcesTwo.getText()).toEqual('Agriculture, Food & Natural Resources');
expect(await ArchitectureAndConstruction.getText()).toEqual('Architecture & Construction');
browser.executeScript('window.scrollTo(0, document.body.scrollHeight);').then(function() {
browser.sleep(1000);
});
expect(await ArchitectureAndConstructionTwo.getText()).toEqual('Architecture & Construction');
expect(await BusinessManagementAndAdministration.getText()).toEqual('Business Management & Administration');
expect(await Finance.getText()).toEqual('Finance');
//Back to Dashboard
await DashboardHeaderLink.click().then(function() {
browser.sleep(5000);
});
await ProgressWidgetExpandIcon.click().then(function() {
browser.sleep(2500);
});
expect(await BusinessManagementAndAdministrationTwo.getText()).toEqual('Business Management & Administration');
});
}