Updated overall test case result
This commit is contained in:
@@ -4,7 +4,7 @@ import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const ExACT_landingPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script - Landing Page: Initiated</h2>');
|
||||
res.send('<h2>ExACT Automated Test Script - ExACT Landing Page: Initiated</h2>');
|
||||
(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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user