Cleaned up results file structure
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user