Compare commits
51 Commits
10840ac188
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
d536166028 | ||
|
|
ac0fcad963 | ||
|
|
d8d1f49056 | ||
|
|
da8d8e914c | ||
|
|
a7e36560ee | ||
|
|
5a3946ad74 | ||
|
|
1f9e03c530 | ||
|
|
77b04d695b | ||
|
|
c34e61937c | ||
|
|
d36ba0ca22 | ||
|
|
d499d802a3 | ||
|
|
a6fcb195bc | ||
|
|
fca0f654ac | ||
|
|
ae97282f9a | ||
|
|
d2583998c8 | ||
|
|
6f30e1b432 | ||
|
|
8b4fdc706e | ||
|
|
d6793d7c55 | ||
|
|
d6171d8661 | ||
|
|
9f1cbb7b2e | ||
|
|
2e0d791286 | ||
|
|
300804baaf | ||
|
|
fc96f911f6 | ||
|
|
8e77e7f622 | ||
|
|
1111b1c00a |
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.
199
index.js
199
index.js
@@ -1,29 +1,58 @@
|
||||
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';
|
||||
//Dashboard
|
||||
import ExACT_dashboard from './tests/ExACT_dashboard.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_dashboardSemanticStandardsComparison from './tests/ExACT_dashboardSemanticStandardsComparison.js';
|
||||
import dashboardMyStandards from './tests/dashboardMyStandards.js';
|
||||
|
||||
import myStandardsSearchAlignedContent from './tests/myStandardsSearchAlignedContent.js';
|
||||
import myStandardsSearchRelatedStandards from './tests/myStandardsSearchRelatedStandards.js';
|
||||
//Content
|
||||
import ExACT_contentPage from './tests/ExACT_contentPage.js';
|
||||
import ExACT_editItem from './tests/ExACT_editItem.js';
|
||||
//Align
|
||||
import ExACT_alignContentPage from './tests/ExACT_alignContentPage.js';
|
||||
import ExACT_alignStandardsPage from './tests/ExACT_alignStandardsPage.js';
|
||||
import ExACT_editItemAddConcept from './tests/ExACT_editItemAddConcept.js';
|
||||
import ExACT_alignConceptsPage from './tests/ExACT_alignConceptsPage.js';
|
||||
//Framework
|
||||
import ExACT_frameworkManagementPage from './tests/ExACT_frameworkManagementPage.js';
|
||||
|
||||
//FRAMEWORKS
|
||||
import frameworkManagementPage from './tests/Frameworks/frameworkManagementPage.js';
|
||||
|
||||
import ExACT_frameworkPublishingPage from './tests/ExACT_frameworkPublishingPage.js';
|
||||
import ExACT_frameworkPublishFrameworkDIV from './tests/ExACT_frameworkPublishFrameworkDIV.js';
|
||||
import ExACT_frameworkFrameworkGroupsDIV from './tests/ExACT_frameworkFrameworkGroupsDIV.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();
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
@@ -33,67 +62,129 @@ 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='/ExACT_dashboard' target='_blank'>Correlations Dashboard</a></strong></div>
|
||||
<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_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>
|
||||
<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='/ExACT_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_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>
|
||||
|
||||
<h1 style="text-align:center; color:#055a8c; font-size:20px; ">FRAMEWORKS</h1>
|
||||
<div style="padding:3px;"><strong><a href='/ExACT_frameworkManagementPage' target='_blank'>Framework Management Page</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>
|
||||
-->
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<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_editItem' target='_blank'>Edit Item</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_alignConceptsPage' target='_blank'>Align Concepts Page</a></strong></div>
|
||||
-->
|
||||
|
||||
<br>
|
||||
</div>
|
||||
`);
|
||||
})
|
||||
|
||||
//Landing:
|
||||
app.get('/ExACT_landingPage', ExACT_landingPage);
|
||||
//EXACT LANDING
|
||||
app.get('/exactLandingPage', exactLandingPage);
|
||||
//Login
|
||||
//app.get('/ExACT_login', ExACT_login);
|
||||
//Dashboard
|
||||
app.get('/ExACT_dashboard', ExACT_dashboard);
|
||||
//My Content
|
||||
app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent);
|
||||
app.get('/ExACT_dashboardSemanticStandardsComparison', ExACT_dashboardSemanticStandardsComparison);
|
||||
|
||||
//DASHBOARDS
|
||||
app.get('/correlationDashboard', correlationDashboard);
|
||||
app.get('/dashboardMyStandards', dashboardMyStandards);
|
||||
app.get('/myStandardsSearchAlignedContent', myStandardsSearchAlignedContent);
|
||||
app.get('/myStandardsSearchRelatedStandards', myStandardsSearchRelatedStandards);
|
||||
|
||||
//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('/myStandardsSearchRelatedStandards', myStandardsSearchRelatedStandards);
|
||||
|
||||
//Content
|
||||
app.get('/ExACT_contentPage', ExACT_contentPage);
|
||||
|
||||
//Edit Item
|
||||
app.get('/ExACT_editItem', ExACT_editItem);
|
||||
//Align
|
||||
app.get('/ExACT_alignContentPage', ExACT_alignContentPage);
|
||||
app.get('/ExACT_alignStandardsPage', ExACT_alignStandardsPage);
|
||||
|
||||
app.get('/ExACT_editItemAddConcept', ExACT_editItemAddConcept);
|
||||
app.get('/ExACT_alignConceptsPage', ExACT_alignConceptsPage);
|
||||
//Framework
|
||||
app.get('/ExACT_frameworkManagementPage', ExACT_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, () => {
|
||||
console.log('Server is up and running on port 8000');
|
||||
});
|
||||
Binary file not shown.
BIN
results/correlationDashboard.xlsx
Normal file
BIN
results/correlationDashboard.xlsx
Normal file
Binary file not shown.
Binary file not shown.
BIN
results/myStandardsSearchAlignedContent.xlsx
Normal file
BIN
results/myStandardsSearchAlignedContent.xlsx
Normal file
Binary file not shown.
Binary file not shown.
1039
tests/ActivityReport/ActivityReportPage.js
Normal file
1039
tests/ActivityReport/ActivityReportPage.js
Normal file
File diff suppressed because it is too large
Load Diff
2343
tests/Align/alignAutoAlignPage.js
Normal file
2343
tests/Align/alignAutoAlignPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1494
tests/Align/alignContentPage.js
Normal file
1494
tests/Align/alignContentPage.js
Normal file
File diff suppressed because it is too large
Load Diff
1987
tests/Align/alignStandardsPage.js
Normal file
1987
tests/Align/alignStandardsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
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
@@ -3,11 +3,10 @@ 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 { myStandardsSearch_AlignedContent } from './myStandardsSearchAlignedContent.js';
|
||||
import { myStandardsSearch_AlignedContent } from '../../myStandardsSearchAlignedContent.js';
|
||||
|
||||
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>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -331,6 +330,7 @@ const steps = [
|
||||
'Creating Org',
|
||||
'Demo Client Standards',
|
||||
'Demo Standards',
|
||||
'Imports',
|
||||
'New Folder',
|
||||
'QA Client Test Frameworks',
|
||||
'United States Standards',
|
||||
@@ -1628,6 +1628,7 @@ const steps = [
|
||||
'ACT',
|
||||
'ACTFL',
|
||||
'AQA',
|
||||
'Archived Standards',
|
||||
'Australia',
|
||||
'Brazil',
|
||||
'Cambridge IGCSE',
|
||||
@@ -2315,6 +2316,7 @@ const steps = [
|
||||
'Creating Org',
|
||||
'Demo Client Standards',
|
||||
'Demo Standards',
|
||||
'Imports',
|
||||
'New Folder',
|
||||
'QA Client Test Frameworks',
|
||||
'United States Standards',
|
||||
@@ -5054,9 +5056,9 @@ const steps = [
|
||||
//Adopted
|
||||
{
|
||||
selector: '.notenabled:nth-child(7) > td:nth-child(2)',
|
||||
label: '2017',
|
||||
label: '2024',
|
||||
expected: {
|
||||
text: '2017',
|
||||
text: '2024',
|
||||
font: 'Poppins, sans-serif',
|
||||
color: 'rgba(119, 119, 119, 1)',
|
||||
size: '12.87px'
|
||||
@@ -6077,15 +6079,17 @@ const steps = [
|
||||
'WIDA Consortium (2020)',
|
||||
'5th Grade Import ECS-2732',
|
||||
'Imported Framework Updated',
|
||||
'NewTicket',
|
||||
'ECS-2933 Testing On Prod',
|
||||
//'Stats Test Framework',
|
||||
'Widget Test',
|
||||
'ecs31444',
|
||||
'California Mathematics 1997',
|
||||
'Georgia Archived Language Arts QA',
|
||||
'Georgia Current Language Arts QA',
|
||||
'Georgia Future Language Arts QA',
|
||||
'create group test',
|
||||
'IMport Test'
|
||||
'IMport Test',
|
||||
'Georgia WL Import'
|
||||
];
|
||||
const actual = [];
|
||||
|
||||
@@ -7250,7 +7254,10 @@ const steps = [
|
||||
'ECS-3037 On Prod TC2',
|
||||
'ECS-3037 On Prod TC1',
|
||||
'webinar test',
|
||||
'Post NIght July26'
|
||||
'Review Screen Open',
|
||||
'New One For Agust Post Night',
|
||||
'Post NIght July26',
|
||||
'create import test'
|
||||
];
|
||||
|
||||
//Track all errors
|
||||
@@ -7500,14 +7507,17 @@ const steps = [
|
||||
'WIDA Consortium (2020)',
|
||||
'5th Grade Import ECS-2732',
|
||||
'Imported Framework Updated',
|
||||
'NewTicket',
|
||||
'ECS-2933 Testing On Prod',
|
||||
'Widget Test',
|
||||
'ecs31444',
|
||||
'California Mathematics 1997',
|
||||
'Georgia Archived Language Arts QA',
|
||||
'Georgia Current Language Arts QA',
|
||||
'Georgia Future Language Arts QA',
|
||||
'create group test',
|
||||
'IMport Test'
|
||||
'IMport Test',
|
||||
'Georgia WL Import'
|
||||
];
|
||||
|
||||
//Length validation
|
||||
@@ -7924,18 +7934,21 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'dashboardMyStandards.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'dashboardMyStandardsResults');
|
||||
const screenshotDir = path.join('screenshots', 'dashboardMyStandards');
|
||||
if (fs.existsSync(screenshotDir)) {
|
||||
fs.rmSync(screenshotDir, { recursive: true, force: true });
|
||||
}
|
||||
fs.mkdirSync(screenshotDir, { recursive: true });
|
||||
|
||||
//Remove old Excel file
|
||||
if (fs.existsSync('dashboardMyStandardsResults.xlsx')) {
|
||||
fs.unlinkSync('dashboardMyStandardsResults.xlsx');
|
||||
if (fs.existsSync(resultsFile)) {
|
||||
fs.unlinkSync(resultsFile);
|
||||
}
|
||||
fs.mkdirSync('results', { recursive: true });
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -7962,13 +7975,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) {
|
||||
@@ -7996,11 +8011,11 @@ try {
|
||||
|
||||
if (allStepsPassed) {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('PASSED: DASHBOARD - My Standards Widget (dashboardMyStandards); All test steps completed successfully');
|
||||
console.log('PASSED: DASHBOARD - My Standards Widget(dashboardMyStandards); All test steps completed successfully');
|
||||
testStatus = 'Passed';
|
||||
} else {
|
||||
console.log('------------->| THE END |<-------------');
|
||||
console.log('FAILED: DASHBOARD - My Standards Widget (dashboardMyStandards); One or more test steps failed');
|
||||
console.log('FAILED: DASHBOARD - My Standards Widget(dashboardMyStandards); One or more test steps failed');
|
||||
console.log('FAILED STEPS:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -8012,7 +8027,7 @@ try {
|
||||
|
||||
//Write the updated worksheet back to the workbook and save it
|
||||
workbook.Sheets['Sheet1'] = worksheet;
|
||||
XLSX.writeFile(workbook, 'dashboardMyStandardsResults.xlsx');
|
||||
XLSX.writeFile(workbook, resultsFile);
|
||||
} finally {
|
||||
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
2721
tests/Frameworks/frameworkManagementPage.js
Normal file
2721
tests/Frameworks/frameworkManagementPage.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
977
tests/Upload/uploadSubmitAResourcePage.js
Normal file
977
tests/Upload/uploadSubmitAResourcePage.js
Normal 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;
|
||||
@@ -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
|
||||
@@ -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