Cleaned up results file structure

This commit is contained in:
jhuerta
2026-10-27 14:36:03 -07:00
parent 2e3a67438e
commit a27fd65cce
6 changed files with 239 additions and 190 deletions

View File

@@ -5549,6 +5549,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'correlationsDashboard.xlsx');
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'correlationsDashboard');
@@ -5558,9 +5560,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
if (fs.existsSync('correlationsDashboard.xlsx')) {
fs.unlinkSync('correlationsDashboard.xlsx');
if (fs.existsSync(resultsFile)) {
fs.unlinkSync(resultsFile);
}
fs.mkdirSync('results', { recursive: true });
};
try {
@@ -5642,7 +5645,7 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'correlationsDashboard.xlsx');
XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}