Cleaned up scripts

This commit is contained in:
jhuerta
2026-10-23 18:17:42 -07:00
parent 77b04d695b
commit 1f9e03c530
3 changed files with 33 additions and 24 deletions

View File

@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
import path from 'path';
const alignContentPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Align Content Page(alignContentPage); Initiated</h2>');
res.send('<h2>ExACT Automated Test Script: Align - Content Page(alignContentPage); Initiated</h2>');
(async function example() {
let driver = await new Builder()
.forBrowser('chrome')
@@ -32,7 +32,7 @@ const steps = [
action: async () => {
const multipleChecks = 'Log In';
console.log('------------->| ALIGN CONTENT PAGE |<-------------');
console.log('------------->| ALIGN - CONTENT PAGE |<-------------');
const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -172,7 +172,7 @@ const steps = [
await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
}, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM
const contentTab = await driver.wait(
@@ -244,9 +244,9 @@ const steps = [
//element background color
if (elementBgColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Content tab title active background color matched as expected');
console.log('Passed: Content tab title background color matched as expected');
} else {
errors.push(`Expected: Content tab title active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
errors.push(`Expected: Content tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
}
//element tool-tip text
@@ -279,9 +279,9 @@ const steps = [
//element tool-tip background color
if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Content tab tool-tip active background color matched as expected');
console.log('Passed: Content tab tool-tip background color matched as expected');
} else {
errors.push(`Expected: Content tab tool-tip active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
errors.push(`Expected: Content tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
}
//Throw summary if any validation failed
@@ -353,9 +353,9 @@ const steps = [
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Standards tab title dimmed background color matched as expected');
console.log('Passed: Standards tab title background color matched as expected');
} else {
errors.push(`Expected: Standards tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
//element tool-tip text
@@ -388,9 +388,9 @@ const steps = [
//element tool-tip background color
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Standards tab tool-tip active background color matched as expected');
console.log('Passed: Standards tab tool-tip background color matched as expected');
} else {
errors.push(`Expected: Standards tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
}
//Throw summary if any validation failed
@@ -462,9 +462,9 @@ const steps = [
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: AutoAlign tab title dimmed background color matched as expected');
console.log('Passed: AutoAlign tab title background color matched as expected');
} else {
errors.push(`Expected: AutoAlign tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
errors.push(`Expected: AutoAlign tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
//element tool-tip text
@@ -497,9 +497,9 @@ const steps = [
//element tool-tip background color
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: AutoAlign tab tool-tip active background color matched as expected');
console.log('Passed: AutoAlign tab tool-tip background color matched as expected');
} else {
errors.push(`Expected: AutoAlign tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
}
//Throw summary if any validation failed
@@ -740,7 +740,7 @@ const steps = [
await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
}, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM
const element = await driver.wait(