Compare commits
27 Commits
d536166028
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a91b0e0d7 | ||
|
|
d42e41d9aa | ||
|
|
31c8f74518 | ||
|
|
ff50ab728b | ||
|
|
b5d9e33b4d | ||
|
|
1bf8978094 | ||
|
|
dc4d4c4a24 | ||
|
|
25c94ebc5e | ||
|
|
57e89b6b53 | ||
|
|
8a64b6ddfe | ||
|
|
fb5ce957fc | ||
|
|
3821c6278c | ||
|
|
f193784252 | ||
|
|
80e13f94e4 | ||
|
|
8ebaf749ce | ||
|
|
8c5b78dbf4 | ||
|
|
72da5df4ca | ||
|
|
7fed41d6ac | ||
|
|
54e8956472 | ||
|
|
866efbd43f | ||
|
|
409f9edde9 | ||
|
|
015b51997e | ||
|
|
5186faf1b6 | ||
|
|
45b89837e1 | ||
|
|
300708a85a | ||
|
|
a27fd65cce | ||
|
|
2e3a67438e |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dashboard.xlsx
BIN
dashboard.xlsx
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.
91
index.js
91
index.js
@@ -1,14 +1,15 @@
|
||||
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';
|
||||
|
||||
//DASHBOARDS
|
||||
import correlationsDashboard from './tests/correlationsDashboard.js';
|
||||
//DASHBOARD
|
||||
import correlationDashboard from './tests/CorrelationDashboard/correlationDashboard.js';
|
||||
import myStandardsWidget from './tests/CorrelationDashboard/Widgets/myStandardsWidget.js';
|
||||
import myContentWidget from './tests/CorrelationDashboard/Widgets/myContentWidget.js';
|
||||
|
||||
import ExACT_dashboardMyContent from './tests/ExACT_dashboardMyContent.js';
|
||||
import ExACT_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js';
|
||||
import dashboardMyStandards from './tests/dashboardMyStandards.js';
|
||||
|
||||
import myStandardsSearchAlignedContent from './tests/myStandardsSearchAlignedContent.js';
|
||||
import myStandardsSearchRelatedStandards from './tests/myStandardsSearchRelatedStandards.js';
|
||||
|
||||
@@ -27,7 +28,22 @@ 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/Activity Report/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';
|
||||
@@ -46,15 +62,17 @@ app.get('/', (req, res) => {
|
||||
<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>
|
||||
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">EDGATE LANDING PAGE</h1>
|
||||
<div style="padding:3px;"><strong><a href='/ExACT_landingPage' target='_blank'>ExACT Landing Page</a></strong></div>
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">EXACT LANDING PAGE</h1>
|
||||
<div style="padding:3px;"><strong><a href='/exactLandingPage' target='_blank'>ExACT Landing Page</a></strong></div>
|
||||
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">DASHBOARD</h1>
|
||||
<div style="padding:3px;"><strong><a href='/correlationsDashboard' target='_blank'>Correlations Dashboard</a></strong></div>
|
||||
<div style="padding:3px;"><strong><a href='/correlationDashboard' target='_blank'>Correlation Dashboard</a></strong></div>
|
||||
<div style="padding:3px;"><strong>- <a href='/myStandardsWidget' target='_blank'>My Standards Widget</a></strong></div>
|
||||
<div style="padding:3px;"><strong>- <a href='/myContentWidget' target='_blank'>My Content Widget</a></strong></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- NEEDS UPDATE
|
||||
<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>
|
||||
|
||||
@@ -68,16 +86,34 @@ app.get('/', (req, res) => {
|
||||
<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'>Upload - Submit A Resource Page</a></strong></div>
|
||||
<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='/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>
|
||||
<div style="padding:3px;"><strong><a href='/ExACT_contentPage' target='_blank'>Content Page</a></strong></div>
|
||||
@@ -93,12 +129,14 @@ app.get('/', (req, res) => {
|
||||
})
|
||||
|
||||
//EXACT LANDING
|
||||
app.get('/ExACT_landingPage', ExACT_landingPage);
|
||||
app.get('/exactLandingPage', exactLandingPage);
|
||||
//Login
|
||||
//app.get('/ExACT_login', ExACT_login);
|
||||
|
||||
//DASHBOARDS
|
||||
app.get('/correlationsDashboard', correlationsDashboard);
|
||||
app.get('/correlationDashboard', correlationDashboard);
|
||||
app.get('/myStandardsWidget', myStandardsWidget);
|
||||
app.get('/myContentWidget', myContentWidget);
|
||||
|
||||
//FRAMEWORKS
|
||||
app.get('/frameworkManagementPage', frameworkManagementPage);
|
||||
@@ -115,11 +153,26 @@ 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('/dashboardMyStandards', dashboardMyStandards);
|
||||
|
||||
app.get('/myStandardsSearchAlignedContent', myStandardsSearchAlignedContent);
|
||||
app.get('/myStandardsSearchRelatedStandards', myStandardsSearchRelatedStandards);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
results/myContentWidget.xlsx
Normal file
BIN
results/myContentWidget.xlsx
Normal file
Binary file not shown.
BIN
results/myStandardsSearchAlignedContent.xlsx
Normal file
BIN
results/myStandardsSearchAlignedContent.xlsx
Normal file
Binary file not shown.
Binary file not shown.
BIN
results/myStandardsWidget.xlsx
Normal file
BIN
results/myStandardsWidget.xlsx
Normal file
Binary file not shown.
1039
tests/Activity Report/ActivityReportPage.js
Normal file
1039
tests/Activity Report/ActivityReportPage.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -517,7 +517,7 @@ const steps = [
|
||||
|
||||
//NEXT ACTION
|
||||
{
|
||||
description: 'Click AutoAlign navigation tab',
|
||||
description: 'Click AutoAlign tab',
|
||||
action: async () => {
|
||||
await driver.findElement(By.linkText('AutoAlign')).click();
|
||||
console.log('----->| NEXT ACTION: Clicked AutoAlign tab');
|
||||
@@ -2238,6 +2238,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'alignAutoAlignPage.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'alignAutoAlignPage');
|
||||
@@ -2247,9 +2249,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('alignAutoAlignPageResults.xlsx')) {
|
||||
fs.unlinkSync('alignAutoAlignPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -2330,7 +2333,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'alignAutoAlignPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
|
||||
@@ -1389,6 +1389,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'alignContentPage.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'alignContentPage');
|
||||
@@ -1398,9 +1400,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('alignContentPageResults.xlsx')) {
|
||||
fs.unlinkSync('alignContentPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -1481,7 +1484,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'alignContentPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
|
||||
@@ -1882,6 +1882,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'alignStandardsPage.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'alignStandardsPage');
|
||||
@@ -1891,9 +1893,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('alignStandardsPageResults.xlsx')) {
|
||||
fs.unlinkSync('alignStandardsPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -1974,7 +1977,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'alignStandardsPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
|
||||
1541
tests/Approve/approveApprovalHistoryPage.js
Normal file
1541
tests/Approve/approveApprovalHistoryPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1541
tests/Approve/approveContentSubmissionsPage.js
Normal file
1541
tests/Approve/approveContentSubmissionsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1159
tests/Approve/approvePendingAlignmentsPage.js
Normal file
1159
tests/Approve/approvePendingAlignmentsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1541
tests/Approve/approveRejectionHistoryPage.js
Normal file
1541
tests/Approve/approveRejectionHistoryPage.js
Normal file
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
@@ -4,8 +4,8 @@ import fs from 'fs';
|
||||
import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const correlationsDashboard = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Correlations Dashboard(correlationsDashboard) | Initiated</h2>');
|
||||
const correlationDashboard = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Correlation Dashboard(correlationDashboard) | Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -1599,6 +1599,7 @@ const steps = [
|
||||
'Creating Org',
|
||||
'Demo Client Standards',
|
||||
'Demo Standards',
|
||||
'Imports',
|
||||
'New Folder',
|
||||
'QA Client Test Frameworks',
|
||||
'United States Standards',
|
||||
@@ -5541,7 +5542,7 @@ const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, scree
|
||||
const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
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 screenshotPath = path.join(dir, screenshotFileName);
|
||||
@@ -5549,18 +5550,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'correlationDashboard.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'correlationsDashboard');
|
||||
const screenshotDir = path.join('screenshots', 'correlationDashboard');
|
||||
if (fs.existsSync(screenshotDir)) {
|
||||
fs.rmSync(screenshotDir, { recursive: true, force: true });
|
||||
}
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('correlationsDashboard.xlsx')) {
|
||||
fs.unlinkSync('correlationsDashboard.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -5626,11 +5630,11 @@ try {
|
||||
//Check if log out was successful
|
||||
if (allStepsPassed) {
|
||||
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';
|
||||
} else {
|
||||
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:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -5642,11 +5646,11 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'correlationsDashboard.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
export default correlationsDashboard;
|
||||
export default correlationDashboard;
|
||||
@@ -36,7 +36,7 @@ const steps = [
|
||||
action: async () => {
|
||||
const multipleChecks = 'Log In';
|
||||
|
||||
console.log('------------->| CORRELATION DASHBOARD |<-------------');
|
||||
console.log('------------->| FRAMEWORK MANAGEMENT PAGE |<-------------');
|
||||
const errors = [];
|
||||
|
||||
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
|
||||
{
|
||||
description: 'Log Out',
|
||||
@@ -2572,6 +2614,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'frameworkManagementPage.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'frameworkManagementPage');
|
||||
@@ -2581,9 +2625,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('frameworkManagementPageResults.xlsx')) {
|
||||
fs.unlinkSync('frameworkManagementPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -2666,7 +2711,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'frameworkManagementPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
|
||||
@@ -3,10 +3,9 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
|
||||
import fs from 'fs';
|
||||
import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
import { error } from 'console';
|
||||
|
||||
const ExACT_landingPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: EGATE LANDING PAGE: ExACT Login Page (ExACT_landingPage) | Initiated</h2>');
|
||||
const exactLandingPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: ExACT Landing Page(exactLandingPage) | Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -31,7 +30,7 @@ const steps = [
|
||||
{
|
||||
description: 'Loading Page',
|
||||
action: async () => {
|
||||
console.log('------------->| ExACT LANDING PAGE |<-------------');
|
||||
console.log('------------->| ExACT - LANDING PAGE |<-------------');
|
||||
|
||||
//Wait until the element exists in the DOM
|
||||
const exactLogo = await driver.wait(
|
||||
@@ -1189,31 +1188,31 @@ const steps = [
|
||||
const errors = [];
|
||||
|
||||
//text
|
||||
if (elementText === 'Already Have an account? Sign In') {
|
||||
console.log('Passed: Already Have an account? Sign In text matched as expected');
|
||||
if (elementText === 'Already have an account? Sign In') {
|
||||
console.log('Passed: Already have an account? Sign In text matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: "Already Have an account? Sign In"; Actual: "${elementText}"`);
|
||||
errors.push(`Expected: "Already have an account? Sign In"; Actual: "${elementText}"`);
|
||||
}
|
||||
|
||||
//font-family
|
||||
if (elementFont === "Poppins, sans-serif") {
|
||||
console.log('Passed: Already Have an account? Sign In text font matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In text font matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In text font "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||
errors.push(`Expected: Already have an account? Sign In text font "Poppins, sans-serif"; Actual: ${elementFont}`);
|
||||
}
|
||||
|
||||
//color
|
||||
if (elementColor === 'rgba(32, 32, 32, 1)') {
|
||||
console.log('Passed: Already Have an account? Sign In color matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In color "rgba(32, 32, 32, 1)"; Actual: "${elementColor}"`);
|
||||
errors.push(`Expected: Already have an account? Sign In color "rgba(32, 32, 32, 1)"; Actual: "${elementColor}"`);
|
||||
}
|
||||
|
||||
//font size
|
||||
if (elementSize === '12px') {
|
||||
console.log('Passed: Already Have an account? Sign In text font-size matched as expected');
|
||||
console.log('Passed: Already have an account? Sign In text font-size matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Already Have an account? Sign In text font-size "12px"; Actual: "${elementSize}"`);
|
||||
errors.push(`Expected: Already have an account? Sign In text font-size "12px"; Actual: "${elementSize}"`);
|
||||
}
|
||||
|
||||
//Throw summary if any validation failed
|
||||
@@ -2097,8 +2096,8 @@ const steps = [
|
||||
}
|
||||
|
||||
//Trigger validation by clicking Start Your Free Trial button
|
||||
await driver.findElement(By.css('#password')).sendKeys('EdGate123');
|
||||
console.log('----->| NEXT ACTION: Entered Password: EdGate123');
|
||||
await driver.findElement(By.css('#password')).sendKeys('Etest123');
|
||||
console.log('----->| NEXT ACTION: Entered Password: Etest123');
|
||||
|
||||
await driver.findElement(By.css('.btn')).click();
|
||||
console.log('----->| NEXT ACTION: Clicked Start Your Free Trial button');
|
||||
@@ -4722,7 +4721,7 @@ const steps = [
|
||||
console.log('----->| NEXT ACTION: Entered Username: exact_juan');
|
||||
|
||||
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();
|
||||
console.log('----->| NEXT ACTION: Clicked Login button');
|
||||
@@ -4817,6 +4816,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'exactLandingPage.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'landingPage');
|
||||
@@ -4826,9 +4827,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('landingPageResults.xlsx')) {
|
||||
fs.unlinkSync('landingPageResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -4889,11 +4891,11 @@ try {
|
||||
|
||||
if (allStepsPassed) {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('PASSED: EDGATE LANDING PAGE - ExACT Landing Page (ExACT_landingPage); All test steps completed successfully');
|
||||
console.log('PASSED: ExACT Landing Page(exactLandingPage); All test steps completed successfully');
|
||||
testStatus = 'Passed';
|
||||
} else {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('FAILED: EDGATE LANDING PAGE - ExACT Landing Page (ExACT_landingPage); One or more test steps failed');
|
||||
console.log('FAILED: ExACT Landing Page(exactLandingPage); One or more test steps failed');
|
||||
console.log('FAILED STEPS:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -4905,11 +4907,11 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'landingPageResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
export default ExACT_landingPage;
|
||||
export default exactLandingPage;
|
||||
1742
tests/Report/reportBuildYourReportPage.js
Normal file
1742
tests/Report/reportBuildYourReportPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1308
tests/Report/reportSpecialtyReportsPage.js
Normal file
1308
tests/Report/reportSpecialtyReportsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1710
tests/Report/reportViewQueuedReportsPage.js
Normal file
1710
tests/Report/reportViewQueuedReportsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1521
tests/Upload/uploadBatchUpload.js
Normal file
1521
tests/Upload/uploadBatchUpload.js
Normal file
File diff suppressed because it is too large
Load Diff
1534
tests/Upload/uploadImportAlignmentsPage.js
Normal file
1534
tests/Upload/uploadImportAlignmentsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,15 +3,14 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
|
||||
import fs from 'fs';
|
||||
import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
import { brotliCompress } from 'zlib';
|
||||
import e from 'express';
|
||||
|
||||
//Export JUST the steps so other scripts can import them
|
||||
export const myStandardsSearch_AlignedContent = (driver) => [
|
||||
{
|
||||
description: 'Log Aligned Content start',
|
||||
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 = [];
|
||||
|
||||
//text
|
||||
if (elementText === 'Aligned Content 4') {
|
||||
console.log('Passed: Standard Code 2, Aligned Content 4 button text matched as expected');
|
||||
if (elementText === 'Aligned Content 5') {
|
||||
console.log('Passed: Standard Code 2, Aligned Content 5 button text matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: "Aligned Content 4"; Actual: "${elementText}"`);
|
||||
errors.push(`Expected: "Aligned Content 5"; Actual: "${elementText}"`);
|
||||
}
|
||||
|
||||
//font
|
||||
@@ -8082,6 +8081,7 @@ const myStandardsSearch = (req, res) => {
|
||||
action: async () => {
|
||||
const multipleChecks = 'Log In and navigate to Search Standards page';
|
||||
console.log('------------->| NAVIGATE TO SEARCH STANDARDS PAGE |<-------------');
|
||||
console.log('------>| myStandardsSearch_AlignedContent / STAND ALONE |<-------------');
|
||||
const errors = [];
|
||||
|
||||
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
|
||||
@@ -8095,14 +8095,14 @@ const myStandardsSearch = (req, res) => {
|
||||
return readyState === 'complete';
|
||||
}, 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(
|
||||
until.elementLocated(By.css('.gap-idle-wrap > img')),
|
||||
30000,
|
||||
'Dashboard image did not appear within 30 seconds'
|
||||
);
|
||||
|
||||
Wait for it to be visible
|
||||
//Wait for it to be visible
|
||||
await driver.wait(async () => {
|
||||
try {
|
||||
const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
|
||||
@@ -8110,7 +8110,7 @@ const myStandardsSearch = (req, res) => {
|
||||
} catch (e) {
|
||||
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
|
||||
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.sleep(2000);
|
||||
//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);
|
||||
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
|
||||
@@ -8306,7 +8306,7 @@ const myStandardsSearch = (req, res) => {
|
||||
const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
const screenshot = await driver.takeScreenshot();
|
||||
|
||||
const dir = path.join('screenshots', 'myStandardsSearchAlignedContentResults');
|
||||
const dir = path.join('screenshots', 'myStandardsSearchAlignedContent');
|
||||
|
||||
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
|
||||
const screenshotPath = path.join(dir, screenshotFileName);
|
||||
@@ -8314,18 +8314,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'myStandardsSearchAlignedContent.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'myStandardsSearchAlignedContentResults');
|
||||
const screenshotDir = path.join('screenshots', 'myStandardsSearchAlignedContent');
|
||||
if (fs.existsSync(screenshotDir)) {
|
||||
fs.rmSync(screenshotDir, { recursive: true, force: true });
|
||||
}
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('myStandardsSearchAlignedContentResults.xlsx')) {
|
||||
fs.unlinkSync('myStandardsSearchAlignedContentResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -8352,13 +8355,15 @@ try {
|
||||
|
||||
try {
|
||||
await step.action();
|
||||
|
||||
//Log a successful step with no screenshot
|
||||
worksheet = logStep(
|
||||
worksheet,
|
||||
step.description,
|
||||
'Passed',
|
||||
stepIndex,
|
||||
timestamp,
|
||||
null
|
||||
null //No screenshot for passed steps
|
||||
);
|
||||
|
||||
} catch (error) {
|
||||
@@ -8402,11 +8407,11 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'myStandardsSearchAlignedContentResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
})();
|
||||
};
|
||||
}
|
||||
|
||||
export default myStandardsSearch;
|
||||
|
||||
@@ -2432,14 +2432,14 @@ const myStandardsSearchRelatedStandards = (req, res) => {
|
||||
return readyState === 'complete';
|
||||
}, 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(
|
||||
until.elementLocated(By.css('.gap-idle-wrap > img')),
|
||||
30000,
|
||||
'Dashboard image did not appear within 30 seconds'
|
||||
);
|
||||
|
||||
Wait for it to be visible
|
||||
//Wait for it to be visible
|
||||
await driver.wait(async () => {
|
||||
try {
|
||||
const img = await driver.findElement(By.css('.gap-idle-wrap > img'));
|
||||
@@ -2447,7 +2447,7 @@ const myStandardsSearchRelatedStandards = (req, res) => {
|
||||
} catch (e) {
|
||||
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
|
||||
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.sleep(2000);
|
||||
//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);
|
||||
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
|
||||
@@ -2651,6 +2651,8 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'myStandardsSearchRelatedStandards.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'myStandardsSearchRelatedStandardsResults');
|
||||
@@ -2660,9 +2662,10 @@ const clearOldResults = () => {
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('myStandardsSearchRelatedStandardsResults.xlsx')) {
|
||||
fs.unlinkSync('myStandardsSearchRelatedStandardsResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -2739,7 +2742,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'myStandardsSearchRelatedStandardsResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
await driver.quit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user