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

@@ -4,6 +4,7 @@ import ExACT_landingPage from './tests/ExACT_landingPage.js';
//import ExACT_login from './tests/ExACT_login.js';
//Dashboard
import correlationsDashboard from './tests/correlationsDashboard.js';
import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js';
import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js';
import dashboardMyStandards from './tests/dashboardMyStandards.js';
@@ -15,6 +16,8 @@ import ExACT_editItem from './tests/ExACT_editItem.js';
//Align
import alignContentPage from './tests/Align/alignContentPage.js';
import alignStandardsPage from './tests/Align/alignContentPage.js';
import alignAutoAlignPage from './tests/Align/alignAutoAlignPage.js';
import ExACT_editItemAddConcept from './tests/ExACT_editItemAddConcept.js';
import ExACT_alignConceptsPage from './tests/ExACT_alignConceptsPage.js';
//Framework
@@ -39,6 +42,7 @@ app.get('/', (req, res) => {
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1>
<div style="padding:3px;"><strong><a href='/correlationsDashboard' target='_blank'>Correlations Dashboard</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div>
<div style="padding:3px;"><strong><a href='/dashboardMyStandards' target='_blank'>My Standards Widget</a></strong></div>
<div style="padding:3px;"><strong><a href='/myStandardsSearchAlignedContent' target='_blank'>My Standards Search - Aligned Content</a></strong></div>
@@ -49,13 +53,16 @@ app.get('/', (req, res) => {
<div style="padding:3px;"><strong><a href='/ExACT_editItem' target='_blank'>Edit Item</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">ALIGN</h1>
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Align Content Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Content Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Standards Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignAutoAlignPage' target='_blank'>AutoAlign Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_editItemAddConcept' target='_blank'>Align - Edit Content and Align Concept</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Align Standards Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_alignConceptsPage' target='_blank'>Align Concepts Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">FRAMEWORKS</h1>
<div style="padding:3px;"><strong><a href='/frameworkManagementPage' target='_blank'>Framework Management Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishingPage' target='_blank'>Framework Publishing Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishFrameworkDIV' target='_blank'>Publish Framework DIV</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkFrameworkGroupsDIV' target='_blank'>Framework Groups DIV</a></strong></div>
@@ -84,6 +91,8 @@ app.get('/', (req, res) => {
//Align
app.get('/alignContentPage', alignContentPage);
app.get('/alignStandardsPage', alignStandardsPage);
app.get('/alignAutoAlignPage', alignAutoAlignPage);
app.get('/ExACT_editItemAddConcept', ExACT_editItemAddConcept);
app.get('/ExACT_alignConceptsPage', ExACT_alignConceptsPage);
//Framework

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(

View File

@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
import path from 'path';
const alignStandardsPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script - Align Standards Page(alignStandardsPage): Initiated</h2>');
res.send('<h2>ExACT Automated Test Script: Align - Standards Page(alignStandardsPage): 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 STANDARDS PAGE |<-------------');
console.log('------------->| ALIGN - STANDARDS 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(
@@ -517,16 +517,16 @@ const steps = [
//NEXT ACTION
{
description: 'Click Standards navigation link',
description: 'Click Standards tab',
action: async () => {
await driver.findElement(By.linkText('Standards')).click();
console.log('----->| NEXT ACTION: Clicked Standards navigation link');
console.log('----->| NEXT ACTION: Clicked Standards tab');
//Wait for page readyState
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, 'Standards page did not fully load within 30 seconds');
//Wait until the element exists in the DOM
const browseStandardsTitle = await driver.wait(