Compare commits

...

21 Commits

Author SHA1 Message Date
jhuerta
d42e41d9aa Added stand alone logging 2026-11-10 14:19:01 -08:00
jhuerta
31c8f74518 Updated script resultfile 2026-11-10 11:27:45 -08:00
jhuerta
ff50ab728b Restructured scripts 2026-11-06 16:27:10 -08:00
jhuerta
b5d9e33b4d Moved ExACT Landing Page script 2026-11-06 15:03:26 -08:00
jhuerta
1bf8978094 Updated results excel sheet name 2026-11-06 12:44:21 -08:00
jhuerta
dc4d4c4a24 Updated My Standards Widget script 2026-11-06 12:43:23 -08:00
jhuerta
25c94ebc5e Moved Correlation Dashboard script 2026-11-06 09:53:28 -08:00
jhuerta
57e89b6b53 Added and Completed Approve tabs 2026-11-05 18:33:20 -08:00
jhuerta
8a64b6ddfe Added and Completed Specialty Reports Page script 2026-11-05 15:21:53 -08:00
jhuerta
fb5ce957fc Added and Completed View Queued Report Page script 2026-11-05 12:57:00 -08:00
jhuerta
3821c6278c Corrected end statement 2026-10-30 14:56:53 -07:00
jhuerta
f193784252 Completed Report Build Youre Report Page script 2026-10-30 12:30:54 -07:00
jhuerta
80e13f94e4 Started Report Build Your Report script 2026-10-29 15:13:49 -07:00
jhuerta
8ebaf749ce Renamed 2026-10-29 15:11:26 -07:00
jhuerta
8c5b78dbf4 Updated result sheet path 2026-10-29 15:04:55 -07:00
jhuerta
72da5df4ca Removed commented out code 2026-10-29 14:45:34 -07:00
jhuerta
7fed41d6ac Added and completed Approve Page script 2026-10-29 14:34:26 -07:00
jhuerta
54e8956472 Cleaned up Import Choose File check 2026-10-29 11:07:42 -07:00
jhuerta
866efbd43f Completed Acitivy Report script 2026-10-29 11:06:36 -07:00
jhuerta
409f9edde9 Completed Upload Import Alignments Page 2026-10-28 17:28:56 -07:00
jhuerta
015b51997e Completed script 2026-10-28 14:59:24 -07:00
41 changed files with 14780 additions and 69 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,14 +1,15 @@
import express from 'express';
import exactLandingPage from './tests/exactLandingPage.js';
import exactLandingPage from './tests/LandingPage/exactLandingPage.js';
//import ExACT_login from './tests/ExACT_login.js';
//DASHBOARDS
import correlationsDashboard from './tests/correlationsDashboard.js';
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';
@@ -28,6 +29,21 @@ 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';
@@ -46,11 +62,13 @@ 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>
<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='/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>
@@ -68,17 +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'>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>
@@ -94,12 +129,13 @@ app.get('/', (req, res) => {
})
//EXACT LANDING
app.get('/exactLandingPage', exactLandingPage);
app.get('/exactLandingPage', exactLandingPage);
//Login
//app.get('/ExACT_login', ExACT_login);
//DASHBOARDS
app.get('/correlationsDashboard', correlationsDashboard);
app.get('/correlationDashboard', correlationDashboard);
app.get('/dashboardMyStandards', dashboardMyStandards);
//FRAMEWORKS
app.get('/frameworkManagementPage', frameworkManagementPage);
@@ -117,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.

File diff suppressed because it is too large Load Diff

View File

@@ -2238,7 +2238,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'alignAutoAlignPageResults.xlsx');
const resultsFile = path.join('results', 'alignAutoAlignPage.xlsx');
const clearOldResults = () => {
//Remove old screenshots

View File

@@ -1389,7 +1389,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'alignContentPageResults.xlsx');
const resultsFile = path.join('results', 'alignContentPage.xlsx');
const clearOldResults = () => {
//Remove old screenshots

View File

@@ -1882,7 +1882,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'alignStandardsPageResults.xlsx');
const resultsFile = path.join('results', 'alignStandardsPage.xlsx');
const clearOldResults = () => {
//Remove old screenshots

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js';
import fs from 'fs';
import XLSX from 'xlsx';
import path from 'path';
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>');
@@ -330,6 +330,7 @@ const steps = [
'Creating Org',
'Demo Client Standards',
'Demo Standards',
'Imports',
'New Folder',
'QA Client Test Frameworks',
'United States Standards',
@@ -1627,6 +1628,7 @@ const steps = [
'ACT',
'ACTFL',
'AQA',
'Archived Standards',
'Australia',
'Brazil',
'Cambridge IGCSE',
@@ -2314,6 +2316,7 @@ const steps = [
'Creating Org',
'Demo Client Standards',
'Demo Standards',
'Imports',
'New Folder',
'QA Client Test Frameworks',
'United States Standards',
@@ -5053,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'
@@ -6076,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 = [];
@@ -7249,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
@@ -7499,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
@@ -7923,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 {
@@ -7961,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) {
@@ -8011,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();
}

View File

@@ -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,11 +5550,11 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'correlationsDashboard.xlsx');
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 });
}
@@ -5563,7 +5564,7 @@ const clearOldResults = () => {
if (fs.existsSync(resultsFile)) {
fs.unlinkSync(resultsFile);
}
fs.mkdirSync('results', { recursive: true });
fs.mkdirSync('results', { recursive: true });
};
try {
@@ -5629,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';
@@ -5652,4 +5653,4 @@ try {
})();
}
export default correlationsDashboard;
export default correlationDashboard;

View File

@@ -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');
@@ -2614,7 +2614,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'frameworkManagementPageResults.xlsx');
const resultsFile = path.join('results', 'frameworkManagementPage.xlsx');
const clearOldResults = () => {
//Remove old screenshots

View File

@@ -3,7 +3,6 @@ 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 exactLandingPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: ExACT Landing Page(exactLandingPage) | Initiated</h2>');
@@ -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(
@@ -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,7 +4816,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'exactLandingPageResults.xlsx');
const resultsFile = path.join('results', 'exactLandingPage.xlsx');
const clearOldResults = () => {
//Remove old screenshots

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -872,7 +872,7 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath;
};
const resultsFile = path.join('results', 'uploadSubmitAResourcePageResults.xlsx');
const resultsFile = path.join('results', 'uploadSubmitAResourcePage.xlsx');
const clearOldResults = () => {
//Remove old screenshots
@@ -951,11 +951,11 @@ try {
if (allStepsPassed) {
console.log('------------->| THE END |<-------------');
console.log('PASSED: Align - Upload - Submit A Resource Page(uploadSubmitAResourcePage); All test steps completed successfully');
console.log('PASSED: Upload - Submit A Resource Page(uploadSubmitAResourcePage); All test steps completed successfully');
testStatus = 'Passed';
} else {
console.log('------------->| THE END |<-------------');
console.log('FAILED: Align - Upload - Submit A Resource Page(uploadSubmitAResourcePage); One or more test steps failed');
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';

View File

@@ -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;

View File

@@ -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();
}