Compare commits

..

6 Commits

Author SHA1 Message Date
jhuerta
d499d802a3 Completed script 2026-10-22 17:38:17 -07:00
jhuerta
a6fcb195bc Renamed file 2026-10-22 17:16:33 -07:00
jhuerta
fca0f654ac Updated EdGate footer 2026-10-22 17:15:25 -07:00
jhuerta
ae97282f9a Corrected href checks 2026-10-22 16:25:16 -07:00
jhuerta
d2583998c8 Removed hidden comment 2026-10-21 14:45:37 -07:00
jhuerta
6f30e1b432 Renamed script 2026-10-21 14:43:41 -07:00
5 changed files with 2038 additions and 7813 deletions

View File

@@ -14,7 +14,7 @@ import ExACT_contentPage from './tests/ExACT_contentPage.js';
import ExACT_editItem from './tests/ExACT_editItem.js';
//Align
import alignContentPage from './tests/alignContentPage.js';
import ExACT_alignStandardsPage from './tests/ExACT_alignStandardsPage.js';
import alignStandardsPage from './tests/alignStandardsPage.js';
import ExACT_editItemAddConcept from './tests/ExACT_editItemAddConcept.js';
import ExACT_alignConceptsPage from './tests/ExACT_alignConceptsPage.js';
//Framework
@@ -51,7 +51,7 @@ 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'>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='/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>
@@ -83,7 +83,7 @@ app.get('/', (req, res) => {
app.get('/ExACT_editItem', ExACT_editItem);
//Align
app.get('/alignContentPage', alignContentPage);
app.get('/ExACT_alignStandardsPage', ExACT_alignStandardsPage);
app.get('/alignStandardsPage', alignStandardsPage);
app.get('/ExACT_editItemAddConcept', ExACT_editItemAddConcept);
app.get('/ExACT_alignConceptsPage', ExACT_alignConceptsPage);
//Framework

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1984
tests/alignStandardsPage.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -132,7 +132,7 @@ const steps = [
if (actualSrc && actualSrc === expectedSrc) {
console.log('Passed: ExACT by edgate logo src matched expected');
} else {
errors.push(`Expected: ExACT by edgate logo src: "${expectedSrc}"; but found "${actualSrc}"`);
errors.push(`Expected: ExACT by edgate logo src: "${expectedSrc}"; actual: "${actualSrc}"`);
}
//Throw summary if any validation failed
@@ -282,7 +282,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Help icon href matched as expected');
} else {
errors.push(`Expected: Help icon href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Help icon href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
@@ -416,7 +416,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Dashboard Navigation href matched as expected');
} else {
errors.push(`Expected: Dashboard Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Dashboard Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -499,7 +499,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Frameworks Navigation href matched as expected');
} else {
errors.push(`Expected: Frameworks Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Frameworks Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -582,7 +582,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Align Navigation href matched as expected');
} else {
errors.push(`Expected: Align Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Align Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -665,7 +665,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Upload Navigation href matched as expected');
} else {
errors.push(`Expected: Upload Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Upload Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -748,7 +748,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Activity Report Navigation href matched as expected');
} else {
errors.push(`Expected: Activity Report Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Activity Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -831,7 +831,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Report Navigation href matched as expected');
} else {
errors.push(`Expected: Report Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Report Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -914,7 +914,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Approve Navigation href matched as expected');
} else {
errors.push(`Expected: Approve Navigation href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Approve Navigation href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -3367,7 +3367,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: See More href matched as expected');
} else {
errors.push(`Expected: See More button href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: See More button href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -4411,7 +4411,7 @@ const steps = [
if (actualHref && actualHref === expectedHref) {
console.log('Passed: Manage Favorites href matched as expected');
} else {
errors.push(`Expected: Manage Favorites button href to be "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Manage Favorites button href to be "${expectedHref}"; actual: "${actualHref}"`);
}
//font-family
@@ -4814,7 +4814,7 @@ const steps = [
if (url.pathname === expectedPath) {
console.log('Passed: Run icon 1 href path matched as expected');
} else {
errors.push(`Expected: Run icon 1 href path to be "${expectedPath}"; but found "${url.pathname}"`);
errors.push(`Expected: Run icon 1 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
}
//href query parameters
@@ -4823,7 +4823,7 @@ const steps = [
if (actualValue === expectedValue) {
console.log('Passed: Run icon 1 href param matched as expected');
} else {
errors.push(`Expected: Run icon 1 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`);
errors.push(`Expected: Run icon 1 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
}
}
@@ -4865,7 +4865,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 1 href matched expected');
} else {
errors.push(`Expected: Download icon 1 href to end with "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Download icon 1 href to end with "${expectedHref}"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
@@ -5001,7 +5001,7 @@ const steps = [
if (url.pathname === expectedPath) {
console.log('Passed: Run icon 2 href path matched as expected');
} else {
errors.push(`Expected: Run icon 2 href path to be "${expectedPath}"; but found "${url.pathname}"`);
errors.push(`Expected: Run icon 2 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
}
//href query parameters
@@ -5010,7 +5010,7 @@ const steps = [
if (actualValue === expectedValue) {
console.log('Passed: Run icon 2 href param matched as expected');
} else {
errors.push(`Expected: Run icon 2 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`);
errors.push(`Expected: Run icon 2 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
}
}
@@ -5052,7 +5052,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 2 href matched expected');
} else {
errors.push(`Expected: Download icon 2 href to end with "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Download icon 2 href to end with "${expectedHref}"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
@@ -5188,7 +5188,7 @@ const steps = [
if (url.pathname === expectedPath) {
console.log('Passed: Run icon 3 href path matched as expected');
} else {
errors.push(`Expected: Run icon 3 href path to be "${expectedPath}"; but found "${url.pathname}"`);
errors.push(`Expected: Run icon 3 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
}
//href query parameters
@@ -5197,7 +5197,7 @@ const steps = [
if (actualValue === expectedValue) {
console.log('Passed: Run icon 3 href param matched as expected');
} else {
errors.push(`Expected: Run icon 3 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`);
errors.push(`Expected: Run icon 3 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
}
}
@@ -5239,7 +5239,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 3 href matched expected');
} else {
errors.push(`Expected: Download icon 3 href to end with "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Download icon 3 href to end with "${expectedHref}"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
@@ -5375,7 +5375,7 @@ const steps = [
if (url.pathname === expectedPath) {
console.log('Passed: Run icon 4 href path matched as expected');
} else {
errors.push(`Expected: Run icon 4 href path to be "${expectedPath}"; but found "${url.pathname}"`);
errors.push(`Expected: Run icon 4 href path to be "${expectedPath}"; actual: "${url.pathname}"`);
}
//href query parameters
@@ -5384,7 +5384,7 @@ const steps = [
if (actualValue === expectedValue) {
console.log('Passed: Run icon 4 href param matched as expected');
} else {
errors.push(`Expected: Run icon 4 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`);
errors.push(`Expected: Run icon 4 href param "${key}" to be "${expectedValue}"; actual: "${actualValue}"`);
}
}
@@ -5426,7 +5426,7 @@ const steps = [
if (actualHref && actualHref.endsWith(expectedHref)) {
console.log('Passed: Download icon 4 href matched expected');
} else {
errors.push(`Expected: Download icon 4 href to end with "${expectedHref}"; but found "${actualHref}"`);
errors.push(`Expected: Download icon 4 href to end with "${expectedHref}"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed
@@ -5443,31 +5443,32 @@ const steps = [
},
//FOOTER
//EdGate Footer Logo
//EdGate Copyright Logo
{
description: 'EdGate Footer Logo',
description: 'EdGate Copyright Logo',
action: async () => {
const multipleChecks = 'EdGate Footer Logo';
const multipleChecks = 'EdGate Copyright Logo';
const element = await driver.findElement(By.css('.pull-right img'));
const expectedSrc = 'https://correlation.edgate.com/exact/images/edgate_logo_new.png';
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 element.isDisplayed()) {
console.log('Passed: EdGate logo was displayed as expected');
if (await elementLogo.isDisplayed()) {
console.log('Passed: EdGate Copyright Logo was displayed as expected');
} else {
errors.push('Expected: EdGate logo was not displayed');
errors.push('Expected: EdGate Copyright Logo was not displayed');
}
//image src
const actualSrc = await element.getAttribute('src');
if (actualSrc && actualSrc === expectedSrc) {
console.log('Passed: EdGate logo src matched expected');
//href - browser resolves the link with a trailing slash, so remove it before comparing
const actualHref = await element.getDomAttribute('href');
if (actualHref && actualHref === expectedHref) {
console.log('Passed: EdGate Copyright Logo href matched as expected');
} else {
errors.push(`Expected: EdGate logo src: "${expectedSrc}"; but found "${actualSrc}"`);
errors.push(`Expected: EdGate Copyright Logo href to be "https://www.edgate.com"; actual: "${actualHref}"`);
}
//Throw summary if any validation failed