From 300708a85a8ba0674727192ffc1da929ee2c774c Mon Sep 17 00:00:00 2001 From: jhuerta Date: Tue, 27 Oct 2026 16:17:06 -0700 Subject: [PATCH] Completed Upload Submit A Resource Page script --- tests/Upload/uploadSubmitAResourcePage.js | 1563 ++------------------- 1 file changed, 104 insertions(+), 1459 deletions(-) diff --git a/tests/Upload/uploadSubmitAResourcePage.js b/tests/Upload/uploadSubmitAResourcePage.js index 678bb58..48e5d86 100644 --- a/tests/Upload/uploadSubmitAResourcePage.js +++ b/tests/Upload/uploadSubmitAResourcePage.js @@ -502,129 +502,57 @@ const steps = [ } }, - -/* - //NEXT ACTION + //Enter Manually header and icon { - description: 'Click AutoAlign navigation tab', + description: 'Enter Manually header and icon', action: async () => { - await driver.findElement(By.linkText('AutoAlign')).click(); - console.log('----->| NEXT ACTION: Clicked AutoAlign tab'); + const multipleChecks = 'Enter Manually header and icon'; - //Wait for page readyState - await driver.wait(async () => { - const readyState = await driver.executeScript('return document.readyState'); - return readyState === 'complete'; - }, 30000, 'AutoAlign page did not fully load within 30 seconds'); + const elementIcon = await driver.findElement(By.css('.glyphicon-pencil')); + const element = await driver.findElement(By.css('.chooser-card:nth-child(1) > h4')); - //Wait until the element exists in the DOM - const autoAlignTab = await driver.wait( - until.elementLocated(By.css('.card > h5')), - 30000 - ); - - //Wait until it becomes visible - await driver.wait( - until.elementIsVisible(autoAlignTab), - 30000 - ); - } - }, - - //Content tab - { - description: 'Content tab title text, size, color, and background color', - action: async () => { - const multipleChecks = 'Content tab title'; - - const element = await driver.findElement(By.linkText('Content')); - - //Get text, font, size, color, and background 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'); - 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'); + //Get button text, text font, text size, text color, and button color + const elementText = await element.getText(''); + const elementTextFont = await element.getCssValue('font-family'); + const elementTextSize = await element.getCssValue('font-size'); + const elementTextColor = await element.getCssValue('color'); //Track all errors const errors = []; - //element text - if (elementText === 'Content') { - console.log('Passed: Content tab title text matched as expected'); + //icon present + if (await elementIcon.isDisplayed()) { + console.log('Passed: Enter Manually pencil icon was displayed as expected'); } else { - errors.push(`Expected: "Content"; Actual: "${elementText}"`); + errors.push('Expected: Enter Manually pencil icon was not displayed'); } - //element font - if (elementFont === 'Poppins, sans-serif') { - console.log('Passed: Content tab title font-family matched as expected'); + //text + if (elementText === 'Enter Manually') { + console.log('Passed: Enter Manually text matched as expected'); } else { - errors.push(`Expected: Content tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + errors.push(`Expected: "Enter Manually"; Actual: "${elementText}"`); } - //element size - if (elementSize === '15px') { - console.log('Passed: Content tab title text font-size matched as expected'); + //font-family + if (elementTextFont === "Poppins, sans-serif") { + console.log('Passed: Enter Manually text font matched as expected'); } else { - errors.push(`Expected: Content tab title text font-size "15px"; Actual: "${elementSize}"`); + errors.push(`Expected: Enter Manually text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); } - //element color - if (elementColor === 'rgba(182, 186, 181, 1)') { - console.log('Passed: Content tab title text color matched as expected'); + //font size + if (elementTextSize === '24px') { + console.log('Passed: Enter Manually text font-size matched as expected'); } else { - errors.push(`Expected: Content tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`); + errors.push(`Expected: Enter Manually text font-size "24px"; Actual: "${elementTextSize}"`); } - //element background color - if (elementBgColor === 'rgba(0, 0, 0, 0)') { - console.log('Passed: Content tab title background color matched as expected'); + //color + if (elementTextColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: Enter Manually text color matched as expected'); } else { - errors.push(`Expected: Content tab title background color: "rgba(0, 0, 0, 0)"; 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: ECS-3171 | 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(182, 186, 181, 1)') { - console.log('Passed: Content tab tool-tip text color matched as expected'); - } else { - errors.push(`Expected: Content 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: Content tab tool-tip background color matched as expected'); - } else { - errors.push(`Expected: Content tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); + errors.push(`Expected: Enter Manually text color: "rgba(40, 39, 90, 1)"; Actual: "${elementTextColor}"`); } //Throw summary if any validation failed @@ -640,232 +568,13 @@ const steps = [ } }, - //Standards tab + //Enter Manually Select button { - description: 'Standards tab title text, size, color, and background color', + description: 'Enter Manually Select button', action: async () => { - const multipleChecks = 'Standards tab title'; + const multipleChecks = 'Enter Manually Select button'; - const element = await driver.findElement(By.linkText('Standards')); - - //Get text, font, size, color, and background 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'); - 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'); - } else { - errors.push(`Expected: "Standards"; Actual: "${elementText}"`); - } - - //element font - if (elementFont === 'Poppins, sans-serif') { - console.log('Passed: Standards tab title font-family matched as expected'); - } else { - errors.push(`Expected: Standards 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'); - } else { - errors.push(`Expected: Standards 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'); - } else { - errors.push(`Expected: Standards 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'); - } 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: ECS-3171 | 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}"`); - } - - //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')); - } - } - }, - - //AutoAlign tab - { - description: 'AutoAlign tab title text, size, color, and background color', - action: async () => { - const multipleChecks = 'AutoAlign tab title'; - - const element = await driver.findElement(By.linkText('AutoAlign')); - - //Get text, font, size, color, and background 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'); - 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'); - } else { - errors.push(`Expected: "AutoAlign"; Actual: "${elementText}"`); - } - - //element font - if (elementFont === 'Poppins, sans-serif') { - console.log('Passed: AutoAlign tab title font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign 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'); - } else { - errors.push(`Expected: AutoAlign tab title text font-size "15px"; Actual: "${elementSize}"`); - } - - //element color - if (elementColor === 'rgba(255, 255, 255, 1)') { - console.log('Passed: AutoAlign tab title text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`); - } - - //element background color - if (elementBgColor === 'rgba(40, 39, 90, 1)') { - console.log('Passed: AutoAlign tab title background color matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`); - } - - //element tool-tip text - if (elementTitle === 'AutoAlign a Content Set') { - console.log('Passed: AutoAlign tab tool-tip text matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab tool-tip "AutoAlign a Content Set"; Actual: "${elementTitle}"`); - } - - //element tool-tip font - if (elementTitleFont === 'Poppins, sans-serif') { - console.log('Passed: AutoAlign tab tool-tip font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); - } - - //element tool-tip size - if (elementTitleSize === '15px') { - console.log('Passed: AutoAlign tab tool-tip text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); - } - - //element tool-tip color - if (elementTitleColor === 'rgba(255, 255, 255, 1)') { - console.log('Passed: AutoAlign tab tool-tip text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign 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: AutoAlign tab tool-tip background color matched as expected'); - } else { - errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`); - } - - //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')); - } - } - }, - - //AutoAlign Content Set button - { - description: 'AutoAlign Content Set button', - action: async () => { - const multipleChecks = 'AutoAlign Content Set button'; - - const elementIcon = await driver.findElement(By.css('.fa-plus')); - const element = await driver.findElement(By.linkText('AutoAlign Content Set')); + const element = await driver.findElement(By.css('#chooseManualBtn')); //Get button text, text font, text size, text color, and button color const elementText = await element.getText(''); @@ -877,46 +586,39 @@ const steps = [ //Track all errors const errors = []; - //icon present - if (await elementIcon.isDisplayed()) { - console.log('Passed: AutoAlign Content Set button icon was displayed as expected'); - } else { - errors.push('Expected: AutoAlign Content Set button icon was not displayed'); - } - //text - if (elementText === 'AutoAlign Content Set') { - console.log('Passed: AutoAlign Content Set button text matched as expected'); + if (elementText === 'Select') { + console.log('Passed: Enter Manually Select button text matched as expected'); } else { - errors.push(`Expected: "AutoAlign Content Set"; Actual: "${elementText}"`); + errors.push(`Expected: Enter Manually "Select"; Actual: "${elementText}"`); } //font-family if (elementTextFont === "Poppins, sans-serif") { - console.log('Passed: AutoAlign Content Set button text font matched as expected'); + console.log('Passed: Enter Manually Select button text font matched as expected'); } else { - errors.push(`Expected: AutoAlign Content Set button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); + errors.push(`Expected: Enter Manually Select button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //font size - if (elementTextSize === '16px') { - console.log('Passed: AutoAlign Content Set button text font-size matched as expected'); + if (elementTextSize === '13px') { + console.log('Passed: Enter Manually Select button text font-size matched as expected'); } else { - errors.push(`Expected: AutoAlign Content Set button text font-size "16px"; Actual: "${elementTextSize}"`); + errors.push(`Expected: Enter Manually Select button text font-size "13px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { - console.log('Passed: AutoAlign Content Set button text color matched as expected'); + console.log('Passed: Enter Manually Select button text color matched as expected'); } else { - errors.push(`Expected: AutoAlign Content Set button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); + errors.push(`Expected: Enter Manually Select button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { - console.log('Passed: AutoAlign Content Set button background color matched as expected'); + console.log('Passed: Enter Manually Select button background color matched as expected'); } else { - errors.push(`Expected: AutoAlign Content Set button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); + errors.push(`Expected: Enter Manually Select button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed @@ -932,588 +634,57 @@ const steps = [ } }, - //AutoAlign History Widget title + //Extract from Source header and icon { - description: 'AutoAlign History Widget title text, color, and size', + description: 'Extract from Source header and icon', action: async () => { - const multipleChecks = 'AutoAlign History Widget title'; + const multipleChecks = 'Extract from Source header and icon'; - const element = await driver.findElement(By.css('.card > h5')); + const elementIcon = await driver.findElement(By.css('.chooser-icon > .glyphicon-file')); + const element = await driver.findElement(By.css('.chooser-card:nth-child(2) > h4')); - //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 === 'AutoAlign History') { - console.log('Passed: AutoAlign History Widget title matched as expected'); - } else { - errors.push(`Expected: AutoAlign History; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History Widget title font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History Widget title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '20px') { - console.log('Passed: AutoAlign History Widget title text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History Widget title text font-size "20px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(40, 39, 90, 1)') { - console.log('Passed: AutoAlign History Widget title text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History Widget 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')); - } - } - }, - - //Content Set column header - { - description: 'Content Set column header text, color, and size', - action: async () => { - const multipleChecks = 'Content Set column header'; - - const element = await driver.findElement(By.css('th:nth-child(1)')); - - //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 === 'Content Set') { - console.log('Passed: Content Set column header matched as expected'); - } else { - errors.push(`Expected: Content Set; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Content Set column header font-family matched as expected'); - } else { - errors.push(`Expected: Content Set column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Content Set column header text font-size matched as expected'); - } else { - errors.push(`Expected: Content Set column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Content Set column header text color matched as expected'); - } else { - errors.push(`Expected: Content Set column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //Submitted column header - { - description: 'Submitted column header text, color, and size', - action: async () => { - const multipleChecks = 'Submitted column header'; - - const element = await driver.findElement(By.css('th:nth-child(2)')); - - //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 === 'Submitted') { - console.log('Passed: Submitted column header matched as expected'); - } else { - errors.push(`Expected: Submitted; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Submitted column header font-family matched as expected'); - } else { - errors.push(`Expected: Submitted column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Submitted column header text font-size matched as expected'); - } else { - errors.push(`Expected: Submitted column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Submitted column header text color matched as expected'); - } else { - errors.push(`Expected: Submitted column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //Status column header - { - description: 'Status column header text, color, and size', - action: async () => { - const multipleChecks = 'Status column header'; - - const element = await driver.findElement(By.css('th:nth-child(3)')); - - //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 === 'Status') { - console.log('Passed: Status column header matched as expected'); - } else { - errors.push(`Expected: Status; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Status column header font-family matched as expected'); - } else { - errors.push(`Expected: Status column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Status column header text font-size matched as expected'); - } else { - errors.push(`Expected: Status column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Status column header text color matched as expected'); - } else { - errors.push(`Expected: Status column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //Completed column header - { - description: 'Completed column header text, color, and size', - action: async () => { - const multipleChecks = 'Completed column header'; - - const element = await driver.findElement(By.css('th:nth-child(4)')); - - //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 === 'Completed') { - console.log('Passed: Completed column header matched as expected'); - } else { - errors.push(`Expected: Completed; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Completed column header font-family matched as expected'); - } else { - errors.push(`Expected: Completed column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Completed column header text font-size matched as expected'); - } else { - errors.push(`Expected: Completed column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Completed column header text color matched as expected'); - } else { - errors.push(`Expected: Completed column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //Review column header - { - description: 'Review column header text, color, and size', - action: async () => { - const multipleChecks = 'Review column header'; - - const element = await driver.findElement(By.css('th:nth-child(5)')); - - //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 === 'Review') { - console.log('Passed: Review column header matched as expected'); - } else { - errors.push(`Expected: Review; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Review column header font-family matched as expected'); - } else { - errors.push(`Expected: Review column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Review column header text font-size matched as expected'); - } else { - errors.push(`Expected: Review column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Review column header text color matched as expected'); - } else { - errors.push(`Expected: Review column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //Remove column header - { - description: 'Remove column header text, color, and size', - action: async () => { - const multipleChecks = 'Remove column header'; - - const element = await driver.findElement(By.css('th:nth-child(6)')); - - //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 === 'Remove') { - console.log('Passed: Remove column header matched as expected'); - } else { - errors.push(`Expected: Remove; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: Remove column header font-family matched as expected'); - } else { - errors.push(`Expected: Remove column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: Remove column header text font-size matched as expected'); - } else { - errors.push(`Expected: Remove column header text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: Remove column header text color matched as expected'); - } else { - errors.push(`Expected: Remove column header text color "rgba(33, 37, 41, 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')); - } - } - }, - - //AutoAlign History - Content Set Row 1 label - { - description: 'AutoAlign History - Content Set Row 1 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Content Set Row 1 label'; - - const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(1) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301'; - - //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 === 'create me') { - console.log('Passed: AutoAlign History - Content Set Row 1 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 1 label to be: "create me"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Content Set Row 1 label href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 1 label href to be: "https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Content Set Row 1 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Content Set Row 1 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Content Set Row 1 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 1 label text color "rgba(73, 80, 87, 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')); - } - } - }, - - //AutoAlign History - Submitted Row 1 label - { - description: 'AutoAlign History - Submitted Row 1 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Submitted Row 1 label'; - - const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(2)')); - - //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 === 'Fri, Feb 27 2026 10:04AM PST') { - console.log('Passed: AutoAlign History - Submitted Row 1 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 1 label to be: "Fri, Feb 27 2026 10:04AM PST"; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Submitted Row 1 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Submitted Row 1 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: AutoAlign History - Submitted Row 1 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 1 label text color "rgba(33, 37, 41, 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')); - } - } - }, - - //AutoAlign History - Status Row 1 label - { - description: 'AutoAlign History - Status Row 1 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Status Row 1 label'; - - const elementicon = await driver.findElement(By.css('tr:nth-child(2) .glyphicon')); - const element = await driver.findElement(By.css('tr:nth-child(2) .text-success')); - - //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'); + //Get button text, text font, text size, text color, and button color + const elementText = await element.getText(''); + const elementTextFont = await element.getCssValue('font-family'); + const elementTextSize = await element.getCssValue('font-size'); + const elementTextColor = await element.getCssValue('color'); //Track all errors const errors = []; //icon present - if (await elementicon.isDisplayed()) { - console.log('Passed: AutoAlign History - Status Row 1 label icon was displayed as expected'); + if (await elementIcon.isDisplayed()) { + console.log('Passed: Extract from Source file icon was displayed as expected'); } else { - errors.push('Expected: AutoAlign History - Status Row 1 label icon was not displayed'); + errors.push('Expected: Extract from Source file icon was not displayed'); } //text - if (elementText === 'Completed') { - console.log('Passed: AutoAlign History - Status Row 1 label matched as expected'); + if (elementText === 'Extract from Source') { + console.log('Passed: Extract from Source text matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Status Row 1 label to be: "Completed"; Actual: "${elementText}"`); + errors.push(`Expected: "Extract from Source"; Actual: "${elementText}"`); } - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Status Row 1 label font-family matched as expected'); + //font-family + if (elementTextFont === "Poppins, sans-serif") { + console.log('Passed: Extract from Source text font matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Status Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + errors.push(`Expected: Extract from Source text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); } - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Status Row 1 label text font-size matched as expected'); + //font size + if (elementTextSize === '24px') { + console.log('Passed: Extract from Source text font-size matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Status Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + errors.push(`Expected: Extract from Source text font-size "24px"; Actual: "${elementTextSize}"`); } //color - if (elementColor === 'rgba(40, 167, 69, 1)') { - console.log('Passed: AutoAlign History - Status Row 1 label text color matched as expected'); + if (elementTextColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: Extract from Source text color matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Status Row 1 label text color "rgba(40, 167, 69, 1)"; Actual: "${elementColor}"`); + errors.push(`Expected: Extract from Source text color: "rgba(40, 39, 90, 1)"; Actual: "${elementTextColor}"`); } //Throw summary if any validation failed @@ -1529,49 +700,57 @@ const steps = [ } }, - //AutoAlign History - Completed Row 1 label + //Extract from Source Select button { - description: 'AutoAlign History - Completed Row 1 label text, color, and size', + description: 'Extract from Source Select button', action: async () => { - const multipleChecks = 'AutoAlign History - Completed Row 1 label'; + const multipleChecks = 'Extract from Source Select button'; - const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(4)')); + const element = await driver.findElement(By.css('#chooseExtractBtn')); - //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'); + //Get button text, text font, text size, text color, and button color + const elementText = await element.getText(''); + const elementTextFont = await element.getCssValue('font-family'); + const elementTextSize = await element.getCssValue('font-size'); + const elementTextColor = await element.getCssValue('color'); + const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text - if (elementText === 'Fri, Feb 27 2026 10:05AM PST') { - console.log('Passed: AutoAlign History - Completed Row 1 label matched as expected'); + if (elementText === 'Select') { + console.log('Passed: Extract from Source Select button text matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Completed Row 1 label to be: "Fri, Feb 27 2026 10:05AM PST"; Actual: "${elementText}"`); + errors.push(`Expected: Extract from Source "Select"; Actual: "${elementText}"`); } - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Completed Row 1 label font-family matched as expected'); + //font-family + if (elementTextFont === "Poppins, sans-serif") { + console.log('Passed: Extract from Source Select button text font matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Completed Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + errors.push(`Expected: Extract from Source Select button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); } - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Completed Row 1 label text font-size matched as expected'); + //font size + if (elementTextSize === '13px') { + console.log('Passed: Extract from Source Select button text font-size matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Completed Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + errors.push(`Expected: Extract from Source Select button text font-size "13px"; Actual: "${elementTextSize}"`); } //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: AutoAlign History - Completed Row 1 label text color matched as expected'); + if (elementTextColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: Extract from Source Select button text color matched as expected'); } else { - errors.push(`Expected: AutoAlign History - Completed Row 1 label text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + errors.push(`Expected: Extract from Source Select button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); + } + + //button color + if (elementButtonColor === 'rgba(48, 200, 172, 1)') { + console.log('Passed: Extract from Source Select button background color matched as expected'); + } else { + errors.push(`Expected: Extract from Source Select button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed @@ -1587,540 +766,6 @@ const steps = [ } }, - //AutoAlign History - Review Row 1 icon - { - description: 'AutoAlign History - Review Row 1 icon title, and url', - action: async () => { - const multipleChecks = 'AutoAlign History - Review Row 1 icon title, and url'; - - const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(2) > td:nth-child(5) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/autoalign_review.php?id=13'; - - //Get text, font, size, and color - const elementText = await element.getDomAttribute('title'); - 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 === 'Review Alignments') { - console.log('Passed: AutoAlign History - Review icon Row 1 title matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 1 title to be: "Review Alignments"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Review icon Row 1 href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 1 href to be: "https://correlation.edgate.com/exact/autoalign_review.php?id=13"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Review icon Row 1 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Review icon Row 1 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Review icon Row 1 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 1 label text color "rgba(73, 80, 87, 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')); - } - } - }, - - //AutoAlign History - Remove Row 1 icon - { - description: 'AutoAlign History - Remove Row 1 icon title, and url', - action: async () => { - const multipleChecks = 'AutoAlign History - Remove Row 1 icon title, and url'; - - const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(2) > td:nth-child(6) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/autoalign.php?delid=13'; - - //Get text, font, size, and color - const elementText = await element.getDomAttribute('title'); - 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 === 'Remove from list') { - console.log('Passed: AutoAlign History - Remove icon Row 1 title matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 1 title to be: "Remove from list"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Remove icon Row 1 href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 1 href to be: "https://correlation.edgate.com/exact/autoalign.php?delid=13"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Remove icon Row 1 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Remove icon Row 1 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Remove icon Row 1 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 1 label text color "rgba(73, 80, 87, 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')); - } - } - }, - - //AutoAlign History - Content Set Row 2 label - { - description: 'AutoAlign History - Content Set Row 2 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Content Set Row 2 label'; - - const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(1) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301'; - - //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 === 'create me') { - console.log('Passed: AutoAlign History - Content Set Row 2 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 2 label to be: "create me"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Content Set Row 2 label href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 2 label href to be: "https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Content Set Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Content Set Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Content Set Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Content Set Row 2 label text color "rgba(73, 80, 87, 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')); - } - } - }, - - //AutoAlign History - Submitted Row 2 label - { - description: 'AutoAlign History - Submitted Row 2 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Submitted Row 2 label'; - - const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(2)')); - - //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 === 'Wed, Feb 25 2026 07:16PM PST') { - console.log('Passed: AutoAlign History - Submitted Row 2 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 2 to be: "Wed, Feb 25 2026 07:16PM PST"; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Submitted Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Submitted Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: AutoAlign History - Submitted Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Submitted Row 2 label text color "rgba(33, 37, 41, 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')); - } - } - }, - - //AutoAlign History - Status Row 2 label - { - description: 'AutoAlign History - Status Row 2 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Status Row 2 label'; - - const elementicon = await driver.findElement(By.css('tr:nth-child(3) .glyphicon')); - const element = await driver.findElement(By.css('tr:nth-child(3) .text-success')); - - //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 = []; - - //icon present - if (await elementicon.isDisplayed()) { - console.log('Passed: AutoAlign History - Status Row 2 label icon was displayed as expected'); - } else { - errors.push('Expected: AutoAlign History - Status Row 2 label icon was not displayed'); - } - - //text - if (elementText === 'Completed') { - console.log('Passed: AutoAlign History - Status Row 2 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Status Row 2 to be: "Completed"; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Status Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Status Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Status Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Status Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(40, 167, 69, 1)') { - console.log('Passed: AutoAlign History - Status Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Status Row 2 label text color "rgba(40, 167, 69, 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')); - } - } - }, - - //AutoAlign History - Completed Row 2 label - { - description: 'AutoAlign History - Completed Row 2 label text, color, and size', - action: async () => { - const multipleChecks = 'AutoAlign History - Completed Row 2 label'; - - const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(4)')); - - //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 === 'Wed, Feb 25 2026 07:20PM PST') { - console.log('Passed: AutoAlign History - Completed Row 2 label matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Completed Row 2 label to be: "Wed, Feb 25 2026 07:20PM PST"; Actual: "${elementText}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Completed Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Completed Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Completed Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Completed Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(33, 37, 41, 1)') { - console.log('Passed: AutoAlign History - Completed Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Completed Row 2 label text color "rgba(33, 37, 41, 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')); - } - } - }, - - //AutoAlign History - Review Row 2 icon - { - description: 'AutoAlign History - Review Row 2 icon title, and url', - action: async () => { - const multipleChecks = 'AutoAlign History - Review Row 2 icon title, and url'; - - const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(3) > td:nth-child(5) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/autoalign_review.php?id=12'; - - //Get text, font, size, and color - const elementText = await element.getDomAttribute('title'); - 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 === 'Review Alignments') { - console.log('Passed: AutoAlign History - Review icon Row 2 title matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 2 title "Review Alignments"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Review icon Row 2 href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 2 href to be: "https://correlation.edgate.com/exact/autoalign_review.php?id=12"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Review icon Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Review icon Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Review icon Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Review icon Row 2 label text color "rgba(73, 80, 87, 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')); - } - } - }, - - //AutoAlign History - Remove Row 2 icon - { - description: 'AutoAlign History - Remove Row 2 icon title, and url', - action: async () => { - const multipleChecks = 'AutoAlign History - Remove Row 2 icon title, and url'; - - const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(3) > td:nth-child(6) > a')); - const expectedHref = 'https://correlation.edgate.com/exact/autoalign.php?delid=12'; - - //Get text, font, size, and color - const elementText = await element.getDomAttribute('title'); - 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 === 'Remove from list') { - console.log('Passed: AutoAlign History - Remove icon Row 2 title matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 2 "Remove from list"; Actual: "${elementText}"`); - } - - //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: AutoAlign History - Remove icon Row 2 href matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 2 href to be: "https://correlation.edgate.com/exact/autoalign.php?delid=12"; actual: "${actualHref}"`); - } - - //font - if (elementFont === `Poppins, sans-serif`) { - console.log('Passed: AutoAlign History - Remove icon Row 2 label font-family matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); - } - - //size - if (elementSize === '14.3px') { - console.log('Passed: AutoAlign History - Remove icon Row 2 label text font-size matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); - } - - //color - if (elementColor === 'rgba(73, 80, 87, 1)') { - console.log('Passed: AutoAlign History - Remove icon Row 2 label text color matched as expected'); - } else { - errors.push(`Expected: AutoAlign History - Remove icon Row 2 label text color "rgba(73, 80, 87, 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')); - } - } - }, -*/ - - - - - - - - - - - - - - - - - //FOOTER //EdGate Copyright Logo {