Added and Completed Approve tabs

This commit is contained in:
jhuerta
2026-11-05 18:33:20 -08:00
parent 8a64b6ddfe
commit 57e89b6b53
10 changed files with 4648 additions and 16 deletions

View File

@@ -39,7 +39,10 @@ import reportViewQueuedReportsPage from './tests/Report/reportViewQueuedReportsP
import reportSpecialtyReportsPage from './tests/Report/reportSpecialtyReportsPage.js'; import reportSpecialtyReportsPage from './tests/Report/reportSpecialtyReportsPage.js';
//APPROVE //APPROVE
import approvePage from './tests/Approve/approvePage.js'; 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 //Content
import ExACT_contentPage from './tests/ExACT_contentPage.js'; import ExACT_contentPage from './tests/ExACT_contentPage.js';
@@ -96,7 +99,10 @@ app.get('/', (req, res) => {
<div style="padding:3px;"><strong><a href='/reportSpecialtyReportsPage' target='_blank'>Specialty 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> <h1 style="text-align:center; color:#055a8c; font-size:20px; ">APPROVE</h1>
<div style="padding:3px;"><strong><a href='/approvePage' target='_blank'>Approve Page</a></strong></div> <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 <!-- NEEDS UPDATE
<div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div> <div style="padding:3px;"><strong><a href='/ExACT_dashboardSemanticStandardsComparison' target='_blank'>Semantic Standards Comparison Widget</a></strong></div>
@@ -152,7 +158,10 @@ app.get('/reportViewQueuedReportsPage', reportViewQueuedReportsPage);
app.get('/reportSpecialtyReportsPage', reportSpecialtyReportsPage); app.get('/reportSpecialtyReportsPage', reportSpecialtyReportsPage);
//APPROVE //APPROVE
app.get('/approvePage', approvePage); app.get('/approvePendingAlignmentsPage', approvePendingAlignmentsPage);
app.get('/approveContentSubmissionsPage', approveContentSubmissionsPage);
app.get('/approveApprovalHistoryPage', approveApprovalHistoryPage);
app.get('/approveRejectionHistoryPage', approveRejectionHistoryPage);
//My Content //My Content
app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent); app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,8 +4,8 @@ import fs, { link } from 'fs';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import path from 'path'; import path from 'path';
const approvePage = (req, res) => { const approvePendingAlignmentsPage = (req, res) => {
res.send('<h2>ExACT Automated Test Script: Approve Page(approvePage): Initiated</h2>'); res.send('<h2>ExACT Automated Test Script: Approve - Pending Alignments Page(approvePendingAlignmentsPage): Initiated</h2>');
(async function example() { (async function example() {
let driver = await new Builder() let driver = await new Builder()
.forBrowser('chrome') .forBrowser('chrome')
@@ -40,7 +40,7 @@ const steps = [
action: async () => { action: async () => {
const multipleChecks = 'Log In'; const multipleChecks = 'Log In';
console.log('------------->| APPROVE PAGE |<-------------'); console.log('------------->| APPROVE - CONTENT SUBMISSIONS PAGE |<-------------');
const errors = []; const errors = [];
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
@@ -180,17 +180,17 @@ const steps = [
await driver.wait(async () => { await driver.wait(async () => {
const readyState = await driver.executeScript('return document.readyState'); const readyState = await driver.executeScript('return document.readyState');
return readyState === 'complete'; return readyState === 'complete';
}, 30000, 'Approve page did not fully load within 30 seconds'); }, 30000, 'Pending Alignments page did not fully load within 30 seconds');
//Wait until the element exists in the DOM //Wait until the element exists in the DOM
const approvePage = await driver.wait( const tabDefaultText = await driver.wait(
until.elementLocated(By.css('h2')), until.elementLocated(By.css('#tabs-2 b')),
30000 30000
); );
//Wait until it becomes visible //Wait until it becomes visible
await driver.wait( await driver.wait(
until.elementIsVisible(approvePage), until.elementIsVisible(tabDefaultText),
30000 30000
); );
} }
@@ -1046,7 +1046,7 @@ const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, scree
const takeScreenshot = async (driver, stepIndex, stepDescription) => { const takeScreenshot = async (driver, stepIndex, stepDescription) => {
const screenshot = await driver.takeScreenshot(); const screenshot = await driver.takeScreenshot();
const dir = path.join('screenshots', 'approvePage'); const dir = path.join('screenshots', 'approvePendingAlignmentsPage');
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`; const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
const screenshotPath = path.join(dir, screenshotFileName); const screenshotPath = path.join(dir, screenshotFileName);
@@ -1054,11 +1054,11 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
return screenshotPath; return screenshotPath;
}; };
const resultsFile = path.join('results', 'approvePageResults.xlsx'); const resultsFile = path.join('results', 'approvePendingAlignmentsPageResults.xlsx');
const clearOldResults = () => { const clearOldResults = () => {
//Remove old screenshots //Remove old screenshots
const screenshotDir = path.join('screenshots', 'approvePage'); const screenshotDir = path.join('screenshots', 'approvePendingAlignmentsPage');
if (fs.existsSync(screenshotDir)) { if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true }); fs.rmSync(screenshotDir, { recursive: true, force: true });
} }
@@ -1133,11 +1133,11 @@ try {
if (allStepsPassed) { if (allStepsPassed) {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('PASSED: Approve Page(approvePage); All test steps completed successfully'); console.log('PASSED: Approve - Pending Alignments Page(approvePendingAlignmentsPage); All test steps completed successfully');
testStatus = 'Passed'; testStatus = 'Passed';
} else { } else {
console.log('------------->| THE END |<-------------'); console.log('------------->| THE END |<-------------');
console.log('FAILED: Approve Page(approvePage); One or more test steps failed'); console.log('FAILED: Approve - Pending Alignments Page(approvePendingAlignmentsPage); One or more test steps failed');
console.log('FAILED STEPS:'); console.log('FAILED STEPS:');
failedSteps.forEach(step => console.error(` ✗ ${step}`)); failedSteps.forEach(step => console.error(` ✗ ${step}`));
testStatus = 'Failed'; testStatus = 'Failed';
@@ -1156,4 +1156,4 @@ try {
})(); })();
} }
export default approvePage; export default approvePendingAlignmentsPage;

File diff suppressed because it is too large Load Diff