Cleaned file structure
This commit is contained in:
Binary file not shown.
Binary file not shown.
6
index.js
6
index.js
@@ -1,6 +1,6 @@
|
||||
import express from 'express';
|
||||
|
||||
import ExACT_landingPage from './tests/ExACT_landingPage.js';
|
||||
import exactLandingPage from './tests/exactLandingPage.js';
|
||||
//import ExACT_login from './tests/ExACT_login.js';
|
||||
|
||||
//DASHBOARDS
|
||||
@@ -47,7 +47,7 @@ app.get('/', (req, res) => {
|
||||
<div style="text-align:center; color:#001; font-size:15px; ">(Click the corresponding link to execute the desired script)</div>
|
||||
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">EDGATE LANDING PAGE</h1>
|
||||
<div style="padding:3px;"><strong><a href='/ExACT_landingPage' target='_blank'>ExACT Landing Page</a></strong></div>
|
||||
<div style="padding:3px;"><strong><a href='/exactLandingPage' target='_blank'>ExACT Landing Page</a></strong></div>
|
||||
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1>
|
||||
<div style="padding:3px;"><strong><a href='/correlationsDashboard' target='_blank'>Correlations Dashboard</a></strong></div>
|
||||
@@ -93,7 +93,7 @@ app.get('/', (req, res) => {
|
||||
})
|
||||
|
||||
//EXACT LANDING
|
||||
app.get('/ExACT_landingPage', ExACT_landingPage);
|
||||
app.get('/exactLandingPage', exactLandingPage);
|
||||
//Login
|
||||
//app.get('/ExACT_login', ExACT_login);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
results/alignStandardsPageResults.xlsx
Normal file
BIN
results/alignStandardsPageResults.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
results/uploadSubmitAResourcePageResults.xlsx
Normal file
BIN
results/uploadSubmitAResourcePageResults.xlsx
Normal file
Binary file not shown.
@@ -5,8 +5,8 @@ import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
import { error } from 'console';
|
||||
|
||||
const ExACT_landingPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: EGATE LANDING PAGE: ExACT Login Page (ExACT_landingPage) | Initiated</h2>');
|
||||
const exactLandingPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: ExACT Landing Page(exactLandingPage) | Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -1189,31 +1189,31 @@ const steps = [
|
||||
const errors = [];
|
||||
|
||||
//text
|
||||
if (elementText === 'Already Have an account? Sign In') {
|
||||
console.log('Passed: Already Have an account? Sign In text matched as expected');
|
||||
if (elementText === 'Already have an account? Sign In') {
|
||||
console.log('Passed: Already have an account? Sign In text matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: "Already Have an account? Sign In"; Actual: "${elementText}"`);
|
||||
errors.push(`Expected: "Already have an account? Sign In"; Actual: "${elementText}"`);
|
||||
}
|
||||
|
||||
//font-family
|
||||
if (elementFont === "Poppins, sans-serif") {
|
||||
console.log('Passed: Already Have an account? Sign In text font matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In text font matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In text font "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||
errors.push(`Expected: Already have an account? Sign In text font "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||
}
|
||||
|
||||
//color
|
||||
if (elementColor === 'rgba(32, 32, 32, 1)') {
|
||||
console.log('Passed: Already Have an account? Sign In color matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In color "rgba(32, 32, 32, 1)"; Actual: "${elementColor}"`);
|
||||
errors.push(`Expected: Already have an account? Sign In color "rgba(32, 32, 32, 1)"; Actual: "${elementColor}"`);
|
||||
}
|
||||
|
||||
//font size
|
||||
if (elementSize === '12px') {
|
||||
console.log('Passed: Already Have an account? Sign In text font-size matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In text font-size matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In text font-size "12px"; Actual: "${elementSize}"`);
|
||||
errors.push(`Expected: Already have an account? Sign In text font-size "12px"; Actual: "${elementSize}"`);
|
||||
}
|
||||
|
||||
//Throw summary if any validation failed
|
||||
@@ -4817,6 +4817,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'exactLandingPageResults.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'landingPage');
|
||||
@@ -4826,9 +4828,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('landingPageResults.xlsx')) {
|
||||
fs.unlinkSync('landingPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -4889,11 +4892,11 @@ try {
|
||||
|
||||
if (allStepsPassed) {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('PASSED: EDGATE LANDING PAGE - ExACT Landing Page (ExACT_landingPage); All test steps completed successfully');
|
||||
console.log('PASSED: ExACT Landing Page(exactLandingPage); All test steps completed successfully');
|
||||
testStatus = 'Passed';
|
||||
} else {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('FAILED: EDGATE LANDING PAGE - ExACT Landing Page (ExACT_landingPage); One or more test steps failed');
|
||||
console.log('FAILED: ExACT Landing Page(exactLandingPage); One or more test steps failed');
|
||||
console.log('FAILED STEPS:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -4905,11 +4908,11 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'landingPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
export default ExACT_landingPage;
|
||||
export default exactLandingPage;
|
||||
Reference in New Issue
Block a user