Moved Correlation Dashboard script
This commit is contained in:
@@ -4,8 +4,8 @@ import fs from 'fs';
|
||||
import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const correlationsDashboard = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Correlations Dashboard(correlationsDashboard) | Initiated</h2>');
|
||||
const correlationDashboard = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Correlation Dashboard(correlationDashboard) | Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -1599,6 +1599,7 @@ const steps = [
|
||||
'Creating Org',
|
||||
'Demo Client Standards',
|
||||
'Demo Standards',
|
||||
'Imports',
|
||||
'New Folder',
|
||||
'QA Client Test Frameworks',
|
||||
'United States Standards',
|
||||
@@ -5541,7 +5542,7 @@ const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, scree
|
||||
const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
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 screenshotPath = path.join(dir, screenshotFileName);
|
||||
@@ -5549,11 +5550,11 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'correlationsDashboard.xlsx');
|
||||
const resultsFile = path.join('results', 'correlationDashboard.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'correlationsDashboard');
|
||||
const screenshotDir = path.join('screenshots', 'correlationDashboard');
|
||||
if (fs.existsSync(screenshotDir)) {
|
||||
fs.rmSync(screenshotDir, { recursive: true, force: true });
|
||||
}
|
||||
@@ -5563,7 +5564,7 @@ const clearOldResults = () => {
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -5629,11 +5630,11 @@ try {
|
||||
//Check if log out was successful
|
||||
if (allStepsPassed) {
|
||||
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';
|
||||
} else {
|
||||
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:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -5652,4 +5653,4 @@ try {
|
||||
})();
|
||||
}
|
||||
|
||||
export default correlationsDashboard;
|
||||
export default correlationDashboard;
|
||||
Reference in New Issue
Block a user