Compare commits

..

36 Commits

Author SHA1 Message Date
jhuerta
d42e41d9aa Added stand alone logging 2026-11-10 14:19:01 -08:00
jhuerta
31c8f74518 Updated script resultfile 2026-11-10 11:27:45 -08:00
jhuerta
ff50ab728b Restructured scripts 2026-11-06 16:27:10 -08:00
jhuerta
b5d9e33b4d Moved ExACT Landing Page script 2026-11-06 15:03:26 -08:00
jhuerta
1bf8978094 Updated results excel sheet name 2026-11-06 12:44:21 -08:00
jhuerta
dc4d4c4a24 Updated My Standards Widget script 2026-11-06 12:43:23 -08:00
jhuerta
25c94ebc5e Moved Correlation Dashboard script 2026-11-06 09:53:28 -08:00
jhuerta
57e89b6b53 Added and Completed Approve tabs 2026-11-05 18:33:20 -08:00
jhuerta
8a64b6ddfe Added and Completed Specialty Reports Page script 2026-11-05 15:21:53 -08:00
jhuerta
fb5ce957fc Added and Completed View Queued Report Page script 2026-11-05 12:57:00 -08:00
jhuerta
3821c6278c Corrected end statement 2026-10-30 14:56:53 -07:00
jhuerta
f193784252 Completed Report Build Youre Report Page script 2026-10-30 12:30:54 -07:00
jhuerta
80e13f94e4 Started Report Build Your Report script 2026-10-29 15:13:49 -07:00
jhuerta
8ebaf749ce Renamed 2026-10-29 15:11:26 -07:00
jhuerta
8c5b78dbf4 Updated result sheet path 2026-10-29 15:04:55 -07:00
jhuerta
72da5df4ca Removed commented out code 2026-10-29 14:45:34 -07:00
jhuerta
7fed41d6ac Added and completed Approve Page script 2026-10-29 14:34:26 -07:00
jhuerta
54e8956472 Cleaned up Import Choose File check 2026-10-29 11:07:42 -07:00
jhuerta
866efbd43f Completed Acitivy Report script 2026-10-29 11:06:36 -07:00
jhuerta
409f9edde9 Completed Upload Import Alignments Page 2026-10-28 17:28:56 -07:00
jhuerta
015b51997e Completed script 2026-10-28 14:59:24 -07:00
jhuerta
5186faf1b6 Cleaned up html page 2026-10-28 14:59:02 -07:00
jhuerta
45b89837e1 Cleaned up next steps script 2026-10-28 14:49:33 -07:00
jhuerta
300708a85a Completed Upload Submit A Resource Page script 2026-10-27 16:17:06 -07:00
jhuerta
a27fd65cce Cleaned up results file structure 2026-10-27 14:36:03 -07:00
jhuerta
2e3a67438e Cleaned file structure 2026-10-27 14:35:16 -07:00
jhuerta
d536166028 Started building Upload Submit A Resource script 2026-10-27 10:16:53 -07:00
jhuerta
ac0fcad963 Moved to Frameworks folder structure 2026-10-27 10:16:28 -07:00
jhuerta
d8d1f49056 Moved under Frameworks foler 2026-10-27 10:15:06 -07:00
jhuerta
da8d8e914c Added Upload branch, cleaned up page 2026-10-27 10:10:06 -07:00
jhuerta
a7e36560ee Completed AutoAlign Page script 2026-10-26 16:43:24 -07:00
jhuerta
5a3946ad74 Cleaned upl href values 2026-10-26 16:42:57 -07:00
jhuerta
1f9e03c530 Cleaned up scripts 2026-10-23 18:17:42 -07:00
jhuerta
77b04d695b Corrected start log title 2026-10-23 12:03:05 -07:00
jhuerta
c34e61937c Corrected file structure for Align 2026-10-23 12:02:26 -07:00
jhuerta
d36ba0ca22 Moved to Align file structure 2026-10-23 11:21:56 -07:00
40 changed files with 18361 additions and 231 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

182
index.js
View File

@@ -1,29 +1,58 @@
import express from 'express'; import express from 'express';
import ExACT_landingPage from './tests/ExACT_landingPage.js'; import exactLandingPage from './tests/LandingPage/exactLandingPage.js';
//import ExACT_login from './tests/ExACT_login.js'; //import ExACT_login from './tests/ExACT_login.js';
//Dashboard
import correlationsDashboard from './tests/correlationsDashboard.js'; //DASHBOARDS
import correlationDashboard from './tests/CorrelationDashboard/correlationDashboard.js';
import dashboardMyStandards from './tests/CorrelationDashboard/MyStandardsWidget/dashboardMyStandards.js';
import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js'; import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js';
import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js'; import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js';
import dashboardMyStandards from './tests/dashboardMyStandards.js';
import myStandardsSearchAlignedContent from './tests/myStandardsSearchAlignedContent.js'; import myStandardsSearchAlignedContent from './tests/myStandardsSearchAlignedContent.js';
import myStandardsSearchRelatedStandards from './tests/myStandardsSearchRelatedStandards.js'; import myStandardsSearchRelatedStandards from './tests/myStandardsSearchRelatedStandards.js';
//Content
import ExACT_contentPage from './tests/ExACT_contentPage.js'; //FRAMEWORKS
import ExACT_editItem from './tests/ExACT_editItem.js'; import frameworkManagementPage from './tests/Frameworks/frameworkManagementPage.js';
//Align
import alignContentPage from './tests/alignContentPage.js';
import alignStandardsPage from './tests/alignStandardsPage.js';
import ExACT_editItemAddConcept from './tests/ExACT_editItemAddConcept.js';
import ExACT_alignConceptsPage from './tests/ExACT_alignConceptsPage.js';
//Framework
import frameworkManagementPage from './tests/frameworkManagementPage.js';
import ExACT_frameworkPublishingPage from './tests/ExACT_frameworkPublishingPage.js'; import ExACT_frameworkPublishingPage from './tests/ExACT_frameworkPublishingPage.js';
import ExACT_frameworkPublishFrameworkDIV from './tests/ExACT_frameworkPublishFrameworkDIV.js'; import ExACT_frameworkPublishFrameworkDIV from './tests/ExACT_frameworkPublishFrameworkDIV.js';
import ExACT_frameworkFrameworkGroupsDIV from './tests/ExACT_frameworkFrameworkGroupsDIV.js'; import ExACT_frameworkFrameworkGroupsDIV from './tests/ExACT_frameworkFrameworkGroupsDIV.js';
import ExACT_frameworkFrameworkSettingsDIV from './tests/ExACT_frameworkFrameworkSettingsDIV.js'; import ExACT_frameworkFrameworkSettingsDIV from './tests/ExACT_frameworkFrameworkSettingsDIV.js';
//ALIGN
import alignContentPage from './tests/Align/alignContentPage.js';
import alignStandardsPage from './tests/Align/alignStandardsPage.js';
import alignAutoAlignPage from './tests/Align/alignAutoAlignPage.js';
//UPLOAD
import uploadSubmitAResourcePage from './tests/Upload/uploadSubmitAResourcePage.js';
import uploadBatchUploadPage from './tests/Upload/uploadBatchUpload.js';
import uploadImportAlignmentsPage from './tests/Upload/uploadImportAlignmentsPage.js';
//ACTIVITY REPORT
import activityReportPage from './tests/ActivityReport/ActivityReportPage.js';
//REPORT
import reportBuildYourReportPage from './tests/Report/reportBuildYourReportPage.js';
import reportViewQueuedReportsPage from './tests/Report/reportViewQueuedReportsPage.js';
import reportSpecialtyReportsPage from './tests/Report/reportSpecialtyReportsPage.js';
//APPROVE
import approvePendingAlignmentsPage from './tests/Approve/approvePendingAlignmentsPage.js';
import approveContentSubmissionsPage from './tests/Approve/approveContentSubmissionsPage.js';
import approveApprovalHistoryPage from './tests/Approve/approveApprovalHistoryPage.js';
import approveRejectionHistoryPage from './tests/Approve/approveRejectionHistoryPage.js';
//Content
import ExACT_contentPage from './tests/ExACT_contentPage.js';
import ExACT_editItem from './tests/ExACT_editItem.js';
import ExACT_editItemAddConcept from './tests/ExACT_editItemAddConcept.js';
import ExACT_alignConceptsPage from './tests/ExACT_alignConceptsPage.js';
const app = express(); const app = express();
app.get('/', (req, res) => { app.get('/', (req, res) => {
@@ -33,65 +62,128 @@ app.get('/', (req, res) => {
<h1 style="text-align:center; color:#055a8c; padding-top: 20px;">ExACT Automated Regression Scripts</h1> <h1 style="text-align:center; color:#055a8c; padding-top: 20px;">ExACT Automated Regression Scripts</h1>
<div style="text-align:center; color:#001; font-size:15px; ">(Click the corresponding link to execute the desired script)</div> <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> <h1 style="text-align:center; color:#055a8c; font-size:20px; ">EXACT 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> <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> <div style="padding:3px;"><strong><a href='/correlationDashboard' target='_blank'>Correlation Dashboard</a></strong></div>
<div style="padding:3px;"><strong>- <a href='/dashboardMyStandards' target='_blank'>My Standards Widget</a></strong></div>
<!-- NEEDS UPDATE
<div style="padding:3px;"><strong><a href='/ExACT_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_dashboardMyContent' target='_blank'>My Content Widget</a></strong></div>
-->
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">FRAMEWORKS</h1>
<div style="padding:3px;"><strong><a href='/frameworkManagementPage' target='_blank'>Framework Management Page</a></strong></div>
<!-- NEEDS UPDATE
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishingPage' target='_blank'>Framework Publishing Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishFrameworkDIV' target='_blank'>Publish Framework DIV</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkFrameworkGroupsDIV' target='_blank'>Framework Groups DIV</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkFrameworkSettingsDIV' target='_blank'>Framework Settings DIV</a></strong></div>
-->
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">ALIGN</h1>
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Content Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Standards Page</a></strong></div>
<div style="padding:3px;"><strong>- <a href='/myStandardsSearchAlignedContent' target='_blank'>My Standards Search / Aligned Content</a></strong></div>
<div style="padding:3px;"><strong>- <a href='/myStandardsSearchRelatedStandards' target='_blank'>My Standards Search / Related Standards</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignAutoAlignPage' target='_blank'>AutoAlign Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">UPLOAD</h1>
<div style="padding:3px;"><strong><a href='/uploadSubmitAResourcePage' target='_blank'>Submit A Resource Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/uploadBatchUploadPage' target='_blank'>Batch Upload Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/uploadImportAlignmentsPage' target='_blank'>Import Alignments Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">ACTIVITY REPORT</h1>
<div style="padding:3px;"><strong><a href='/activityReportPage' target='_blank'>Activity Report Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">REPORT</h1>
<div style="padding:3px;"><strong><a href='/reportBuildYourReportPage' target='_blank'>Build Your Report Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/reportViewQueuedReportsPage' target='_blank'>View Queued Reports Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/reportSpecialtyReportsPage' target='_blank'>Specialty Reports Page</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">APPROVE</h1>
<div style="padding:3px;"><strong><a href='/approvePendingAlignmentsPage' target='_blank'>Pending Alignments Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/approveContentSubmissionsPage' target='_blank'>Content Submissions Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/approveApprovalHistoryPage' target='_blank'>Approval History Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/approveRejectionHistoryPage' target='_blank'>Rejection History Page</a></strong></div>
<!-- NEEDS UPDATE
<div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div>
<div style="padding:3px;"><strong><a href='/dashboardMyStandards' target='_blank'>My Standards Widget</a></strong></div>
<div style="padding:3px;"><strong><a href='/myStandardsSearchAlignedContent' target='_blank'>My Standards Search - Aligned Content</a></strong></div>
<div style="padding:3px;"><strong><a href='/myStandardsSearchRelatedStandards' target='_blank'>My Standards Search - Related Standards</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">CONTENT</h1> <h1 style="text-align:center; color:#055a8c; font-size:20px; ">CONTENT</h1>
<div style="padding:3px;"><strong><a href='/ExACT_contentPage' target='_blank'>Content Page</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_contentPage' target='_blank'>Content Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_editItem' target='_blank'>Edit Item</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_editItem' target='_blank'>Edit Item</a></strong></div>
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">ALIGN</h1>
<div style="padding:3px;"><strong><a href='/alignContentPage' target='_blank'>Align Content Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_editItemAddConcept' target='_blank'>Align - Edit Content and Align Concept</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_editItemAddConcept' target='_blank'>Align - Edit Content and Align Concept</a></strong></div>
<div style="padding:3px;"><strong><a href='/alignStandardsPage' target='_blank'>Align Standards Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_alignConceptsPage' target='_blank'>Align Concepts Page</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_alignConceptsPage' target='_blank'>Align Concepts Page</a></strong></div>
-->
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">FRAMEWORKS</h1>
<div style="padding:3px;"><strong><a href='/frameworkManagementPage' target='_blank'>Framework Management Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishingPage' target='_blank'>Framework Publishing Page</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkPublishFrameworkDIV' target='_blank'>Publish Framework DIV</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkFrameworkGroupsDIV' target='_blank'>Framework Groups DIV</a></strong></div>
<div style="padding:3px;"><strong><a href='/ExACT_frameworkFrameworkSettingsDIV' target='_blank'>Framework Settings DIV</a></strong></div>
<br> <br>
</div> </div>
`); `);
}) })
//Landing: //EXACT LANDING
app.get('/ExACT_landingPage', ExACT_landingPage); app.get('/exactLandingPage', exactLandingPage);
//Login //Login
//app.get('/ExACT_login', ExACT_login); //app.get('/ExACT_login', ExACT_login);
//Dashboard
app.get('/correlationsDashboard', correlationsDashboard); //DASHBOARDS
//My Content app.get('/correlationDashboard', correlationDashboard);
app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent);
app.get('/ExACT_dashboardSemanticStandardsComparison', ExACT_dashboardSemanticStandardsComparison);
app.get('/dashboardMyStandards', dashboardMyStandards); app.get('/dashboardMyStandards', dashboardMyStandards);
//FRAMEWORKS
app.get('/frameworkManagementPage', frameworkManagementPage);
app.get('/ExACT_frameworkPublishingPage', ExACT_frameworkPublishingPage);
app.get('/ExACT_frameworkPublishFrameworkDIV', ExACT_frameworkPublishFrameworkDIV);
app.get('/ExACT_frameworkFrameworkGroupsDIV', ExACT_frameworkFrameworkGroupsDIV);
app.get('/ExACT_frameworkFrameworkSettingsDIV', ExACT_frameworkFrameworkSettingsDIV);
//ALIGN
app.get('/alignContentPage', alignContentPage);
app.get('/alignStandardsPage', alignStandardsPage);
app.get('/alignAutoAlignPage', alignAutoAlignPage);
//UPLOAD
app.get('/uploadSubmitAResourcePage', uploadSubmitAResourcePage);
app.get('/uploadBatchUploadPage', uploadBatchUploadPage);
app.get('/uploadImportAlignmentsPage', uploadImportAlignmentsPage);
//ACTIVITY REPORT
app.get('/activityReportPage', activityReportPage);
//ACTIVITY REPORT
app.get('/reportBuildYourReportPage', reportBuildYourReportPage);
app.get('/reportViewQueuedReportsPage', reportViewQueuedReportsPage);
app.get('/reportSpecialtyReportsPage', reportSpecialtyReportsPage);
//APPROVE
app.get('/approvePendingAlignmentsPage', approvePendingAlignmentsPage);
app.get('/approveContentSubmissionsPage', approveContentSubmissionsPage);
app.get('/approveApprovalHistoryPage', approveApprovalHistoryPage);
app.get('/approveRejectionHistoryPage', approveRejectionHistoryPage);
//My Content
app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent);
app.get('/ExACT_dashboardSemanticStandardsComparison', ExACT_dashboardSemanticStandardsComparison);
app.get('/myStandardsSearchAlignedContent', myStandardsSearchAlignedContent); app.get('/myStandardsSearchAlignedContent', myStandardsSearchAlignedContent);
app.get('/myStandardsSearchRelatedStandards', myStandardsSearchRelatedStandards); app.get('/myStandardsSearchRelatedStandards', myStandardsSearchRelatedStandards);
//Content //Content
app.get('/ExACT_contentPage', ExACT_contentPage); app.get('/ExACT_contentPage', ExACT_contentPage);
//Edit Item //Edit Item
app.get('/ExACT_editItem', ExACT_editItem); app.get('/ExACT_editItem', ExACT_editItem);
//Align
app.get('/alignContentPage', alignContentPage);
app.get('/alignStandardsPage', alignStandardsPage);
app.get('/ExACT_editItemAddConcept', ExACT_editItemAddConcept); app.get('/ExACT_editItemAddConcept', ExACT_editItemAddConcept);
app.get('/ExACT_alignConceptsPage', ExACT_alignConceptsPage); app.get('/ExACT_alignConceptsPage', ExACT_alignConceptsPage);
//Framework
app.get('/frameworkManagementPage', frameworkManagementPage);
app.get('/ExACT_frameworkPublishingPage', ExACT_frameworkPublishingPage);
app.get('/ExACT_frameworkPublishFrameworkDIV', ExACT_frameworkPublishFrameworkDIV);
app.get('/ExACT_frameworkFrameworkGroupsDIV', ExACT_frameworkFrameworkGroupsDIV);
app.get('/ExACT_frameworkFrameworkSettingsDIV', ExACT_frameworkFrameworkSettingsDIV);
app.listen(8000, () => { app.listen(8000, () => {
console.log('Server is up and running on port 8000'); console.log('Server is up and running on port 8000');

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const alignContentPage = (req, res) => { const alignContentPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Align Content Page(alignContentPage); Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: Align - Content Page(alignContentPage); Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -32,7 +32,7 @@ const steps = [
action: async () => { action: async () => {
const multipleChecks = 'Log In'; const multipleChecks = 'Log In';
console.log('------------->| ALIGN CONTENT PAGE |<-------------'); console.log('------------->| ALIGN - CONTENT PAGE |<-------------');
const errors = []; const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -172,7 +172,7 @@ const steps = [
await driver.wait(async () => { await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState'); const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const contentTab = await driver.wait( const contentTab = await driver.wait(
@@ -244,9 +244,9 @@ const steps = [
//element background color //element background color
if (elementBgColor === 'rgba(40, 39, 90, 1)') { if (elementBgColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Content tab title active background color matched as expected'); console.log('Passed: Content tab title background color matched as expected');
} else { } else {
errors.push(`Expected: Content tab title active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`); errors.push(`Expected: Content tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
} }
//element tool-tip text //element tool-tip text
@@ -279,9 +279,9 @@ const steps = [
//element tool-tip background color //element tool-tip background color
if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') { if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Content tab tool-tip active background color matched as expected'); console.log('Passed: Content tab tool-tip background color matched as expected');
} else { } else {
errors.push(`Expected: Content tab tool-tip active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`); errors.push(`Expected: Content tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -353,9 +353,9 @@ const steps = [
//element background color //element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') { if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Standards tab title dimmed background color matched as expected'); console.log('Passed: Standards tab title background color matched as expected');
} else { } else {
errors.push(`Expected: Standards tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
} }
//element tool-tip text //element tool-tip text
@@ -388,9 +388,9 @@ const steps = [
//element tool-tip background color //element tool-tip background color
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Standards tab tool-tip active background color matched as expected'); console.log('Passed: Standards tab tool-tip background color matched as expected');
} else { } else {
errors.push(`Expected: Standards tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -462,9 +462,9 @@ const steps = [
//element background color //element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') { if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: AutoAlign tab title dimmed background color matched as expected'); console.log('Passed: AutoAlign tab title background color matched as expected');
} else { } else {
errors.push(`Expected: AutoAlign tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); errors.push(`Expected: AutoAlign tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
} }
//element tool-tip text //element tool-tip text
@@ -497,9 +497,9 @@ const steps = [
//element tool-tip background color //element tool-tip background color
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: AutoAlign tab tool-tip active background color matched as expected'); console.log('Passed: AutoAlign tab tool-tip background color matched as expected');
} else { } else {
errors.push(`Expected: AutoAlign tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -740,7 +740,7 @@ const steps = [
await driver.wait(async () => { await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState'); const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const element = await driver.wait( const element = await driver.wait(
@@ -1389,6 +1389,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'alignContentPage.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignContentPage'); const screenshotDir = path.join('screenshots', 'alignContentPage');
@@ -1398,9 +1400,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('alignContentPageResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('alignContentPageResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -1481,7 +1484,7 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'alignContentPageResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }

View File

@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const alignStandardsPage = (req, res) => { const alignStandardsPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script - Align Standards Page(alignStandardsPage): Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: Align - Standards Page(alignStandardsPage): Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -32,7 +32,7 @@ const steps = [
action: async () => { action: async () => {
const multipleChecks = 'Log In'; const multipleChecks = 'Log In';
console.log('------------->| ALIGN CONTENT PAGE |<-------------'); console.log('------------->| ALIGN - STANDARDS PAGE |<-------------');
const errors = []; const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -172,7 +172,7 @@ const steps = [
await driver.wait(async () => { await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState'); const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const contentTab = await driver.wait( const contentTab = await driver.wait(
@@ -517,16 +517,16 @@ const steps = [
//NEXT ACTION //NEXT ACTION
{ {
description: 'Click Standards navigation link', description: 'Click Standards tab',
action: async () => { action: async () => {
await driver.findElement(By.linkText('Standards')).click(); await driver.findElement(By.linkText('Standards')).click();
console.log('----->| NEXT ACTION: Clicked Standards navigation link'); console.log('----->| NEXT ACTION: Clicked Standards tab');
//Wait for page readyState //Wait for page readyState
await driver.wait(async () => { await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState'); const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'Standards page did not fully load within 30 seconds');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const browseStandardsTitle = await driver.wait( const browseStandardsTitle = await driver.wait(
@@ -1882,6 +1882,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'alignStandardsPage.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'alignStandardsPage'); const screenshotDir = path.join('screenshots', 'alignStandardsPage');
@@ -1891,9 +1893,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('alignStandardsPageResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('alignStandardsPageResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -1974,7 +1977,7 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'alignStandardsPageResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
import fs from 'fs'; import fs from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
import { myStandardsSearch_AlignedContent } from './myStandardsSearchAlignedContent.js'; import { myStandardsSearch_AlignedContent } from '../../myStandardsSearchAlignedContent.js';
const dashboardMyStandards = (req, res) => { const dashboardMyStandards = (req, res) => {
res.send('<h2>ExACT Automated Test Script: DASHBOARD - My Standards Widget(dashboardMyStandards) | Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: DASHBOARD - My Standards Widget(dashboardMyStandards) | Initiated</h2>');
@@ -330,6 +330,7 @@ const steps = [
'Creating Org', 'Creating Org',
'Demo Client Standards', 'Demo Client Standards',
'Demo Standards', 'Demo Standards',
'Imports',
'New Folder', 'New Folder',
'QA Client Test Frameworks', 'QA Client Test Frameworks',
'United States Standards', 'United States Standards',
@@ -1627,6 +1628,7 @@ const steps = [
'ACT', 'ACT',
'ACTFL', 'ACTFL',
'AQA', 'AQA',
'Archived Standards',
'Australia', 'Australia',
'Brazil', 'Brazil',
'Cambridge IGCSE', 'Cambridge IGCSE',
@@ -2314,6 +2316,7 @@ const steps = [
'Creating Org', 'Creating Org',
'Demo Client Standards', 'Demo Client Standards',
'Demo Standards', 'Demo Standards',
'Imports',
'New Folder', 'New Folder',
'QA Client Test Frameworks', 'QA Client Test Frameworks',
'United States Standards', 'United States Standards',
@@ -5053,9 +5056,9 @@ const steps = [
//Adopted //Adopted
{ {
selector: '.notenabled:nth-child(7) > td:nth-child(2)', selector: '.notenabled:nth-child(7) > td:nth-child(2)',
label: '2017', label: '2024',
expected: { expected: {
text: '2017', text: '2024',
font: 'Poppins, sans-serif', font: 'Poppins, sans-serif',
color: 'rgba(119, 119, 119, 1)', color: 'rgba(119, 119, 119, 1)',
size: '12.87px' size: '12.87px'
@@ -6076,15 +6079,17 @@ const steps = [
'WIDA Consortium (2020)', 'WIDA Consortium (2020)',
'5th Grade Import ECS-2732', '5th Grade Import ECS-2732',
'Imported Framework Updated', 'Imported Framework Updated',
'NewTicket',
'ECS-2933 Testing On Prod', 'ECS-2933 Testing On Prod',
//'Stats Test Framework',
'Widget Test', 'Widget Test',
'ecs31444',
'California Mathematics 1997', 'California Mathematics 1997',
'Georgia Archived Language Arts QA', 'Georgia Archived Language Arts QA',
'Georgia Current Language Arts QA', 'Georgia Current Language Arts QA',
'Georgia Future Language Arts QA', 'Georgia Future Language Arts QA',
'create group test', 'create group test',
'IMport Test' 'IMport Test',
'Georgia WL Import'
]; ];
const actual = []; const actual = [];
@@ -7249,7 +7254,10 @@ const steps = [
'ECS-3037 On Prod TC2', 'ECS-3037 On Prod TC2',
'ECS-3037 On Prod TC1', 'ECS-3037 On Prod TC1',
'webinar test', 'webinar test',
'Post NIght July26' 'Review Screen Open',
'New One For Agust Post Night',
'Post NIght July26',
'create import test'
]; ];
//Track all errors //Track all errors
@@ -7499,14 +7507,17 @@ const steps = [
'WIDA Consortium (2020)', 'WIDA Consortium (2020)',
'5th Grade Import ECS-2732', '5th Grade Import ECS-2732',
'Imported Framework Updated', 'Imported Framework Updated',
'NewTicket',
'ECS-2933 Testing On Prod', 'ECS-2933 Testing On Prod',
'Widget Test', 'Widget Test',
'ecs31444',
'California Mathematics 1997', 'California Mathematics 1997',
'Georgia Archived Language Arts QA', 'Georgia Archived Language Arts QA',
'Georgia Current Language Arts QA', 'Georgia Current Language Arts QA',
'Georgia Future Language Arts QA', 'Georgia Future Language Arts QA',
'create group test', 'create group test',
'IMport Test' 'IMport Test',
'Georgia WL Import'
]; ];
//Length validation //Length validation
@@ -7923,18 +7934,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'dashboardMyStandards.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'dashboardMyStandardsResults'); const screenshotDir = path.join('screenshots', 'dashboardMyStandards');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('dashboardMyStandardsResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('dashboardMyStandardsResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -7961,13 +7975,15 @@ try {
try { try {
await step.action(); await step.action();
//Log a successful step with no screenshot
worksheet = logStep( worksheet = logStep(
worksheet, worksheet,
step.description, step.description,
'Passed', 'Passed',
stepIndex, stepIndex,
timestamp, timestamp,
null null //No screenshot for passed steps
); );
} catch (error) { } catch (error) {
@@ -8011,7 +8027,7 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'dashboardMyStandardsResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }

View File

@@ -4,8 +4,8 @@ import fs from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const correlationsDashboard = (req, res) => { const correlationDashboard = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Correlations Dashboard(correlationsDashboard) | Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: Correlation Dashboard(correlationDashboard) | Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -24,7 +24,7 @@ const correlationsDashboard = (req, res) => {
//CONSTANTS //CONSTANTS
//My Content Widget //My Content Widget
const myContentItemTotals = '5040 items'; const myContentItemTotals = '5045 items';
const steps = [ const steps = [
{ description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') }, { description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') },
@@ -282,7 +282,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Help icon href matched as expected'); console.log('Passed: Help icon href matched as expected');
} else { } else {
errors.push(`Expected: Help icon href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Help icon href to be: "https://correlation.edgate.com/exact/help.php"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -416,7 +416,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Dashboard Navigation href matched as expected'); console.log('Passed: Dashboard Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Dashboard Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Dashboard Navigation href to be: "https://correlation.edgate.com/exact/"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -499,7 +499,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Frameworks Navigation href matched as expected'); console.log('Passed: Frameworks Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Frameworks Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Frameworks Navigation href to be: "https://correlation.edgate.com/exact/frameworks.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -582,7 +582,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Align Navigation href matched as expected'); console.log('Passed: Align Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Align Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Align Navigation href to be: "https://correlation.edgate.com/exact/browse.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -665,7 +665,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Upload Navigation href matched as expected'); console.log('Passed: Upload Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Upload Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Upload Navigation href to be: "https://correlation.edgate.com/exact/submit.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -748,7 +748,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Activity Report Navigation href matched as expected'); console.log('Passed: Activity Report Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Activity Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Activity Report Navigation href to be: "https://correlation.edgate.com/exact/activity_reporting.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -831,7 +831,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Report Navigation href matched as expected'); console.log('Passed: Report Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Report Navigation href to be: "https://correlation.edgate.com/exact/reports.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -914,7 +914,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Approve Navigation href matched as expected'); console.log('Passed: Approve Navigation href matched as expected');
} else { } else {
errors.push(`Expected: Approve Navigation href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Approve Navigation href to be: "https://correlation.edgate.com/exact/approvecontent.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -1388,8 +1388,9 @@ const steps = [
{ position: 18, name: 'Illustrative Math Test 1', count: '5', href: '/exact/contentset_edit_modal.php?id=1473839901' }, { position: 18, name: 'Illustrative Math Test 1', count: '5', href: '/exact/contentset_edit_modal.php?id=1473839901' },
{ position: 19, name: 'Illustrative Math Test 2', count: '5', href: '/exact/contentset_edit_modal.php?id=1473840078' }, { position: 19, name: 'Illustrative Math Test 2', count: '5', href: '/exact/contentset_edit_modal.php?id=1473840078' },
{ position: 20, name: 'webinar test', count: '5', href: '/exact/contentset_edit_modal.php?id=1476429225' }, { position: 20, name: 'webinar test', count: '5', href: '/exact/contentset_edit_modal.php?id=1476429225' },
{ position: 21, name: 'create import test', count: '3', href: '/exact/contentset_edit_modal.php?id=1478966441' }, { position: 21, name: 'Review Screen Open', count: '5', href: '/exact/contentset_edit_modal.php?id=1483698269' },
{ position: 22, name: 'New One For Agust Post Night', count: '0', href: '/exact/contentset_edit_modal.php?id=1478966652' } { position: 22, name: 'create import test', count: '3', href: '/exact/contentset_edit_modal.php?id=1478966441' },
{ position: 23, name: 'New One For Agust Post Night', count: '0', href: '/exact/contentset_edit_modal.php?id=1478966652' }
]; ];
for (const exp of expected) { for (const exp of expected) {
@@ -1598,6 +1599,7 @@ const steps = [
'Creating Org', 'Creating Org',
'Demo Client Standards', 'Demo Client Standards',
'Demo Standards', 'Demo Standards',
'Imports',
'New Folder', 'New Folder',
'QA Client Test Frameworks', 'QA Client Test Frameworks',
'United States Standards', 'United States Standards',
@@ -3367,7 +3369,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: See More href matched as expected'); console.log('Passed: See More href matched as expected');
} else { } else {
errors.push(`Expected: See More button href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: See More button href to be: "https://correlation.edgate.com/pic/standards-updates.html"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -4411,7 +4413,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: Manage Favorites href matched as expected'); console.log('Passed: Manage Favorites href matched as expected');
} else { } else {
errors.push(`Expected: Manage Favorites button href to be "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Manage Favorites button href to be: "https://correlation.edgate.com/exact/add_favorite_report.php"; actual: "${actualHref}"`);
} }
//font-family //font-family
@@ -4707,9 +4709,9 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: Format - XLS button was displayed as expected'); console.log('Passed: Format Row 1 - XLS button was displayed as expected');
} else { } else {
errors.push('Expected: XLS button was not displayed'); errors.push('Expected: Format Row 1 - XLS button was not displayed');
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -4725,11 +4727,11 @@ const steps = [
} }
}, },
//Favorite Reports - Report 1 column data //Favorite Reports - Report Row 1 title
{ {
description: 'Favorite Reports - Report column 1 data, text, and font size', description: 'Favorite Reports - Report Row 1 title, text, and font size',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Report column 1 data'; const multipleChecks = 'Favorite Reports - Report Row 1 title';
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > td:nth-child(2)')); const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > td:nth-child(2)'));
@@ -4744,30 +4746,30 @@ const steps = [
//text //text
if (elementText === 'SoDontLook') { if (elementText === 'SoDontLook') {
console.log('Passed: Favorite Reports - Report column 1 data matched as expected'); console.log('Passed: Favorite Reports - Report Row 1 title matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report = "SoDontLook" column 1 data; Actual: "${elementText}"`); errors.push(`Expected: Favorite Reports - Report Row 1 title to be: "SoDontLook"; Actual: "${elementText}"`);
} }
//font //font
if (elementFont === "Poppins, sans-serif") { if (elementFont === "Poppins, sans-serif") {
console.log('Passed: Favorite Reports - Report column 1 data font-family matched as expected'); console.log('Passed: Favorite Reports - Report Row 1 title font-family matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 1 data font-family "Poppins, sans-serif"; Actual: ${elementFont}`); errors.push(`Expected: Favorite Reports - Report Row 1 title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
} }
//size //size
if (elementSize === '14.3px') { if (elementSize === '14.3px') {
console.log('Passed: Favorite Reports - Report column 1 data font-size matched as expected'); console.log('Passed: Favorite Reports - Report Row 1 title font-size matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 1 data font-size "14.3px"; Actual: "${elementSize}"`); errors.push(`Expected: Favorite Reports - Report Row 1 title font-size "14.3px"; Actual: "${elementSize}"`);
} }
//color //color
if (elementColor === 'rgba(33, 37, 41, 1)') { if (elementColor === 'rgba(33, 37, 41, 1)') {
console.log('Passed: Favorite Reports - Report column 1 data text color matched as expected'); console.log('Passed: Favorite Reports - Report Row 1 title color matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 1 data text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`); errors.push(`Expected: Favorite Reports - Report Row 1 title color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -4783,11 +4785,11 @@ const steps = [
} }
}, },
//Favorite Reports - Run column 1 data //Favorite Reports - Run Row 1 icon
{ {
description: 'Favorite Reports - Run column 1 data', description: 'Favorite Reports - Run Row 1 icon',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Run column 1 data'; const multipleChecks = 'Favorite Reports - Run Row 1 icon';
const link = await driver.findElement(By.css('tr:nth-child(1) a.reportrun')); const link = await driver.findElement(By.css('tr:nth-child(1) a.reportrun'));
const element = await link.findElement(By.css('img')); const element = await link.findElement(By.css('img'));
@@ -4803,27 +4805,27 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: Run icon was displayed as expected'); console.log('Passed: Run Row 1 icon was displayed as expected');
} else { } else {
errors.push('Expected: Run icon was not displayed'); errors.push('Expected: Run Row 1 icon was not displayed');
} }
//href path //href path
const actualHref = await link.getAttribute('href'); const actualHref = await link.getAttribute('href');
const url = new URL(actualHref); const url = new URL(actualHref);
if (url.pathname === expectedPath) { if (url.pathname === expectedPath) {
console.log('Passed: Run icon 1 href path matched as expected'); console.log('Passed: Run Row 1 icon href path matched as expected');
} else { } else {
errors.push(`Expected: Run icon 1 href path to be "${expectedPath}"; actual: "${url.pathname}"`); errors.push(`Expected: Run Row 1 icon href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
} }
//href query parameters //href query parameters
for (const [key, expectedValue] of Object.entries(expectedParams)) { for (const [key, expectedValue] of Object.entries(expectedParams)) {
const actualValue = url.searchParams.get(key); const actualValue = url.searchParams.get(key);
if (actualValue === expectedValue) { if (actualValue === expectedValue) {
console.log('Passed: Run icon 1 href param matched as expected'); console.log('Passed: Run Row 1 icon href param matched as expected');
} else { } else {
errors.push(`Expected: Run icon 1 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`); errors.push(`Expected: Run Row 1 icon href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
} }
} }
@@ -4840,11 +4842,11 @@ const steps = [
} }
}, },
//Favorite Reports - Download column 1 data //Favorite Reports - Download Row 1 icon
{ {
description: 'Favorite Reports - Download column 1 data', description: 'Favorite Reports - Download Row 1 icon',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Download column 1 data'; const multipleChecks = 'Favorite Reports - Download Row 1 icon';
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > .text-center a')); const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > .text-center a'));
const element = await link.findElement(By.css('img')); const element = await link.findElement(By.css('img'));
@@ -4855,17 +4857,17 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: Download icon 1 was displayed as expected'); console.log('Passed: Download Row 1 icon was displayed as expected');
} else { } else {
errors.push('Expected: Download icon 1 was not displayed'); errors.push('Expected: Download Row 1 icon was not displayed');
} }
//href //href
const actualHref = await link.getAttribute('href'); const actualHref = await link.getAttribute('href');
if (actualHref && actualHref.endsWith(expectedHref)) { if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 1 href matched expected'); console.log('Passed: Download Row 1 icon href matched expected');
} else { } else {
errors.push(`Expected: Download icon 1 href to end with "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Download Row 1 icon href to be: "https://correlation.edgate.com/exact/reports/exact_juan/ThisBeMyFile.xls"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -4894,9 +4896,9 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: doc button was displayed as expected'); console.log('Passed: Format Row 2 doc button was displayed as expected');
} else { } else {
errors.push('Expected: doc button was not displayed'); errors.push('Expected: Format Row 2 doc button was not displayed');
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -4912,11 +4914,11 @@ const steps = [
} }
}, },
//Favorite Reports - Report 2 column data //Favorite Reports - Report Row 2 title
{ {
description: 'Favorite Reports - Report column 2 data, text, and font size', description: 'Favorite Reports - Report Row 2 title, text, and font size',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Report column 2 data'; const multipleChecks = 'Favorite Reports - Report Row 2 title';
const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > td:nth-child(2)')); const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > td:nth-child(2)'));
@@ -4931,30 +4933,30 @@ const steps = [
//text //text
if (elementText === 'Test Inc.') { if (elementText === 'Test Inc.') {
console.log('Passed: Favorite Reports - Report column 2 data matched as expected'); console.log('Passed: Favorite Reports - Report Row 2 title matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report = "Test Inc." column 2 data; Actual: "${elementText}"`); errors.push(`Expected: Favorite Reports - Report Row 2 title to be: "Test Inc."; Actual: "${elementText}"`);
} }
//font //font
if (elementFont === "Poppins, sans-serif") { if (elementFont === "Poppins, sans-serif") {
console.log('Passed: Favorite Reports - Report column 2 data font-family matched as expected'); console.log('Passed: Favorite Reports - Report Report Row 2 title font-family matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 2 data font-family "Poppins, sans-serif"; Actual: ${elementFont}`); errors.push(`Expected: Favorite Reports - Report Report Row 2 title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
} }
//size //size
if (elementSize === '14.3px') { if (elementSize === '14.3px') {
console.log('Passed: Favorite Reports - Report column 2 data font-size matched as expected'); console.log('Passed: Favorite Reports - Report Report Row 2 title font-size matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 2 data font-size "14.3px"; Actual: "${elementSize}"`); errors.push(`Expected: Favorite Reports - Report Report Row 2 title font-size "14.3px"; Actual: "${elementSize}"`);
} }
//color //color
if (elementColor === 'rgba(33, 37, 41, 1)') { if (elementColor === 'rgba(33, 37, 41, 1)') {
console.log('Passed: Favorite Reports - Report column 2 data text color matched as expected'); console.log('Passed: Favorite Reports - Report Report Row 2 title text color matched as expected');
} else { } else {
errors.push(`Expected: Favorite Reports - Report column 2 data text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`); errors.push(`Expected: Favorite Reports - Report Report Row 2 title text color "rgba(33, 37, 41, 1)"'; Actual: "${elementColor}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -4970,11 +4972,11 @@ const steps = [
} }
}, },
//Favorite Reports - Run column 2 data //Favorite Reports - Run Row 2 icon
{ {
description: 'Favorite Reports - Run column 2 data', description: 'Favorite Reports - Run Row 2 icon',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Run column 2 data'; const multipleChecks = 'Favorite Reports - Run Row 2 icon';
const link = await driver.findElement(By.css('tr:nth-child(2) a.reportrun')); const link = await driver.findElement(By.css('tr:nth-child(2) a.reportrun'));
const element = await link.findElement(By.css('img')); const element = await link.findElement(By.css('img'));
@@ -4990,27 +4992,27 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: Run icon 2 was displayed as expected'); console.log('Passed: Run Row 2 icon was displayed as expected');
} else { } else {
errors.push('Expected: Run icon 2 was not displayed'); errors.push('Expected: Run Row 2 icon was not displayed');
} }
//href path //href path
const actualHref = await link.getAttribute('href'); const actualHref = await link.getAttribute('href');
const url = new URL(actualHref); const url = new URL(actualHref);
if (url.pathname === expectedPath) { if (url.pathname === expectedPath) {
console.log('Passed: Run icon 2 href path matched as expected'); console.log('Passed: Run Row 2 icon href path matched as expected');
} else { } else {
errors.push(`Expected: Run icon 2 href path to be "${expectedPath}"; actual: "${url.pathname}"`); errors.push(`Expected: Run Row 2 icon href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
} }
//href query parameters //href query parameters
for (const [key, expectedValue] of Object.entries(expectedParams)) { for (const [key, expectedValue] of Object.entries(expectedParams)) {
const actualValue = url.searchParams.get(key); const actualValue = url.searchParams.get(key);
if (actualValue === expectedValue) { if (actualValue === expectedValue) {
console.log('Passed: Run icon 2 href param matched as expected'); console.log('Passed: Run Row 2 icon href param matched as expected');
} else { } else {
errors.push(`Expected: Run icon 2 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`); errors.push(`Expected: Run Row 2 icon href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
} }
} }
@@ -5027,11 +5029,11 @@ const steps = [
} }
}, },
//Favorite Reports - Download column 2 data //Favorite Reports - Download Row 2 icon
{ {
description: 'Favorite Reports - Download column 2 data', description: 'Favorite Reports - Download Row 2 icon',
action: async () => { action: async () => {
const multipleChecks = 'Favorite Reports - Download column 2 data'; const multipleChecks = 'Favorite Reports - Download Row 2 icon';
const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > .text-center a')); const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > .text-center a'));
const element = await link.findElement(By.css('img')); const element = await link.findElement(By.css('img'));
@@ -5042,17 +5044,17 @@ const steps = [
//icon present //icon present
if (await element.isDisplayed()) { if (await element.isDisplayed()) {
console.log('Passed: Download icon 2 was displayed as expected'); console.log('Passed: Download Row 2 icon was displayed as expected');
} else { } else {
errors.push('Expected: Download icon 2 was not displayed'); errors.push('Expected: Download Row 2 icon was not displayed');
} }
//href //href
const actualHref = await link.getAttribute('href'); const actualHref = await link.getAttribute('href');
if (actualHref && actualHref.endsWith(expectedHref)) { if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 2 href matched expected'); console.log('Passed: Download Row 2 icon href matched expected');
} else { } else {
errors.push(`Expected: Download icon 2 href to end with "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Download Row 2 icon href to be: "/exact/reports/exact_juan/WordToYa.doc"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -5188,7 +5190,7 @@ const steps = [
if (url.pathname === expectedPath) { if (url.pathname === expectedPath) {
console.log('Passed: Run icon 3 href path matched as expected'); console.log('Passed: Run icon 3 href path matched as expected');
} else { } else {
errors.push(`Expected: Run icon 3 href path to be "${expectedPath}"; actual: "${url.pathname}"`); errors.push(`Expected: Run icon 3 href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
} }
//href query parameters //href query parameters
@@ -5197,7 +5199,7 @@ const steps = [
if (actualValue === expectedValue) { if (actualValue === expectedValue) {
console.log('Passed: Run icon 3 href param matched as expected'); console.log('Passed: Run icon 3 href param matched as expected');
} else { } else {
errors.push(`Expected: Run icon 3 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`); errors.push(`Expected: Run icon 3 href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
} }
} }
@@ -5239,7 +5241,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) { if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 3 href matched expected'); console.log('Passed: Download icon 3 href matched expected');
} else { } else {
errors.push(`Expected: Download icon 3 href to end with "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Download icon 3 href to be: "/exact/reports/exact_juan/IDontThinkSo.pdf"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -5375,7 +5377,7 @@ const steps = [
if (url.pathname === expectedPath) { if (url.pathname === expectedPath) {
console.log('Passed: Run icon 4 href path matched as expected'); console.log('Passed: Run icon 4 href path matched as expected');
} else { } else {
errors.push(`Expected: Run icon 4 href path to be "${expectedPath}"; actual: "${url.pathname}"`); errors.push(`Expected: Run icon 4 href path to be: "${expectedPath}"; actual: "${url.pathname}"`);
} }
//href query parameters //href query parameters
@@ -5384,7 +5386,7 @@ const steps = [
if (actualValue === expectedValue) { if (actualValue === expectedValue) {
console.log('Passed: Run icon 4 href param matched as expected'); console.log('Passed: Run icon 4 href param matched as expected');
} else { } else {
errors.push(`Expected: Run icon 4 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`); errors.push(`Expected: Run icon 4 href param "${key}" to be: "${expectedValue}"; actual: "${actualValue}"`);
} }
} }
@@ -5426,7 +5428,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) { if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 4 href matched expected'); console.log('Passed: Download icon 4 href matched expected');
} else { } else {
errors.push(`Expected: Download icon 4 href to end with "${expectedHref}"; actual: "${actualHref}"`); errors.push(`Expected: Download icon 4 href to be: "/exact/reports/exact_juan/Checking.html"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -5451,7 +5453,7 @@ const steps = [
const element = await driver.findElement(By.css('footer .pull-right > a')); const element = await driver.findElement(By.css('footer .pull-right > a'));
const elementLogo = await element.findElement(By.css('img')); const elementLogo = await element.findElement(By.css('img'));
const expectedHref = 'https://www.edgate.com'; const expectedHref = 'https://www.edgate.com/';
//Track all errors //Track all errors
const errors = []; const errors = [];
@@ -5464,11 +5466,11 @@ const steps = [
} }
//href - browser resolves the link with a trailing slash, so remove it before comparing //href - browser resolves the link with a trailing slash, so remove it before comparing
const actualHref = await element.getDomAttribute('href'); const actualHref = await element.getAttribute('href');
if (actualHref && actualHref === expectedHref) { if (actualHref && actualHref === expectedHref) {
console.log('Passed: EdGate Copyright Logo href matched as expected'); console.log('Passed: EdGate Copyright Logo href matched as expected');
} else { } else {
errors.push(`Expected: EdGate Copyright Logo href to be "https://www.edgate.com"; actual: "${actualHref}"`); errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`);
} }
//Throw summary if any validation failed //Throw summary if any validation failed
@@ -5540,7 +5542,7 @@ const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, scree
const takeScreenshot = async (driver, stepIndex, stepDescription) => { const takeScreenshot = async (driver, stepIndex, stepDescription) => {
const screenshot = await driver.takeScreenshot(); const screenshot = await driver.takeScreenshot();
const dir = path.join('screenshots', 'correlationsDashboard'); const dir = path.join('screenshots', 'correlationDashboard');
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`; const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
const screenshotPath = path.join(dir, screenshotFileName); const screenshotPath = path.join(dir, screenshotFileName);
@@ -5548,18 +5550,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'correlationDashboard.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'correlationsDashboard'); const screenshotDir = path.join('screenshots', 'correlationDashboard');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('correlationsDashboard.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('correlationsDashboard.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -5625,11 +5630,11 @@ try {
//Check if log out was successful //Check if log out was successful
if (allStepsPassed) { if (allStepsPassed) {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('PASSED: CORRELATIONS DASHBOARD(correlationsDashboard); All test steps completed successfully'); console.log('PASSED: CORRELATION DASHBOARD(correlationDashboard); All test steps completed successfully');
testStatus = 'Passed'; testStatus = 'Passed';
} else { } else {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('FAILED: CORRELATIONS DASHBOARD(correlationsDashboard); One or more test steps failed'); console.log('FAILED: CORRELATION DASHBOARD(correlationDashboard); One or more test steps failed');
console.log('FAILED STEPS:'); console.log('FAILED STEPS:');
failedSteps.forEach(step => console.error(` ✗ ${step}`)); failedSteps.forEach(step => console.error(` ✗ ${step}`));
testStatus = 'Failed'; testStatus = 'Failed';
@@ -5641,11 +5646,11 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'correlationsDashboard.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }
})(); })();
} }
export default correlationsDashboard; export default correlationDashboard;

View File

@@ -36,7 +36,7 @@ const steps = [
action: async () => { action: async () => {
const multipleChecks = 'Log In'; const multipleChecks = 'Log In';
console.log('------------->| CORRELATION DASHBOARD |<-------------'); console.log('------------->| FRAMEWORK MANAGEMENT PAGE |<-------------');
const errors = []; const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -2508,6 +2508,48 @@ const steps = [
}, },
*/ */
//FOOTER
//EdGate Copyright Logo
{
description: 'EdGate Copyright Logo',
action: async () => {
const multipleChecks = 'EdGate Copyright Logo';
const element = await driver.findElement(By.css('footer .pull-right > a'));
const elementLogo = await element.findElement(By.css('img'));
const expectedHref = 'https://www.edgate.com/';
//Track all errors
const errors = [];
//icon present
if (await elementLogo.isDisplayed()) {
console.log('Passed: EdGate Copyright Logo was displayed as expected');
} else {
errors.push('Expected: EdGate Copyright Logo was not displayed');
}
//href - browser resolves the link with a trailing slash, so remove it before comparing
const actualHref = await element.getAttribute('href');
if (actualHref && actualHref === expectedHref) {
console.log('Passed: EdGate Copyright Logo href matched as expected');
} else {
errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//NEXT ACTION //NEXT ACTION
{ {
description: 'Log Out', description: 'Log Out',
@@ -2572,6 +2614,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'frameworkManagementPage.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'frameworkManagementPage'); const screenshotDir = path.join('screenshots', 'frameworkManagementPage');
@@ -2581,9 +2625,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('frameworkManagementPageResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('frameworkManagementPageResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -2666,7 +2711,7 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'frameworkManagementPageResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }

View File

@@ -3,10 +3,9 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
import fs from 'fs'; import fs from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
import { error } from 'console';
const ExACT_landingPage = (req, res) => { const exactLandingPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: EGATE LANDING PAGE: ExACT Login Page (ExACT_landingPage) | Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: ExACT Landing Page(exactLandingPage) | Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -31,7 +30,7 @@ const steps = [
{ {
description: 'Loading Page', description: 'Loading Page',
action: async () => { action: async () => {
console.log('------------->| ExACT LANDING PAGE |<-------------'); console.log('------------->| ExACT - LANDING PAGE |<-------------');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const exactLogo = await driver.wait( const exactLogo = await driver.wait(
@@ -1189,31 +1188,31 @@ const steps = [
const errors = []; const errors = [];
//text //text
if (elementText === 'Already Have an account? Sign In') { if (elementText === 'Already have an account? Sign In') {
console.log('Passed: Already Have an account? Sign In text matched as expected'); console.log('Passed: Already have an account? Sign In text matched as expected');
} else { } 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 //font-family
if (elementFont === "Poppins, sans-serif") { 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 { } 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 //color
if (elementColor === 'rgba(32, 32, 32, 1)') { 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 { } 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 //font size
if (elementSize === '12px') { 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 { } 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 //Throw summary if any validation failed
@@ -2097,8 +2096,8 @@ const steps = [
} }
//Trigger validation by clicking Start Your Free Trial button //Trigger validation by clicking Start Your Free Trial button
await driver.findElement(By.css('#password')).sendKeys('EdGate123'); await driver.findElement(By.css('#password')).sendKeys('Etest123');
console.log('----->| NEXT ACTION: Entered Password: EdGate123'); console.log('----->| NEXT ACTION: Entered Password: Etest123');
await driver.findElement(By.css('.btn')).click(); await driver.findElement(By.css('.btn')).click();
console.log('----->| NEXT ACTION: Clicked Start Your Free Trial button'); console.log('----->| NEXT ACTION: Clicked Start Your Free Trial button');
@@ -4722,7 +4721,7 @@ const steps = [
console.log('----->| NEXT ACTION: Entered Username: exact_juan'); console.log('----->| NEXT ACTION: Entered Username: exact_juan');
await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!'); await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!');
console.log('----->| NEXT ACTION: Entered Password: Edgate1!'); console.log('----->| NEXT ACTION: Entered Password: ********');
await driver.findElement(By.css('.login')).click(); await driver.findElement(By.css('.login')).click();
console.log('----->| NEXT ACTION: Clicked Login button'); console.log('----->| NEXT ACTION: Clicked Login button');
@@ -4817,6 +4816,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'exactLandingPage.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'landingPage'); const screenshotDir = path.join('screenshots', 'landingPage');
@@ -4826,9 +4827,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('landingPageResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('landingPageResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -4889,11 +4891,11 @@ try {
if (allStepsPassed) { if (allStepsPassed) {
console.log('------------->| THE END |<-------------'); 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'; testStatus = 'Passed';
} else { } else {
console.log('------------->| THE END |<-------------'); 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:'); console.log('FAILED STEPS:');
failedSteps.forEach(step => console.error(` ✗ ${step}`)); failedSteps.forEach(step => console.error(` ✗ ${step}`));
testStatus = 'Failed'; testStatus = 'Failed';
@@ -4905,11 +4907,11 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'landingPageResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }
})(); })();
} }
export default ExACT_landingPage; export default exactLandingPage;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,977 @@
import { Builder, By, Key, until, Select, Browser } from 'selenium-webdriver';
import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
import fs, { link } from 'fs';
import XLSX from 'xlsx';
import path from 'path';
const uploadSubmitAResourcePage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Upload - Submit A Resource Page(uploadSubmitAResourcePage); Initiated</h2>');
(async function example() {
let driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(
new ChromeOptions()
.addArguments('--disable-features=MediaRouter')
.addArguments('--disable-extensions')
.addArguments('--disable-background-networking')
.addArguments('--log-level=3')
)
.build();
let testStatus = 'Failed';
let workbook;
let worksheet;
const startTime = new Date().toISOString();
const steps = [
{ description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') },
{ description: 'Expand browser', action: async () => await driver.manage().window().maximize() },
//Login
{
description: 'Login',
action: async () => {
const multipleChecks = 'Log In';
console.log('------------->| UPLOAD - SUBMIT A RESOURCE PAGE |<-------------');
const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!');
await driver.findElement(By.css('.login')).click();
console.log('----->| NEXT ACTION: Entered credentials and logged in');
//Wait for page readyState
await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
//Wait for the dashboard container to exist in DOM
await driver.wait(
until.elementLocated(By.css('.gap-idle-wrap > img')),
30000,
'Dashboard image did not appear within 30 seconds'
);
//Wait for it to be: visible
await driver.wait(async () => {
try {
const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
return await img.isDisplayed();
} catch (e) {
return false;
}
}, 30000, 'Dashboard image did not become visible within 30 seconds');
//Wait for any loading spinners to disappear
await driver.wait(async () => {
try {
const spinners = await driver.findElements(By.css('.spinner-border'));
for (const spinner of spinners) {
if (await spinner.isDisplayed()) return false;
}
return true;
} catch (e) {
return true;
}
}, 30000, 'Loading spinners did not disappear within 30 seconds');
//Wait for the slowest resource to complete
await driver.wait(async () => {
const completed = await driver.executeScript(`
const entries = performance.getEntriesByType('resource');
return entries.some(entry =>
entry.name.includes('content_sets.php') &&
entry.responseEnd > 0
);
`);
return completed;
}, 30000, 'My Content widget (content_sets.php) did not complete loading within 30 seconds');
console.log('Passed: My Content widget (content_sets.php) loaded successfully - Dashboard fully loaded');
//Final sleep to allow any remaining dynamic content to settle
await driver.sleep(2000);
console.log('Passed: ExACT Dashboard loaded successfully');
if (errors.length > 0) {
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
throw new Error(errors.join('\n'));
}
}
},
//Dashboard title
{
description: 'Dashboard title text, size, and color',
action: async () => {
const multipleChecks = 'Dashboard title';
const element = await driver.findElement(By.css('.e-heading'));
//Get text, font, size, and color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
//Track all errors
const errors = [];
//text
if (elementText === 'Correlation Dashboard') {
console.log('Passed: Dashboard title text matched as expected');
} else {
errors.push(`Expected: "Correlation Dashboard"; Actual: "${elementText}"`);
}
//font
if (elementFont === `"DM Serif Display", serif`) {
console.log('Passed: Dashboard title font-family matched as expected');
} else {
errors.push(`Expected: Dashboard title font-family "DM Serif Display, serif"; Actual: ${elementFont}`);
}
//size
if (elementSize === '32px') {
console.log('Passed: Dashboard title text font-size matched as expected');
} else {
errors.push(`Expected: Dashboard title text font-size "32px"; Actual: "${elementSize}"`);
}
//color
if (elementColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Dashboard title text color matched as expected');
} else {
errors.push(`Expected: Dashboard title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//NEXT ACTION
{
description: 'Click Upload navigation link',
action: async () => {
await driver.findElement(By.linkText('Upload')).click();
console.log('----->| NEXT ACTION: Clicked Upload navigation link');
//Wait for page readyState
await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete';
}, 30000, 'Align page did not fully load within 30 seconds');
//Wait until the element exists in the DOM
const uploadTitle = await driver.wait(
until.elementLocated(By.css('h2')),
30000
);
//Wait until it becomes visible
await driver.wait(
until.elementIsVisible(uploadTitle),
30000
);
}
},
//Upload page title
{
description: 'Upload page title text, size, and color',
action: async () => {
const multipleChecks = 'Upload page title';
const element = await driver.findElement(By.css('h2'));
//Get text, font, size, and color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
//Track all errors
const errors = [];
//text
if (elementText === 'Upload') {
console.log('Passed: Upload page title text matched as expected');
} else {
errors.push(`Expected: "Upload"; Actual: "${elementText}"`);
}
//font
if (elementFont === `"DM Serif Display", serif`) {
console.log('Passed: Upload page title font-family matched as expected');
} else {
errors.push(`Expected: Upload page title font-family "DM Serif Display, serif"; Actual: ${elementFont}`);
}
//size
if (elementSize === '32px') {
console.log('Passed: Upload page title text font-size matched as expected');
} else {
errors.push(`Expected: Upload page title text font-size "32px"; Actual: "${elementSize}"`);
}
//color
if (elementColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Upload page title text color matched as expected');
} else {
errors.push(`Expected: Upload page title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Submit A Resource tab
{
description: 'Submit A Resource tab title text, size, color, and background color',
action: async () => {
const multipleChecks = 'Submit A Resource tab title';
const element = await driver.findElement(By.linkText('Submit A Resource'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
//Track all errors
const errors = [];
//element text
if (elementText === 'Submit A Resource') {
console.log('Passed: Submit A Resource tab title text matched as expected');
} else {
errors.push(`Expected: "Submit A Resource"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
console.log('Passed: Submit A Resource tab title font-family matched as expected');
} else {
errors.push(`Expected: Submit A Resource tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
console.log('Passed: Submit A Resource tab title text font-size matched as expected');
} else {
errors.push(`Expected: Submit A Resource tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(255, 255, 255, 1)') {
console.log('Passed: Submit A Resource tab title text color matched as expected');
} else {
errors.push(`Expected: Submit A Resource tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Submit A Resource tab title background color matched as expected');
} else {
errors.push(`Expected: Submit A Resource tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Batch Upload tab
{
description: 'Batch Upload tab title text, size, color, and background color',
action: async () => {
const multipleChecks = 'Batch Upload tab title';
const element = await driver.findElement(By.linkText('Batch Upload'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
//Track all errors
const errors = [];
//element text
if (elementText === 'Batch Upload') {
console.log('Passed: Batch Upload tab title text matched as expected');
} else {
errors.push(`Expected: "Batch Upload"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
console.log('Passed: Batch Upload tab title font-family matched as expected');
} else {
errors.push(`Expected: Batch Upload tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
console.log('Passed: Batch Upload tab title text font-size matched as expected');
} else {
errors.push(`Expected: Batch Upload tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(182, 186, 181, 1)') {
console.log('Passed: Batch Upload tab title text color matched as expected');
} else {
errors.push(`Expected: Batch Upload tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Batch Upload tab title background color matched as expected');
} else {
errors.push(`Expected: Batch Upload tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Import Alignments tab
{
description: 'Import Alignments tab title text, size, color, and background color',
action: async () => {
const multipleChecks = 'Import Alignments tab title';
const element = await driver.findElement(By.linkText('Import Alignments'));
//Get text, font, size, color, and background color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
const elementBgColor = await element.getCssValue('background-color');
//Track all errors
const errors = [];
//element text
if (elementText === 'Import Alignments') {
console.log('Passed: Import Alignments tab title text matched as expected');
} else {
errors.push(`Expected: "Import Alignments"; Actual: "${elementText}"`);
}
//element font
if (elementFont === 'Poppins, sans-serif') {
console.log('Passed: Import Alignments tab title font-family matched as expected');
} else {
errors.push(`Expected: Import Alignments tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//element size
if (elementSize === '15px') {
console.log('Passed: Import Alignments tab title text font-size matched as expected');
} else {
errors.push(`Expected: Import Alignments tab title text font-size "15px"; Actual: "${elementSize}"`);
}
//element color
if (elementColor === 'rgba(182, 186, 181, 1)') {
console.log('Passed: Import Alignments tab title text color matched as expected');
} else {
errors.push(`Expected: Import Alignments tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`);
}
//element background color
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
console.log('Passed: Import Alignments tab title background color matched as expected');
} else {
errors.push(`Expected: Import Alignments tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Widget sub-title
{
description: 'Widget sub-title text, size, and color',
action: async () => {
const multipleChecks = 'Widget sub-title';
const element = await driver.findElement(By.css('.chooser-intro'));
//Get text, font, size, and color
const elementText = await element.getText();
const elementFont = await element.getCssValue('font-family');
const elementSize = await element.getCssValue('font-size');
const elementColor = await element.getCssValue('color');
//Track all errors
const errors = [];
//text
if (elementText === `Choose how you'd like to add content to the system`) {
console.log('Passed: Widget sub-title text matched as expected');
} else {
errors.push(`Expected: "Choose how you'd like to add content to the system"; Actual: "${elementText}"`);
}
//font
if (elementFont === 'Poppins, sans-serif') {
console.log('Passed: Widget sub-title font-family matched as expected');
} else {
errors.push(`Expected: Widget sub-title font-family "Poppins, sans-serif"; Actual: ${elementFont}`);
}
//size
if (elementSize === '13px') {
console.log('Passed: Widget sub-title text font-size matched as expected');
} else {
errors.push(`Expected: Widget sub-title text font-size "13px"; Actual: "${elementSize}"`);
}
//color
if (elementColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Widget sub-title text color matched as expected');
} else {
errors.push(`Expected: Widget sub-title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Enter Manually header and icon
{
description: 'Enter Manually header and icon',
action: async () => {
const multipleChecks = 'Enter Manually header and icon';
const elementIcon = await driver.findElement(By.css('.glyphicon-pencil'));
const element = await driver.findElement(By.css('.chooser-card:nth-child(1) > h4'));
//Get button text, text font, text size, text color, and button color
const elementText = await element.getText('');
const elementTextFont = await element.getCssValue('font-family');
const elementTextSize = await element.getCssValue('font-size');
const elementTextColor = await element.getCssValue('color');
//Track all errors
const errors = [];
//icon present
if (await elementIcon.isDisplayed()) {
console.log('Passed: Enter Manually pencil icon was displayed as expected');
} else {
errors.push('Expected: Enter Manually pencil icon was not displayed');
}
//text
if (elementText === 'Enter Manually') {
console.log('Passed: Enter Manually text matched as expected');
} else {
errors.push(`Expected: "Enter Manually"; Actual: "${elementText}"`);
}
//font-family
if (elementTextFont === "Poppins, sans-serif") {
console.log('Passed: Enter Manually text font matched as expected');
} else {
errors.push(`Expected: Enter Manually text font "Poppins, sans-serif"; Actual: ${elementTextFont}`);
}
//font size
if (elementTextSize === '24px') {
console.log('Passed: Enter Manually text font-size matched as expected');
} else {
errors.push(`Expected: Enter Manually text font-size "24px"; Actual: "${elementTextSize}"`);
}
//color
if (elementTextColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Enter Manually text color matched as expected');
} else {
errors.push(`Expected: Enter Manually text color: "rgba(40, 39, 90, 1)"; Actual: "${elementTextColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Enter Manually Select button
{
description: 'Enter Manually Select button',
action: async () => {
const multipleChecks = 'Enter Manually Select button';
const element = await driver.findElement(By.css('#chooseManualBtn'));
//Get button text, text font, text size, text color, and button color
const elementText = await element.getText('');
const elementTextFont = await element.getCssValue('font-family');
const elementTextSize = await element.getCssValue('font-size');
const elementTextColor = await element.getCssValue('color');
const elementButtonColor = await element.getCssValue('background-color');
//Track all errors
const errors = [];
//text
if (elementText === 'Select') {
console.log('Passed: Enter Manually Select button text matched as expected');
} else {
errors.push(`Expected: Enter Manually "Select"; Actual: "${elementText}"`);
}
//font-family
if (elementTextFont === "Poppins, sans-serif") {
console.log('Passed: Enter Manually Select button text font matched as expected');
} else {
errors.push(`Expected: Enter Manually Select button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`);
}
//font size
if (elementTextSize === '13px') {
console.log('Passed: Enter Manually Select button text font-size matched as expected');
} else {
errors.push(`Expected: Enter Manually Select button text font-size "13px"; Actual: "${elementTextSize}"`);
}
//color
if (elementTextColor === 'rgba(255, 255, 255, 1)') {
console.log('Passed: Enter Manually Select button text color matched as expected');
} else {
errors.push(`Expected: Enter Manually Select button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`);
}
//button color
if (elementButtonColor === 'rgba(48, 200, 172, 1)') {
console.log('Passed: Enter Manually Select button background color matched as expected');
} else {
errors.push(`Expected: Enter Manually Select button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Extract from Source header and icon
{
description: 'Extract from Source header and icon',
action: async () => {
const multipleChecks = 'Extract from Source header and icon';
const elementIcon = await driver.findElement(By.css('.chooser-icon > .glyphicon-file'));
const element = await driver.findElement(By.css('.chooser-card:nth-child(2) > h4'));
//Get button text, text font, text size, text color, and button color
const elementText = await element.getText('');
const elementTextFont = await element.getCssValue('font-family');
const elementTextSize = await element.getCssValue('font-size');
const elementTextColor = await element.getCssValue('color');
//Track all errors
const errors = [];
//icon present
if (await elementIcon.isDisplayed()) {
console.log('Passed: Extract from Source file icon was displayed as expected');
} else {
errors.push('Expected: Extract from Source file icon was not displayed');
}
//text
if (elementText === 'Extract from Source') {
console.log('Passed: Extract from Source text matched as expected');
} else {
errors.push(`Expected: "Extract from Source"; Actual: "${elementText}"`);
}
//font-family
if (elementTextFont === "Poppins, sans-serif") {
console.log('Passed: Extract from Source text font matched as expected');
} else {
errors.push(`Expected: Extract from Source text font "Poppins, sans-serif"; Actual: ${elementTextFont}`);
}
//font size
if (elementTextSize === '24px') {
console.log('Passed: Extract from Source text font-size matched as expected');
} else {
errors.push(`Expected: Extract from Source text font-size "24px"; Actual: "${elementTextSize}"`);
}
//color
if (elementTextColor === 'rgba(40, 39, 90, 1)') {
console.log('Passed: Extract from Source text color matched as expected');
} else {
errors.push(`Expected: Extract from Source text color: "rgba(40, 39, 90, 1)"; Actual: "${elementTextColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//Extract from Source Select button
{
description: 'Extract from Source Select button',
action: async () => {
const multipleChecks = 'Extract from Source Select button';
const element = await driver.findElement(By.css('#chooseExtractBtn'));
//Get button text, text font, text size, text color, and button color
const elementText = await element.getText('');
const elementTextFont = await element.getCssValue('font-family');
const elementTextSize = await element.getCssValue('font-size');
const elementTextColor = await element.getCssValue('color');
const elementButtonColor = await element.getCssValue('background-color');
//Track all errors
const errors = [];
//text
if (elementText === 'Select') {
console.log('Passed: Extract from Source Select button text matched as expected');
} else {
errors.push(`Expected: Extract from Source "Select"; Actual: "${elementText}"`);
}
//font-family
if (elementTextFont === "Poppins, sans-serif") {
console.log('Passed: Extract from Source Select button text font matched as expected');
} else {
errors.push(`Expected: Extract from Source Select button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`);
}
//font size
if (elementTextSize === '13px') {
console.log('Passed: Extract from Source Select button text font-size matched as expected');
} else {
errors.push(`Expected: Extract from Source Select button text font-size "13px"; Actual: "${elementTextSize}"`);
}
//color
if (elementTextColor === 'rgba(255, 255, 255, 1)') {
console.log('Passed: Extract from Source Select button text color matched as expected');
} else {
errors.push(`Expected: Extract from Source Select button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`);
}
//button color
if (elementButtonColor === 'rgba(48, 200, 172, 1)') {
console.log('Passed: Extract from Source Select button background color matched as expected');
} else {
errors.push(`Expected: Extract from Source Select button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//FOOTER
//EdGate Copyright Logo
{
description: 'EdGate Copyright Logo',
action: async () => {
const multipleChecks = 'EdGate Copyright Logo';
const element = await driver.findElement(By.css('footer .pull-right > a'));
const elementLogo = await element.findElement(By.css('img'));
const expectedHref = 'https://www.edgate.com/';
//Track all errors
const errors = [];
//icon present
if (await elementLogo.isDisplayed()) {
console.log('Passed: EdGate Copyright Logo was displayed as expected');
} else {
errors.push('Expected: EdGate Copyright Logo was not displayed');
}
//href - browser resolves the link with a trailing slash, so remove it before comparing
const actualHref = await element.getAttribute('href');
if (actualHref && actualHref === expectedHref) {
console.log('Passed: EdGate Copyright Logo href matched as expected');
} else {
errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
//NEXT ACTION
{
description: 'Log Out',
action: async () => {
const multipleChecks = 'Log Out';
//Track all errors
const errors = [];
await driver.findElement(By.css('#navbarDropdown > span')).click();
await driver.sleep(2000);
await driver.findElement(By.linkText('Log Out')).click();
console.log('----->| NEXT ACTION: Clicked User Profile and Logged Out');
//Wait until the element exists in the DOM
const exactLogo = await driver.wait(
until.elementLocated(By.css('.logo')),
30000
);
//Wait until it becomes visible
await driver.wait(
until.elementIsVisible(exactLogo),
30000
);
//Wait for page to load completely
await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete';
}, 30000, 'ExACT Langing page did not fully load within 30 seconds');
console.log('Passed: ExACT Landing Page loaded successfully');
//Throw summary if any validation failed
if (errors.length > 0) {
//Add summary line only when multiple checks failed
if (errors.length > 1) {
errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`);
}
//Throw collected messages — catch() will prefix with "FAILED:"
throw new Error(errors.join('\n'));
}
}
},
];
const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {
const json_data = XLSX.utils.sheet_to_json(worksheet, { header: 1 });
json_data.push([stepIndex, stepDescription, status, timestamp, screenshotPath]);
return XLSX.utils.aoa_to_sheet(json_data);
};
const takeScreenshot = async (driver, stepIndex, stepDescription) => {
const screenshot = await driver.takeScreenshot();
const dir = path.join('screenshots', 'uploadSubmitAResourcePage');
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
const screenshotPath = path.join(dir, screenshotFileName);
fs.writeFileSync(screenshotPath, screenshot, 'base64');
return screenshotPath;
};
const resultsFile = path.join('results', 'uploadSubmitAResourcePage.xlsx');
const clearOldResults = () => {
//Remove old screenshots
const screenshotDir = path.join('screenshots', 'uploadSubmitAResourcePage');
if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true });
}
fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file
if (fs.existsSync(resultsFile)) {
fs.unlinkSync(resultsFile);
}
fs.mkdirSync('results', { recursive: true });
};
try {
//Initialize workbook and worksheet
clearOldResults();
//Initialize workbook and worksheet
workbook = XLSX.utils.book_new();
worksheet = XLSX.utils.aoa_to_sheet([
['Step Number', 'Step Description', 'Status', 'Timestamp', 'Screenshot']
]);
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
//Log test start time
worksheet = logStep(worksheet, 'Test Start', 'Started', '', startTime, '');
let allStepsPassed = true;
const failedSteps = []; //Track failed steps
for (const step of steps) {
const stepIndex = steps.indexOf(step) + 1;
const timestamp = new Date().toISOString();
try {
//Screenshot of failed step
await step.action();
//Log a successful step with no screenshot
worksheet = logStep(
worksheet,
step.description,
'Passed',
stepIndex,
timestamp,
null //No screenshot for passed steps
);
} catch (error) {
//Only take screenshot if the step fails
const screenshotPath = await takeScreenshot(
driver,
stepIndex,
`${step.description}_Failed`
);
worksheet = logStep(
worksheet,
step.description,
'Failed',
stepIndex,
timestamp,
screenshotPath
);
console.error(`Step ${stepIndex} FAILED: ${error.message}`);
failedSteps.push(`Step ${stepIndex}: ${step.description} - ${error.message}`); //Track failed step
testStatus = 'Failed';
allStepsPassed = false;
}
}
if (allStepsPassed) {
console.log('------------->| THE END |<-------------');
console.log('PASSED: Upload - Submit A Resource Page(uploadSubmitAResourcePage); All test steps completed successfully');
testStatus = 'Passed';
} else {
console.log('------------->| THE END |<-------------');
console.log('FAILED: Upload - Submit A Resource Page(uploadSubmitAResourcePage); One or more test steps failed');
console.log('FAILED STEPS:');
failedSteps.forEach(step => console.error(` ✗ ${step}`));
testStatus = 'Failed';
}
//Log test end time
const endTime = new Date().toISOString();
worksheet = logStep(worksheet, 'Test End', testStatus, '', endTime, '');
//Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, resultsFile);
} finally {
await driver.quit();
}
})();
}
export default uploadSubmitAResourcePage;

View File

@@ -3,15 +3,14 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
import fs from 'fs'; import fs from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
import { brotliCompress } from 'zlib';
import e from 'express';
//Export JUST the steps so other scripts can import them //Export JUST the steps so other scripts can import them
export const myStandardsSearch_AlignedContent = (driver) => [ export const myStandardsSearch_AlignedContent = (driver) => [
{ {
description: 'Log Aligned Content start', description: 'Log Aligned Content start',
action: async () => { action: async () => {
console.log('------------->| MY STANDARDS - ALIGNED CONTENT |<-------------'); console.log('------------->| MY STANDARDS - ALIGNED CONTENT SEARCH |<-------------');
console.log('----------->| myStandardsSearch_AlignedContent / CONTINUE |<-------------');
} }
}, },
@@ -7752,10 +7751,10 @@ export const myStandardsSearch_AlignedContent = (driver) => [
const errors = []; const errors = [];
//text //text
if (elementText === 'Aligned Content 4') { if (elementText === 'Aligned Content 5') {
console.log('Passed: Standard Code 2, Aligned Content 4 button text matched as expected'); console.log('Passed: Standard Code 2, Aligned Content 5 button text matched as expected');
} else { } else {
errors.push(`Expected: "Aligned Content 4"; Actual: "${elementText}"`); errors.push(`Expected: "Aligned Content 5"; Actual: "${elementText}"`);
} }
//font //font
@@ -8082,6 +8081,7 @@ const myStandardsSearch = (req, res) => {
action: async () => { action: async () => {
const multipleChecks = 'Log In and navigate to Search Standards page'; const multipleChecks = 'Log In and navigate to Search Standards page';
console.log('------------->| NAVIGATE TO SEARCH STANDARDS PAGE |<-------------'); console.log('------------->| NAVIGATE TO SEARCH STANDARDS PAGE |<-------------');
console.log('------>| myStandardsSearch_AlignedContent / STAND ALONE |<-------------');
const errors = []; const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -8095,14 +8095,14 @@ const myStandardsSearch = (req, res) => {
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
/*Wait for the dashboard container to exist in DOM //Wait for the dashboard container to exist in DOM
await driver.wait( await driver.wait(
until.elementLocated(By.css('.gap-idle-wrap > img')), until.elementLocated(By.css('.gap-idle-wrap > img')),
30000, 30000,
'Dashboard image did not appear within 30 seconds' 'Dashboard image did not appear within 30 seconds'
); );
Wait for it to be visible //Wait for it to be visible
await driver.wait(async () => { await driver.wait(async () => {
try { try {
const img = await driver.findElement(By.css('.gap-idle-wrap > img')); const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
@@ -8110,7 +8110,7 @@ const myStandardsSearch = (req, res) => {
} catch (e) { } catch (e) {
return false; return false;
} }
}, 30000, 'Dashboard image did not become visible within 30 seconds');*/ }, 30000, 'Dashboard image did not become visible within 30 seconds');
//Wait for any loading spinners to disappear //Wait for any loading spinners to disappear
await driver.wait(async () => { await driver.wait(async () => {
@@ -8248,7 +8248,7 @@ const myStandardsSearch = (req, res) => {
await driver.findElement(By.css('.show > li:nth-child(14) input')).click(); await driver.findElement(By.css('.show > li:nth-child(14) input')).click();
await driver.sleep(2000); await driver.sleep(2000);
//Select "California Mathematics 1997" from dropdown //Select "California Mathematics 1997" from dropdown
await driver.findElement(By.css('.show > li:nth-child(32) input')).click(); await driver.findElement(By.css('.show > li:nth-child(34) input')).click();
await driver.sleep(2000); await driver.sleep(2000);
console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997'); console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997');
//Click away to close dropdown using executeScript to bypass interception //Click away to close dropdown using executeScript to bypass interception
@@ -8314,18 +8314,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'myStandardsSearchAlignedContent.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'myStandardsSearchAlignedContentResults'); const screenshotDir = path.join('screenshots', 'myStandardsSearchAlignedContent');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('myStandardsSearchAlignedContentResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('myStandardsSearchAlignedContentResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -8352,13 +8355,15 @@ try {
try { try {
await step.action(); await step.action();
//Log a successful step with no screenshot
worksheet = logStep( worksheet = logStep(
worksheet, worksheet,
step.description, step.description,
'Passed', 'Passed',
stepIndex, stepIndex,
timestamp, timestamp,
null null //No screenshot for passed steps
); );
} catch (error) { } catch (error) {
@@ -8402,11 +8407,11 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'myStandardsSearchAlignedContentResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }
})(); })();
}; }
export default myStandardsSearch; export default myStandardsSearch;

View File

@@ -2432,14 +2432,14 @@ const myStandardsSearchRelatedStandards = (req, res) => {
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); }, 30000, 'ExACT Dashboard did not fully load within 30 seconds');
/*Wait for the dashboard container to exist in DOM //Wait for the dashboard container to exist in DOM
await driver.wait( await driver.wait(
until.elementLocated(By.css('.gap-idle-wrap > img')), until.elementLocated(By.css('.gap-idle-wrap > img')),
30000, 30000,
'Dashboard image did not appear within 30 seconds' 'Dashboard image did not appear within 30 seconds'
); );
Wait for it to be visible //Wait for it to be visible
await driver.wait(async () => { await driver.wait(async () => {
try { try {
const img = await driver.findElement(By.css('.gap-idle-wrap > img')); const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
@@ -2447,7 +2447,7 @@ const myStandardsSearchRelatedStandards = (req, res) => {
} catch (e) { } catch (e) {
return false; return false;
} }
}, 30000, 'Dashboard image did not become visible within 30 seconds');*/ }, 30000, 'Dashboard image did not become visible within 30 seconds');
//Wait for any loading spinners to disappear //Wait for any loading spinners to disappear
await driver.wait(async () => { await driver.wait(async () => {
@@ -2585,7 +2585,7 @@ const myStandardsSearchRelatedStandards = (req, res) => {
await driver.findElement(By.css('.show > li:nth-child(14) input')).click(); await driver.findElement(By.css('.show > li:nth-child(14) input')).click();
await driver.sleep(2000); await driver.sleep(2000);
//Select "California Mathematics 1997" from dropdown //Select "California Mathematics 1997" from dropdown
await driver.findElement(By.css('.show > li:nth-child(32) input')).click(); await driver.findElement(By.css('.show > li:nth-child(34) input')).click();
await driver.sleep(2000); await driver.sleep(2000);
console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997'); console.log('----->| NEXT ACTION: Selected Include Related Standards: Washington, Common Core State Standards, California Mathematics 1997');
//Click away to close dropdown using executeScript to bypass interception //Click away to close dropdown using executeScript to bypass interception
@@ -2651,6 +2651,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'myStandardsSearchRelatedStandards.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'myStandardsSearchRelatedStandardsResults'); const screenshotDir = path.join('screenshots', 'myStandardsSearchRelatedStandardsResults');
@@ -2660,9 +2662,10 @@ const clearOldResults = () => {
fs.mkdirSync(screenshotDir, { recursive: true }); fs.mkdirSync(screenshotDir, { recursive: true });
//Remove old Excel file //Remove old Excel file
if (fs.existsSync('myStandardsSearchRelatedStandardsResults.xlsx')) { if (fs.existsSync(resultsFile)) {
fs.unlinkSync('myStandardsSearchRelatedStandardsResults.xlsx'); fs.unlinkSync(resultsFile);
} }
fs.mkdirSync('results', { recursive: true });
}; };
try { try {
@@ -2739,7 +2742,7 @@ try {
//Write the updated worksheet back to the workbook and save it //Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet; workbook.Sheets['Sheet1'] = worksheet;
XLSX.writeFile(workbook, 'myStandardsSearchRelatedStandardsResults.xlsx'); XLSX.writeFile(workbook, resultsFile);
} finally { } finally {
await driver.quit(); await driver.quit();
} }