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

@@ -2238,6 +2238,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'alignAutoAlignPageResults.xlsx');
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignAutoAlignPage');
@@ -2247,9 +2249,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
if (fs.existsSync('alignAutoAlignPageResults.xlsx')) {
fs.unlinkSync('alignAutoAlignPageResults.xlsx');
if (fs.existsSync(resultsFile)) {
fs.unlinkSync(resultsFile);
}
fs.mkdirSync('results', { recursive: true });
};
try {
@@ -2330,11 +2333,11 @@ try {
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'alignAutoAlignPageResults.xlsx');
XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
})();
})();
}
export default alignAutoAlignPage;

View File

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

View File

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