Added and Completed Approve tabs
This commit is contained in:
15
index.js
15
index.js
@@ -39,7 +39,10 @@ import reportViewQueuedReportsPage from './tests/Report/reportViewQueuedReportsP
|
||||
import reportSpecialtyReportsPage from './tests/Report/reportSpecialtyReportsPage.js';
|
||||
|
||||
//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
|
||||
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>
|
||||
|
||||
<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
|
||||
<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);
|
||||
|
||||
//APPROVE
|
||||
app.get('/approvePage', approvePage);
|
||||
app.get('/approvePendingAlignmentsPage', approvePendingAlignmentsPage);
|
||||
app.get('/approveContentSubmissionsPage', approveContentSubmissionsPage);
|
||||
app.get('/approveApprovalHistoryPage', approveApprovalHistoryPage);
|
||||
app.get('/approveRejectionHistoryPage', approveRejectionHistoryPage);
|
||||
|
||||
//My Content
|
||||
app.get('/ExACT_dashboardMyContent', ExACT_dashboardMyContent);
|
||||
|
||||
BIN
results/approveApprovalHistoryPageResults.xlsx
Normal file
BIN
results/approveApprovalHistoryPageResults.xlsx
Normal file
Binary file not shown.
BIN
results/approveContentSubmissionsPageResults.xlsx
Normal file
BIN
results/approveContentSubmissionsPageResults.xlsx
Normal file
Binary file not shown.
Binary file not shown.
BIN
results/approvePendingAlignmentsPageResults.xlsx
Normal file
BIN
results/approvePendingAlignmentsPageResults.xlsx
Normal file
Binary file not shown.
BIN
results/approveRejectionHistoryPageResults.xlsx
Normal file
BIN
results/approveRejectionHistoryPageResults.xlsx
Normal file
Binary file not shown.
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
@@ -4,8 +4,8 @@ import fs, { link } from 'fs';
|
||||
import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const approvePage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Approve Page(approvePage): Initiated</h2>');
|
||||
const approvePendingAlignmentsPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Approve - Pending Alignments Page(approvePendingAlignmentsPage): Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -40,7 +40,7 @@ const steps = [
|
||||
action: async () => {
|
||||
const multipleChecks = 'Log In';
|
||||
|
||||
console.log('------------->| APPROVE PAGE |<-------------');
|
||||
console.log('------------->| APPROVE - CONTENT SUBMISSIONS PAGE |<-------------');
|
||||
const errors = [];
|
||||
|
||||
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
|
||||
@@ -180,17 +180,17 @@ const steps = [
|
||||
await driver.wait(async () => {
|
||||
const readyState = await driver.executeScript('return document.readyState');
|
||||
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
|
||||
const approvePage = await driver.wait(
|
||||
until.elementLocated(By.css('h2')),
|
||||
const tabDefaultText = await driver.wait(
|
||||
until.elementLocated(By.css('#tabs-2 b')),
|
||||
30000
|
||||
);
|
||||
|
||||
//Wait until it becomes visible
|
||||
await driver.wait(
|
||||
until.elementIsVisible(approvePage),
|
||||
until.elementIsVisible(tabDefaultText),
|
||||
30000
|
||||
);
|
||||
}
|
||||
@@ -1046,7 +1046,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', 'approvePage');
|
||||
const dir = path.join('screenshots', 'approvePendingAlignmentsPage');
|
||||
|
||||
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
|
||||
const screenshotPath = path.join(dir, screenshotFileName);
|
||||
@@ -1054,11 +1054,11 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
|
||||
return screenshotPath;
|
||||
};
|
||||
|
||||
const resultsFile = path.join('results', 'approvePageResults.xlsx');
|
||||
const resultsFile = path.join('results', 'approvePendingAlignmentsPageResults.xlsx');
|
||||
|
||||
const clearOldResults = () => {
|
||||
//Remove old screenshots
|
||||
const screenshotDir = path.join('screenshots', 'approvePage');
|
||||
const screenshotDir = path.join('screenshots', 'approvePendingAlignmentsPage');
|
||||
if (fs.existsSync(screenshotDir)) {
|
||||
fs.rmSync(screenshotDir, { recursive: true, force: true });
|
||||
}
|
||||
@@ -1133,11 +1133,11 @@ try {
|
||||
|
||||
if (allStepsPassed) {
|
||||
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';
|
||||
} else {
|
||||
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:');
|
||||
failedSteps.forEach(step => console.error(` ✗ ${step}`));
|
||||
testStatus = 'Failed';
|
||||
@@ -1156,4 +1156,4 @@ try {
|
||||
})();
|
||||
}
|
||||
|
||||
export default approvePage;
|
||||
export default approvePendingAlignmentsPage;
|
||||
1541
tests/Approve/approveRejectionHistoryPage.js
Normal file
1541
tests/Approve/approveRejectionHistoryPage.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user