diff --git a/tests/Align/alignAutoAlignPage.js b/tests/Align/alignAutoAlignPage.js
index 45eabac..3d12bb2 100644
--- a/tests/Align/alignAutoAlignPage.js
+++ b/tests/Align/alignAutoAlignPage.js
@@ -2238,6 +2238,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'alignAutoAlignPageResults.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignAutoAlignPage');
@@ -2247,9 +2249,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('alignAutoAlignPageResults.xlsx')) {
- fs.unlinkSync('alignAutoAlignPageResults.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -2330,11 +2333,11 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'alignAutoAlignPageResults.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
-})();
+ })();
}
export default alignAutoAlignPage;
diff --git a/tests/Align/alignContentPage.js b/tests/Align/alignContentPage.js
index 560fde2..107a675 100644
--- a/tests/Align/alignContentPage.js
+++ b/tests/Align/alignContentPage.js
@@ -1389,6 +1389,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'alignContentPageResults.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignContentPage');
@@ -1398,9 +1400,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('alignContentPageResults.xlsx')) {
- fs.unlinkSync('alignContentPageResults.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -1481,7 +1484,7 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'alignContentPageResults.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
diff --git a/tests/Align/alignStandardsPage.js b/tests/Align/alignStandardsPage.js
index 0ad3877..4ee7a87 100644
--- a/tests/Align/alignStandardsPage.js
+++ b/tests/Align/alignStandardsPage.js
@@ -1882,6 +1882,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'alignStandardsPageResults.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignStandardsPage');
@@ -1891,9 +1893,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('alignStandardsPageResults.xlsx')) {
- fs.unlinkSync('alignStandardsPageResults.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -1974,7 +1977,7 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'alignStandardsPageResults.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
diff --git a/tests/Frameworks/frameworkManagementPage.js b/tests/Frameworks/frameworkManagementPage.js
index 34a94d6..00d193b 100644
--- a/tests/Frameworks/frameworkManagementPage.js
+++ b/tests/Frameworks/frameworkManagementPage.js
@@ -2508,6 +2508,48 @@ const steps = [
},
*/
+ //FOOTER
+ //EdGate Copyright Logo
+ {
+ description: 'EdGate Copyright Logo',
+ action: async () => {
+ const multipleChecks = 'EdGate Copyright Logo';
+
+ const element = await driver.findElement(By.css('footer .pull-right > a'));
+ const elementLogo = await element.findElement(By.css('img'));
+ const expectedHref = 'https://www.edgate.com/';
+
+ //Track all errors
+ const errors = [];
+
+ //icon present
+ if (await elementLogo.isDisplayed()) {
+ console.log('Passed: EdGate Copyright Logo was displayed as expected');
+ } else {
+ errors.push('Expected: EdGate Copyright Logo was not displayed');
+ }
+
+ //href - browser resolves the link with a trailing slash, so remove it before comparing
+ const actualHref = await element.getAttribute('href');
+ if (actualHref && actualHref === expectedHref) {
+ console.log('Passed: EdGate Copyright Logo href matched as expected');
+ } else {
+ errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`);
+ }
+
+ //Throw summary if any validation failed
+ if (errors.length > 0) {
+ //Add summary line only when multiple checks failed
+ if (errors.length > 1) {
+ errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
+ }
+
+ //Throw collected messages — catch() will prefix with "FAILED:"
+ throw new Error(errors.join('\n'));
+ }
+ }
+ },
+
//NEXT ACTION
{
description: 'Log Out',
@@ -2572,6 +2614,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'frameworkManagementPageResults.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'frameworkManagementPage');
@@ -2581,9 +2625,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('frameworkManagementPageResults.xlsx')) {
- fs.unlinkSync('frameworkManagementPageResults.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -2666,7 +2711,7 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'frameworkManagementPageResults.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
diff --git a/tests/Upload/uploadSubmitAResourcePage.js b/tests/Upload/uploadSubmitAResourcePage.js
index 33aa0de..678bb58 100644
--- a/tests/Upload/uploadSubmitAResourcePage.js
+++ b/tests/Upload/uploadSubmitAResourcePage.js
@@ -163,10 +163,10 @@ const steps = [
//NEXT ACTION
{
- description: 'Click Align navigation link',
+ description: 'Click Upload navigation link',
action: async () => {
- await driver.findElement(By.linkText('Align')).click();
- console.log('----->| NEXT ACTION: Clicked Align navigation link');
+ await driver.findElement(By.linkText('Upload')).click();
+ console.log('----->| NEXT ACTION: Clicked Upload navigation link');
//Wait for page readyState
await driver.wait(async () => {
@@ -175,26 +175,84 @@ const steps = [
}, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM
- const contentTab = await driver.wait(
- until.elementLocated(By.css('#content-tab')),
+ const uploadTitle = await driver.wait(
+ until.elementLocated(By.css('h2')),
30000
);
//Wait until it becomes visible
await driver.wait(
- until.elementIsVisible(contentTab),
+ until.elementIsVisible(uploadTitle),
30000
);
}
},
- //Content tab
+ //Upload page title
{
- description: 'Content tab title text, size, color, and background color',
+ description: 'Upload page title text, size, and color',
action: async () => {
- const multipleChecks = 'Content tab title';
+ const multipleChecks = 'Upload page title';
- const element = await driver.findElement(By.linkText('Content'));
+ const element = await driver.findElement(By.css('h2'));
+
+ //Get text, font, size, and color
+ const elementText = await element.getText();
+ const elementFont = await element.getCssValue('font-family');
+ const elementSize = await element.getCssValue('font-size');
+ const elementColor = await element.getCssValue('color');
+
+ //Track all errors
+ const errors = [];
+
+ //text
+ if (elementText === 'Upload') {
+ console.log('Passed: Upload page title text matched as expected');
+ } else {
+ errors.push(`Expected: "Upload"; Actual: "${elementText}"`);
+ }
+
+ //font
+ if (elementFont === `"DM Serif Display", serif`) {
+ console.log('Passed: Upload page title font-family matched as expected');
+ } else {
+ errors.push(`Expected: Upload page title font-family "DM Serif Display, serif"; Actual: ${elementFont}`);
+ }
+
+ //size
+ if (elementSize === '32px') {
+ console.log('Passed: Upload page title text font-size matched as expected');
+ } else {
+ errors.push(`Expected: Upload page title text font-size "32px"; Actual: "${elementSize}"`);
+ }
+
+ //color
+ if (elementColor === 'rgba(40, 39, 90, 1)') {
+ console.log('Passed: Upload page title text color matched as expected');
+ } else {
+ errors.push(`Expected: Upload page title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`);
+ }
+
+ //Throw summary if any validation failed
+ if (errors.length > 0) {
+ //Add summary line only when multiple checks failed
+ if (errors.length > 1) {
+ errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
+ }
+
+ //Throw collected messages — catch() will prefix with "FAILED:"
+ throw new Error(errors.join('\n'));
+ }
+ }
+ },
+
+ //Submit A Resource tab
+ {
+ description: 'Submit A Resource tab title text, size, color, and background color',
+ action: async () => {
+ const multipleChecks = 'Submit A Resource tab title';
+
+ const element = await driver.findElement(By.linkText('Submit A Resource'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
@@ -203,85 +261,42 @@ const steps = [
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
- //Tool-tip lives on the parent
; Bootstrap moves "title" into "data-original-title" and blanks "title"
- const tooltipHost = await element.findElement(By.xpath('./parent::li'));
- const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title'));
- const elementTitleFont = await element.getCssValue('font-family');
- const elementTitleSize = await element.getCssValue('font-size');
- const elementTitleColor = await element.getCssValue('color');
- const elementTitleBgColor = await element.getCssValue('background-color');
-
//Track all errors
const errors = [];
//element text
- if (elementText === 'Content') {
- console.log('Passed: Content tab title text matched as expected');
+ if (elementText === 'Submit A Resource') {
+ console.log('Passed: Submit A Resource tab title text matched as expected');
} else {
- errors.push(`Expected: "Content"; Actual: "${elementText}"`);
+ errors.push(`Expected: "Submit A Resource"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
- console.log('Passed: Content tab title font-family matched as expected');
+ console.log('Passed: Submit A Resource tab title font-family matched as expected');
} else {
- errors.push(`Expected: Content tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
+ errors.push(`Expected: Submit A Resource tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
- console.log('Passed: Content tab title text font-size matched as expected');
+ console.log('Passed: Submit A Resource tab title text font-size matched as expected');
} else {
- errors.push(`Expected: Content tab title text font-size "15px"; Actual: "${elementSize}"`);
+ errors.push(`Expected: Submit A Resource tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(255, 255, 255, 1)') {
- console.log('Passed: Content tab title text color matched as expected');
+ console.log('Passed: Submit A Resource tab title text color matched as expected');
} else {
- errors.push(`Expected: Content tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`);
+ errors.push(`Expected: Submit A Resource tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(40, 39, 90, 1)') {
- console.log('Passed: Content tab title background color matched as expected');
+ console.log('Passed: Submit A Resource tab title background color matched as expected');
} else {
- errors.push(`Expected: Content tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
- }
-
- //element tool-tip text
- if (elementTitle === 'Browse content and align by tagging concepts') {
- console.log('Passed: Content tab tool-tip text matched as expected');
- } else {
- errors.push(`Expected: Content tab tool-tip "Browse content and align by tagging concepts"; Actual: "${elementTitle}"`);
- }
-
- //element tool-tip font
- if (elementTitleFont === 'Poppins, sans-serif') {
- console.log('Passed: Content tab tool-tip font-family matched as expected');
- } else {
- errors.push(`Expected: Content tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`);
- }
-
- //element tool-tip size
- if (elementTitleSize === '15px') {
- console.log('Passed: Content tab tool-tip text font-size matched as expected');
- } else {
- errors.push(`Expected: Content tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`);
- }
-
- //element tool-tip color
- if (elementTitleColor === 'rgba(255, 255, 255, 1)') {
- console.log('Passed: Content tab tool-tip text color matched as expected');
- } else {
- errors.push(`Expected: Content tab tool-tip text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTitleColor}"`);
- }
-
- //element tool-tip background color
- if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') {
- console.log('Passed: Content tab tool-tip background color matched as expected');
- } else {
- errors.push(`Expected: Content tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
+ errors.push(`Expected: Submit A Resource tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
}
//Throw summary if any validation failed
@@ -297,13 +312,13 @@ const steps = [
}
},
- //Standards tab
+ //Batch Upload tab
{
- description: 'Standards tab title text, size, color, and background color',
+ description: 'Batch Upload tab title text, size, color, and background color',
action: async () => {
- const multipleChecks = 'Standards tab title';
+ const multipleChecks = 'Batch Upload tab title';
- const element = await driver.findElement(By.linkText('Standards'));
+ const element = await driver.findElement(By.linkText('Batch Upload'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
@@ -312,85 +327,42 @@ const steps = [
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
- //Tool-tip lives on the parent ; Bootstrap moves "title" into "data-original-title" and blanks "title"
- const tooltipHost = await element.findElement(By.xpath('./parent::li'));
- const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title'));
- const elementTitleFont = await element.getCssValue('font-family');
- const elementTitleSize = await element.getCssValue('font-size');
- const elementTitleColor = await element.getCssValue('color');
- const elementTitleBgColor = await element.getCssValue('background-color');
-
//Track all errors
const errors = [];
//element text
- if (elementText === 'Standards') {
- console.log('Passed: Standards tab title text matched as expected');
+ if (elementText === 'Batch Upload') {
+ console.log('Passed: Batch Upload tab title text matched as expected');
} else {
- errors.push(`Expected: "Standards"; Actual: "${elementText}"`);
+ errors.push(`Expected: "Batch Upload"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
- console.log('Passed: Standards tab title font-family matched as expected');
+ console.log('Passed: Batch Upload tab title font-family matched as expected');
} else {
- errors.push(`Expected: Standards tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
+ errors.push(`Expected: Batch Upload tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
- console.log('Passed: Standards tab title text font-size matched as expected');
+ console.log('Passed: Batch Upload tab title text font-size matched as expected');
} else {
- errors.push(`Expected: Standards tab title text font-size "15px"; Actual: "${elementSize}"`);
+ errors.push(`Expected: Batch Upload tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(182, 186, 181, 1)') {
- console.log('Passed: Standards tab title text color matched as expected');
+ console.log('Passed: Batch Upload tab title text color matched as expected');
} else {
- errors.push(`Expected: Standards tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
+ errors.push(`Expected: Batch Upload tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
- console.log('Passed: Standards tab title background color matched as expected');
+ console.log('Passed: Batch Upload tab title background color matched as expected');
} else {
- errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
- }
-
- //element tool-tip text
- if (elementTitle === 'Browse standards and align content using specific standards') {
- console.log('Passed: Standards tab tool-tip text matched as expected');
- } else {
- errors.push(`Expected: Standards tab tool-tip "Browse standards and align content using specific standards"; Actual: "${elementTitle}"`);
- }
-
- //element tool-tip font
- if (elementTitleFont === 'Poppins, sans-serif') {
- console.log('Passed: Standards tab tool-tip font-family matched as expected');
- } else {
- errors.push(`Expected: Standards tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`);
- }
-
- //element tool-tip size
- if (elementTitleSize === '15px') {
- console.log('Passed: Standards tab tool-tip text font-size matched as expected');
- } else {
- errors.push(`Expected: Standards tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`);
- }
-
- //element tool-tip color
- if (elementTitleColor === 'rgba(182, 186, 181, 1)') {
- console.log('Passed: Standards tab tool-tip text color matched as expected');
- } else {
- errors.push(`Expected: Standards tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`);
- }
-
- //element tool-tip background color
- if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
- console.log('Passed: Standards tab tool-tip background color matched as expected');
- } else {
- errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
+ errors.push(`Expected: Batch Upload tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
//Throw summary if any validation failed
@@ -406,13 +378,13 @@ const steps = [
}
},
- //AutoAlign tab
+ //Import Alignments tab
{
- description: 'AutoAlign tab title text, size, color, and background color',
+ description: 'Import Alignments tab title text, size, color, and background color',
action: async () => {
- const multipleChecks = 'AutoAlign tab title';
+ const multipleChecks = 'Import Alignments tab title';
- const element = await driver.findElement(By.linkText('AutoAlign'));
+ const element = await driver.findElement(By.linkText('Import Alignments'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
@@ -421,85 +393,100 @@ const steps = [
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
- //Tool-tip lives on the parent ; Bootstrap moves "title" into "data-original-title" and blanks "title"
- const tooltipHost = await element.findElement(By.xpath('./parent::li'));
- const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title'));
- const elementTitleFont = await element.getCssValue('font-family');
- const elementTitleSize = await element.getCssValue('font-size');
- const elementTitleColor = await element.getCssValue('color');
- const elementTitleBgColor = await element.getCssValue('background-color');
-
//Track all errors
const errors = [];
//element text
- if (elementText === 'AutoAlign') {
- console.log('Passed: AutoAlign tab title text matched as expected');
+ if (elementText === 'Import Alignments') {
+ console.log('Passed: Import Alignments tab title text matched as expected');
} else {
- errors.push(`Expected: "AutoAlign"; Actual: "${elementText}"`);
+ errors.push(`Expected: "Import Alignments"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
- console.log('Passed: AutoAlign tab title font-family matched as expected');
+ console.log('Passed: Import Alignments tab title font-family matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
+ errors.push(`Expected: Import Alignments tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
- console.log('Passed: AutoAlign tab title text font-size matched as expected');
+ console.log('Passed: Import Alignments tab title text font-size matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab title text font-size "15px"; Actual: "${elementSize}"`);
+ errors.push(`Expected: Import Alignments tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(182, 186, 181, 1)') {
- console.log('Passed: AutoAlign tab title text color matched as expected');
+ console.log('Passed: Import Alignments tab title text color matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
+ errors.push(`Expected: Import Alignments tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
- console.log('Passed: AutoAlign tab title background color matched as expected');
+ console.log('Passed: Import Alignments tab title background color matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
+ errors.push(`Expected: Import Alignments tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
- //element tool-tip text
- if (elementTitle === 'AutoAlign a Content Set') {
- console.log('Passed: AutoAlign tab tool-tip text matched as expected');
+ //Throw summary if any validation failed
+ if (errors.length > 0) {
+ //Add summary line only when multiple checks failed
+ if (errors.length > 1) {
+ errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
+ }
+
+ //Throw collected messages — catch() will prefix with "FAILED:"
+ throw new Error(errors.join('\n'));
+ }
+ }
+ },
+
+ //Widget sub-title
+ {
+ description: 'Widget sub-title text, size, and color',
+ action: async () => {
+ const multipleChecks = 'Widget sub-title';
+
+ const element = await driver.findElement(By.css('.chooser-intro'));
+
+ //Get text, font, size, and color
+ const elementText = await element.getText();
+ const elementFont = await element.getCssValue('font-family');
+ const elementSize = await element.getCssValue('font-size');
+ const elementColor = await element.getCssValue('color');
+
+ //Track all errors
+ const errors = [];
+
+ //text
+ if (elementText === `Choose how you'd like to add content to the system`) {
+ console.log('Passed: Widget sub-title text matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab tool-tip "AutoAlign a Content Set"; Actual: "${elementTitle}"`);
+ errors.push(`Expected: "Choose how you'd like to add content to the system"; Actual: "${elementText}"`);
}
- //element tool-tip font
- if (elementTitleFont === 'Poppins, sans-serif') {
- console.log('Passed: AutoAlign tab tool-tip font-family matched as expected');
+ //font
+ if (elementFont === 'Poppins, sans-serif') {
+ console.log('Passed: Widget sub-title font-family matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`);
+ errors.push(`Expected: Widget sub-title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
- //element tool-tip size
- if (elementTitleSize === '15px') {
- console.log('Passed: AutoAlign tab tool-tip text font-size matched as expected');
+ //size
+ if (elementSize === '13px') {
+ console.log('Passed: Widget sub-title text font-size matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`);
+ errors.push(`Expected: Widget sub-title text font-size "13px"; Actual: "${elementSize}"`);
}
- //element tool-tip color
- if (elementTitleColor === 'rgba(182, 186, 181, 1)') {
- console.log('Passed: AutoAlign tab tool-tip text color matched as expected');
+ //color
+ if (elementColor === 'rgba(40, 39, 90, 1)') {
+ console.log('Passed: Widget sub-title text color matched as expected');
} else {
- errors.push(`Expected: AutoAlign tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`);
- }
-
- //element tool-tip background color
- if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
- console.log('Passed: AutoAlign tab tool-tip background color matched as expected');
- } else {
- errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
+ errors.push(`Expected: Widget sub-title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`);
}
//Throw summary if any validation failed
@@ -515,6 +502,8 @@ const steps = [
}
},
+
+/*
//NEXT ACTION
{
description: 'Click AutoAlign navigation tab',
@@ -2114,7 +2103,7 @@ const steps = [
}
}
},
-
+*/
@@ -2238,18 +2227,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'uploadSubmitAResourcePageResults.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
- const screenshotDir = path.join('screenshots', 'uploadSumitAResourcePage');
+ const screenshotDir = path.join('screenshots', 'uploadSubmitAResourcePage');
if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true });
}
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('uploadSubmitAResourcePageResults.xlsx')) {
- fs.unlinkSync('uploadSubmitAResourcePageResults.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -2330,11 +2322,11 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'uploadSubmitAResourcePageResults.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
-})();
+ })();
}
export default uploadSubmitAResourcePage;
diff --git a/tests/correlationsDashboard.js b/tests/correlationsDashboard.js
index 21030cd..c86b695 100644
--- a/tests/correlationsDashboard.js
+++ b/tests/correlationsDashboard.js
@@ -5549,6 +5549,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
+const resultsFile = path.join('results', 'correlationsDashboard.xlsx');
+
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'correlationsDashboard');
@@ -5558,9 +5560,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
- if (fs.existsSync('correlationsDashboard.xlsx')) {
- fs.unlinkSync('correlationsDashboard.xlsx');
+ if (fs.existsSync(resultsFile)) {
+ fs.unlinkSync(resultsFile);
}
+ fs.mkdirSync('results', { recursive: true });
};
try {
@@ -5642,7 +5645,7 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'correlationsDashboard.xlsx');
+ XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}