Moved Correlation Dashboard script

This commit is contained in:
jhuerta
2026-11-06 09:53:28 -08:00
parent 57e89b6b53
commit 25c94ebc5e
4 changed files with 13 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ import exactLandingPage from './tests/exactLandingPage.js';
//import ExACT_login from './tests/ExACT_login.js'; //import ExACT_login from './tests/ExACT_login.js';
//DASHBOARDS //DASHBOARDS
import correlationsDashboard from './tests/correlationsDashboard.js'; import correlationDashboard from './tests/CorrelationDashboard/correlationDashboard.js';
import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js'; import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js';
import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js'; import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js';
@@ -65,7 +65,7 @@ app.get('/', (req, res) => {
<div style="padding:3px;"><strong><a href='/exactLandingPage' target='_blank'>ExACT Landing Page</a></strong></div> <div style="padding:3px;"><strong><a href='/exactLandingPage' target='_blank'>ExACT Landing Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1> <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='/correlationDashboard' target='_blank'>Correlation Dashboard</a></strong></div>
<!-- NEEDS UPDATE <!-- NEEDS UPDATE
<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_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div>
@@ -129,7 +129,7 @@ app.get('/', (req, res) => {
//app.get('/ExACT_login', ExACT_login); //app.get('/ExACT_login', ExACT_login);
//DASHBOARDS //DASHBOARDS
app.get('/correlationsDashboard', correlationsDashboard); app.get('/correlationDashboard', correlationDashboard);
//FRAMEWORKS //FRAMEWORKS
app.get('/frameworkManagementPage', frameworkManagementPage); app.get('/frameworkManagementPage', frameworkManagementPage);

View File

@@ -4,8 +4,8 @@ import fs from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const correlationsDashboard = (req, res) => { const correlationDashboard = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Correlations Dashboard(correlationsDashboard) | Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: Correlation Dashboard(correlationDashboard) | Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -1599,6 +1599,7 @@ const steps = [
'Creating Org', 'Creating Org',
'Demo Client Standards', 'Demo Client Standards',
'Demo Standards', 'Demo Standards',
'Imports',
'New Folder', 'New Folder',
'QA Client Test Frameworks', 'QA Client Test Frameworks',
'United States Standards', 'United States Standards',
@@ -5541,7 +5542,7 @@ const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, scree
const takeScreenshot = async (driver, stepIndex, stepDescription) => { const takeScreenshot = async (driver, stepIndex, stepDescription) => {
const screenshot = await driver.takeScreenshot(); const screenshot = await driver.takeScreenshot();
const dir = path.join('screenshots', 'correlationsDashboard'); const dir = path.join('screenshots', 'correlationDashboard');
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`; const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
const screenshotPath = path.join(dir, screenshotFileName); const screenshotPath = path.join(dir, screenshotFileName);
@@ -5549,11 +5550,11 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'correlationsDashboard.xlsx'); const resultsFile = path.join('results', 'correlationDashboard.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'correlationsDashboard'); const screenshotDir = path.join('screenshots', 'correlationDashboard');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
@@ -5563,7 +5564,7 @@ const clearOldResults = () => {
if (fs.existsSync(resultsFile)) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync(resultsFile); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true }); fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -5629,11 +5630,11 @@ try {
//Check if log out was successful //Check if log out was successful
if (allStepsPassed) { if (allStepsPassed) {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('PASSED: CORRELATIONS DASHBOARD(correlationsDashboard); All test steps completed successfully'); console.log('PASSED: CORRELATION DASHBOARD(correlationDashboard); All test steps completed successfully');
testStatus = 'Passed'; testStatus = 'Passed';
} else { } else {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('FAILED: CORRELATIONS DASHBOARD(correlationsDashboard); One or more test steps failed'); console.log('FAILED: CORRELATION DASHBOARD(correlationDashboard); One or more test steps failed');
console.log('FAILED STEPS:'); console.log('FAILED STEPS:');
failedSteps.forEach(step => console.error(` ✗ ${step}`)); failedSteps.forEach(step => console.error(` ✗ ${step}`));
testStatus = 'Failed'; testStatus = 'Failed';
@@ -5652,4 +5653,4 @@ try {
})(); })();
} }
export default correlationsDashboard; export default correlationDashboard;