Cleaned upl href values
This commit is contained in:
Binary file not shown.
@@ -24,7 +24,7 @@ const correlationsDashboard = (req, res) => {
|
|||||||
|
|
||||||
//CONSTANTS
|
//CONSTANTS
|
||||||
//My Content Widget
|
//My Content Widget
|
||||||
const myContentItemTotals = '5040 items';
|
const myContentItemTotals = '5045 items';
|
||||||
|
|
||||||
const steps = [
|
const steps = [
|
||||||
{ description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') },
|
{ description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') },
|
||||||
@@ -282,7 +282,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Help icon href matched as expected');
|
console.log('Passed: Help icon href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Help icon href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Help icon href to be: "https://correlation.edgate.com/exact/help.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -416,7 +416,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Dashboard Navigation href matched as expected');
|
console.log('Passed: Dashboard Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Dashboard Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Dashboard Navigation href to be: "https://correlation.edgate.com/exact/"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -499,7 +499,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Frameworks Navigation href matched as expected');
|
console.log('Passed: Frameworks Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Frameworks Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Frameworks Navigation href to be: "https://correlation.edgate.com/exact/frameworks.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -582,7 +582,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Align Navigation href matched as expected');
|
console.log('Passed: Align Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Align Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Align Navigation href to be: "https://correlation.edgate.com/exact/browse.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -665,7 +665,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Upload Navigation href matched as expected');
|
console.log('Passed: Upload Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Upload Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Upload Navigation href to be: "https://correlation.edgate.com/exact/submit.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -748,7 +748,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Activity Report Navigation href matched as expected');
|
console.log('Passed: Activity Report Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Activity Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Activity Report Navigation href to be: "https://correlation.edgate.com/exact/activity_reporting.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -831,7 +831,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Report Navigation href matched as expected');
|
console.log('Passed: Report Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Report Navigation href to be: "https://correlation.edgate.com/exact/reports.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -914,7 +914,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Approve Navigation href matched as expected');
|
console.log('Passed: Approve Navigation href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Approve Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Approve Navigation href to be: "https://correlation.edgate.com/exact/approvecontent.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -1388,8 +1388,9 @@ const steps = [
|
|||||||
{ position: 18, name: 'Illustrative Math Test 1', count: '5', href: '/exact/contentset_edit_modal.php?id=1473839901' },
|
{ position: 18, name: 'Illustrative Math Test 1', count: '5', href: '/exact/contentset_edit_modal.php?id=1473839901' },
|
||||||
{ position: 19, name: 'Illustrative Math Test 2', count: '5', href: '/exact/contentset_edit_modal.php?id=1473840078' },
|
{ position: 19, name: 'Illustrative Math Test 2', count: '5', href: '/exact/contentset_edit_modal.php?id=1473840078' },
|
||||||
{ position: 20, name: 'webinar test', count: '5', href: '/exact/contentset_edit_modal.php?id=1476429225' },
|
{ position: 20, name: 'webinar test', count: '5', href: '/exact/contentset_edit_modal.php?id=1476429225' },
|
||||||
{ position: 21, name: 'create import test', count: '3', href: '/exact/contentset_edit_modal.php?id=1478966441' },
|
{ position: 21, name: 'Review Screen Open', count: '5', href: '/exact/contentset_edit_modal.php?id=1483698269' },
|
||||||
{ position: 22, name: 'New One For Agust Post Night', count: '0', href: '/exact/contentset_edit_modal.php?id=1478966652' }
|
{ position: 22, name: 'create import test', count: '3', href: '/exact/contentset_edit_modal.php?id=1478966441' },
|
||||||
|
{ position: 23, name: 'New One For Agust Post Night', count: '0', href: '/exact/contentset_edit_modal.php?id=1478966652' }
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const exp of expected) {
|
for (const exp of expected) {
|
||||||
@@ -3367,7 +3368,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: See More href matched as expected');
|
console.log('Passed: See More href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: See More button href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: See More button href to be: "https://correlation.edgate.com/pic/standards-updates.html"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -4411,7 +4412,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: Manage Favorites href matched as expected');
|
console.log('Passed: Manage Favorites href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Manage Favorites button href to be "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Manage Favorites button href to be: "https://correlation.edgate.com/exact/add_favorite_report.php"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font-family
|
//font-family
|
||||||
@@ -4707,9 +4708,9 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: Format - XLS button was displayed as expected');
|
console.log('Passed: Format Row 1 - XLS button was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: XLS button was not displayed');
|
errors.push('Expected: Format Row 1 - XLS button was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -4725,11 +4726,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Report 1 column data
|
//Favorite Reports - Report Row 1 title
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Report column 1 data, text, and font size',
|
description: 'Favorite Reports - Report Row 1 title, text, and font size',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Report column 1 data';
|
const multipleChecks = 'Favorite Reports - Report Row 1 title';
|
||||||
|
|
||||||
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > td:nth-child(2)'));
|
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > td:nth-child(2)'));
|
||||||
|
|
||||||
@@ -4744,30 +4745,30 @@ const steps = [
|
|||||||
|
|
||||||
//text
|
//text
|
||||||
if (elementText === 'SoDontLook') {
|
if (elementText === 'SoDontLook') {
|
||||||
console.log('Passed: Favorite Reports - Report column 1 data matched as expected');
|
console.log('Passed: Favorite Reports - Report Row 1 title matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report = "SoDontLook" column 1 data; Actual: "${elementText}"`);
|
errors.push(`Expected: Favorite Reports - Report Row 1 title to be: "SoDontLook"; Actual: "${elementText}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font
|
//font
|
||||||
if (elementFont === "Poppins, sans-serif") {
|
if (elementFont === "Poppins, sans-serif") {
|
||||||
console.log('Passed: Favorite Reports - Report column 1 data font-family matched as expected');
|
console.log('Passed: Favorite Reports - Report Row 1 title font-family matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 1 data font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
|
errors.push(`Expected: Favorite Reports - Report Row 1 title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//size
|
//size
|
||||||
if (elementSize === '14.3px') {
|
if (elementSize === '14.3px') {
|
||||||
console.log('Passed: Favorite Reports - Report column 1 data font-size matched as expected');
|
console.log('Passed: Favorite Reports - Report Row 1 title font-size matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 1 data font-size "14.3px"; Actual: "${elementSize}"`);
|
errors.push(`Expected: Favorite Reports - Report Row 1 title font-size "14.3px"; Actual: "${elementSize}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//color
|
//color
|
||||||
if (elementColor === 'rgba(33, 37, 41, 1)') {
|
if (elementColor === 'rgba(33, 37, 41, 1)') {
|
||||||
console.log('Passed: Favorite Reports - Report column 1 data text color matched as expected');
|
console.log('Passed: Favorite Reports - Report Row 1 title color matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 1 data text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
|
errors.push(`Expected: Favorite Reports - Report Row 1 title color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -4783,11 +4784,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Run column 1 data
|
//Favorite Reports - Run Row 1 icon
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Run column 1 data',
|
description: 'Favorite Reports - Run Row 1 icon',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Run column 1 data';
|
const multipleChecks = 'Favorite Reports - Run Row 1 icon';
|
||||||
|
|
||||||
const link = await driver.findElement(By.css('tr:nth-child(1) a.reportrun'));
|
const link = await driver.findElement(By.css('tr:nth-child(1) a.reportrun'));
|
||||||
const element = await link.findElement(By.css('img'));
|
const element = await link.findElement(By.css('img'));
|
||||||
@@ -4803,27 +4804,27 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: Run icon was displayed as expected');
|
console.log('Passed: Run Row 1 icon was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: Run icon was not displayed');
|
errors.push('Expected: Run Row 1 icon was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//href path
|
//href path
|
||||||
const actualHref = await link.getAttribute('href');
|
const actualHref = await link.getAttribute('href');
|
||||||
const url = new URL(actualHref);
|
const url = new URL(actualHref);
|
||||||
if (url.pathname === expectedPath) {
|
if (url.pathname === expectedPath) {
|
||||||
console.log('Passed: Run icon 1 href path matched as expected');
|
console.log('Passed: Run Row 1 icon href path matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 1 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
|
errors.push(`Expected: Run Row 1 icon href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//href query parameters
|
//href query parameters
|
||||||
for (const [key, expectedValue] of Object.entries(expectedParams)) {
|
for (const [key, expectedValue] of Object.entries(expectedParams)) {
|
||||||
const actualValue = url.searchParams.get(key);
|
const actualValue = url.searchParams.get(key);
|
||||||
if (actualValue === expectedValue) {
|
if (actualValue === expectedValue) {
|
||||||
console.log('Passed: Run icon 1 href param matched as expected');
|
console.log('Passed: Run Row 1 icon href param matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 1 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
|
errors.push(`Expected: Run Row 1 icon href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4840,11 +4841,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Download column 1 data
|
//Favorite Reports - Download Row 1 icon
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Download column 1 data',
|
description: 'Favorite Reports - Download Row 1 icon',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Download column 1 data';
|
const multipleChecks = 'Favorite Reports - Download Row 1 icon';
|
||||||
|
|
||||||
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > .text-center a'));
|
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > .text-center a'));
|
||||||
const element = await link.findElement(By.css('img'));
|
const element = await link.findElement(By.css('img'));
|
||||||
@@ -4855,17 +4856,17 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: Download icon 1 was displayed as expected');
|
console.log('Passed: Download Row 1 icon was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: Download icon 1 was not displayed');
|
errors.push('Expected: Download Row 1 icon was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//href
|
//href
|
||||||
const actualHref = await link.getAttribute('href');
|
const actualHref = await link.getAttribute('href');
|
||||||
if (actualHref && actualHref.endsWith(expectedHref)) {
|
if (actualHref && actualHref.endsWith(expectedHref)) {
|
||||||
console.log('Passed: Download icon 1 href matched expected');
|
console.log('Passed: Download Row 1 icon href matched expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Download icon 1 href to end with "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Download Row 1 icon href to be: "https://correlation.edgate.com/exact/reports/exact_juan/ThisBeMyFile.xls"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -4894,9 +4895,9 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: doc button was displayed as expected');
|
console.log('Passed: Format Row 2 doc button was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: doc button was not displayed');
|
errors.push('Expected: Format Row 2 doc button was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -4912,11 +4913,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Report 2 column data
|
//Favorite Reports - Report Row 2 title
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Report column 2 data, text, and font size',
|
description: 'Favorite Reports - Report Row 2 title, text, and font size',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Report column 2 data';
|
const multipleChecks = 'Favorite Reports - Report Row 2 title';
|
||||||
|
|
||||||
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > td:nth-child(2)'));
|
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > td:nth-child(2)'));
|
||||||
|
|
||||||
@@ -4931,30 +4932,30 @@ const steps = [
|
|||||||
|
|
||||||
//text
|
//text
|
||||||
if (elementText === 'Test Inc.') {
|
if (elementText === 'Test Inc.') {
|
||||||
console.log('Passed: Favorite Reports - Report column 2 data matched as expected');
|
console.log('Passed: Favorite Reports - Report Row 2 title matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report = "Test Inc." column 2 data; Actual: "${elementText}"`);
|
errors.push(`Expected: Favorite Reports - Report Row 2 title to be: "Test Inc."; Actual: "${elementText}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//font
|
//font
|
||||||
if (elementFont === "Poppins, sans-serif") {
|
if (elementFont === "Poppins, sans-serif") {
|
||||||
console.log('Passed: Favorite Reports - Report column 2 data font-family matched as expected');
|
console.log('Passed: Favorite Reports - Report Report Row 2 title font-family matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 2 data font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
|
errors.push(`Expected: Favorite Reports - Report Report Row 2 title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//size
|
//size
|
||||||
if (elementSize === '14.3px') {
|
if (elementSize === '14.3px') {
|
||||||
console.log('Passed: Favorite Reports - Report column 2 data font-size matched as expected');
|
console.log('Passed: Favorite Reports - Report Report Row 2 title font-size matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 2 data font-size "14.3px"; Actual: "${elementSize}"`);
|
errors.push(`Expected: Favorite Reports - Report Report Row 2 title font-size "14.3px"; Actual: "${elementSize}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//color
|
//color
|
||||||
if (elementColor === 'rgba(33, 37, 41, 1)') {
|
if (elementColor === 'rgba(33, 37, 41, 1)') {
|
||||||
console.log('Passed: Favorite Reports - Report column 2 data text color matched as expected');
|
console.log('Passed: Favorite Reports - Report Report Row 2 title text color matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Favorite Reports - Report column 2 data text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
|
errors.push(`Expected: Favorite Reports - Report Report Row 2 title text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -4970,11 +4971,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Run column 2 data
|
//Favorite Reports - Run Row 2 icon
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Run column 2 data',
|
description: 'Favorite Reports - Run Row 2 icon',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Run column 2 data';
|
const multipleChecks = 'Favorite Reports - Run Row 2 icon';
|
||||||
|
|
||||||
const link = await driver.findElement(By.css('tr:nth-child(2) a.reportrun'));
|
const link = await driver.findElement(By.css('tr:nth-child(2) a.reportrun'));
|
||||||
const element = await link.findElement(By.css('img'));
|
const element = await link.findElement(By.css('img'));
|
||||||
@@ -4990,27 +4991,27 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: Run icon 2 was displayed as expected');
|
console.log('Passed: Run Row 2 icon was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: Run icon 2 was not displayed');
|
errors.push('Expected: Run Row 2 icon was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//href path
|
//href path
|
||||||
const actualHref = await link.getAttribute('href');
|
const actualHref = await link.getAttribute('href');
|
||||||
const url = new URL(actualHref);
|
const url = new URL(actualHref);
|
||||||
if (url.pathname === expectedPath) {
|
if (url.pathname === expectedPath) {
|
||||||
console.log('Passed: Run icon 2 href path matched as expected');
|
console.log('Passed: Run Row 2 icon href path matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 2 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
|
errors.push(`Expected: Run Row 2 icon href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//href query parameters
|
//href query parameters
|
||||||
for (const [key, expectedValue] of Object.entries(expectedParams)) {
|
for (const [key, expectedValue] of Object.entries(expectedParams)) {
|
||||||
const actualValue = url.searchParams.get(key);
|
const actualValue = url.searchParams.get(key);
|
||||||
if (actualValue === expectedValue) {
|
if (actualValue === expectedValue) {
|
||||||
console.log('Passed: Run icon 2 href param matched as expected');
|
console.log('Passed: Run Row 2 icon href param matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 2 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
|
errors.push(`Expected: Run Row 2 icon href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5027,11 +5028,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Favorite Reports - Download column 2 data
|
//Favorite Reports - Download Row 2 icon
|
||||||
{
|
{
|
||||||
description: 'Favorite Reports - Download column 2 data',
|
description: 'Favorite Reports - Download Row 2 icon',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const multipleChecks = 'Favorite Reports - Download column 2 data';
|
const multipleChecks = 'Favorite Reports - Download Row 2 icon';
|
||||||
|
|
||||||
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > .text-center a'));
|
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > .text-center a'));
|
||||||
const element = await link.findElement(By.css('img'));
|
const element = await link.findElement(By.css('img'));
|
||||||
@@ -5042,17 +5043,17 @@ const steps = [
|
|||||||
|
|
||||||
//icon present
|
//icon present
|
||||||
if (await element.isDisplayed()) {
|
if (await element.isDisplayed()) {
|
||||||
console.log('Passed: Download icon 2 was displayed as expected');
|
console.log('Passed: Download Row 2 icon was displayed as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push('Expected: Download icon 2 was not displayed');
|
errors.push('Expected: Download Row 2 icon was not displayed');
|
||||||
}
|
}
|
||||||
|
|
||||||
//href
|
//href
|
||||||
const actualHref = await link.getAttribute('href');
|
const actualHref = await link.getAttribute('href');
|
||||||
if (actualHref && actualHref.endsWith(expectedHref)) {
|
if (actualHref && actualHref.endsWith(expectedHref)) {
|
||||||
console.log('Passed: Download icon 2 href matched expected');
|
console.log('Passed: Download Row 2 icon href matched expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Download icon 2 href to end with "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Download Row 2 icon href to be: "/exact/reports/exact_juan/WordToYa.doc"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -5188,7 +5189,7 @@ const steps = [
|
|||||||
if (url.pathname === expectedPath) {
|
if (url.pathname === expectedPath) {
|
||||||
console.log('Passed: Run icon 3 href path matched as expected');
|
console.log('Passed: Run icon 3 href path matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 3 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
|
errors.push(`Expected: Run icon 3 href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//href query parameters
|
//href query parameters
|
||||||
@@ -5197,7 +5198,7 @@ const steps = [
|
|||||||
if (actualValue === expectedValue) {
|
if (actualValue === expectedValue) {
|
||||||
console.log('Passed: Run icon 3 href param matched as expected');
|
console.log('Passed: Run icon 3 href param matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 3 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
|
errors.push(`Expected: Run icon 3 href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5239,7 +5240,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref.endsWith(expectedHref)) {
|
if (actualHref && actualHref.endsWith(expectedHref)) {
|
||||||
console.log('Passed: Download icon 3 href matched expected');
|
console.log('Passed: Download icon 3 href matched expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Download icon 3 href to end with "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Download icon 3 href to be: "/exact/reports/exact_juan/IDontThinkSo.pdf"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -5375,7 +5376,7 @@ const steps = [
|
|||||||
if (url.pathname === expectedPath) {
|
if (url.pathname === expectedPath) {
|
||||||
console.log('Passed: Run icon 4 href path matched as expected');
|
console.log('Passed: Run icon 4 href path matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 4 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
|
errors.push(`Expected: Run icon 4 href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//href query parameters
|
//href query parameters
|
||||||
@@ -5384,7 +5385,7 @@ const steps = [
|
|||||||
if (actualValue === expectedValue) {
|
if (actualValue === expectedValue) {
|
||||||
console.log('Passed: Run icon 4 href param matched as expected');
|
console.log('Passed: Run icon 4 href param matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Run icon 4 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
|
errors.push(`Expected: Run icon 4 href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5426,7 +5427,7 @@ const steps = [
|
|||||||
if (actualHref && actualHref.endsWith(expectedHref)) {
|
if (actualHref && actualHref.endsWith(expectedHref)) {
|
||||||
console.log('Passed: Download icon 4 href matched expected');
|
console.log('Passed: Download icon 4 href matched expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: Download icon 4 href to end with "${expectedHref}"; actual: "${actualHref}"`);
|
errors.push(`Expected: Download icon 4 href to be: "/exact/reports/exact_juan/Checking.html"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
@@ -5451,7 +5452,7 @@ const steps = [
|
|||||||
|
|
||||||
const element = await driver.findElement(By.css('footer .pull-right > a'));
|
const element = await driver.findElement(By.css('footer .pull-right > a'));
|
||||||
const elementLogo = await element.findElement(By.css('img'));
|
const elementLogo = await element.findElement(By.css('img'));
|
||||||
const expectedHref = 'https://www.edgate.com';
|
const expectedHref = 'https://www.edgate.com/';
|
||||||
|
|
||||||
//Track all errors
|
//Track all errors
|
||||||
const errors = [];
|
const errors = [];
|
||||||
@@ -5464,11 +5465,11 @@ const steps = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
//href - browser resolves the link with a trailing slash, so remove it before comparing
|
//href - browser resolves the link with a trailing slash, so remove it before comparing
|
||||||
const actualHref = await element.getDomAttribute('href');
|
const actualHref = await element.getAttribute('href');
|
||||||
if (actualHref && actualHref === expectedHref) {
|
if (actualHref && actualHref === expectedHref) {
|
||||||
console.log('Passed: EdGate Copyright Logo href matched as expected');
|
console.log('Passed: EdGate Copyright Logo href matched as expected');
|
||||||
} else {
|
} else {
|
||||||
errors.push(`Expected: EdGate Copyright Logo href to be "https://www.edgate.com"; actual: "${actualHref}"`);
|
errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throw summary if any validation failed
|
//Throw summary if any validation failed
|
||||||
|
|||||||
Reference in New Issue
Block a user