diff --git a/tests/ExACT_landingPage.js b/tests/ExACT_landingPage.js index a1de9d2..643317a 100644 --- a/tests/ExACT_landingPage.js +++ b/tests/ExACT_landingPage.js @@ -4,7 +4,7 @@ import XLSX from 'xlsx'; import path from 'path'; const ExACT_landingPage = (req, res) => { - res.send('

ExACT Automated Test Script - Landing Page: Initiated

'); + res.send('

ExACT Automated Test Script - ExACT Landing Page: Initiated

'); (async function example() { let driver = await new Builder().forBrowser('chrome').build(); let testStatus = 'Failed'; @@ -517,6 +517,8 @@ try { // Log test start time worksheet = logStep(worksheet, 'Test Start', 'Started', '', startTime, ''); + let allStepsPassed = true; + for (const step of steps) { const stepIndex = steps.indexOf(step) + 1; const timestamp = new Date().toISOString(); @@ -530,17 +532,18 @@ try { worksheet = logStep(worksheet, step.description, 'Failed', stepIndex, timestamp, screenshotPath); console.error(`Step ${stepIndex} FAILED: ${error.message}`); testStatus = 'Failed'; + allStepsPassed = false; } } //Script completed const expectedEdGateCopyright = await driver.wait(until.elementLocated(By.css('.logincopyright > img')), 5000).catch(() => false); - if (expectedEdGateCopyright) { - console.log('PASSED: Script completed'); + if (expectedEdGateCopyright && allStepsPassed) { + console.log('PASSED: ExACT Landing Page - All test steps completed successfully'); testStatus = 'Passed'; } else { - console.log('FAILED: Script completed'); + console.log('FAILED: ExACT Landing Page - One or more test steps did not pass'); testStatus = 'Failed'; }