Cleaned up scripts
This commit is contained in:
@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const alignContentPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script: Align Content Page(alignContentPage); Initiated</h2>');
|
||||
res.send('<h2>ExACT Automated Test Script: Align - Content Page(alignContentPage); Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -32,7 +32,7 @@ const steps = [
|
||||
action: async () => {
|
||||
const multipleChecks = 'Log In';
|
||||
|
||||
console.log('------------->| ALIGN CONTENT PAGE |<-------------');
|
||||
console.log('------------->| ALIGN - CONTENT PAGE |<-------------');
|
||||
const errors = [];
|
||||
|
||||
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
|
||||
@@ -172,7 +172,7 @@ const steps = [
|
||||
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');
|
||||
}, 30000, 'Align page did not fully load within 30 seconds');
|
||||
|
||||
//Wait until the element exists in the DOM
|
||||
const contentTab = await driver.wait(
|
||||
@@ -244,9 +244,9 @@ const steps = [
|
||||
|
||||
//element background color
|
||||
if (elementBgColor === 'rgba(40, 39, 90, 1)') {
|
||||
console.log('Passed: Content tab title active background color matched as expected');
|
||||
console.log('Passed: Content tab title background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Content tab title active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
|
||||
errors.push(`Expected: Content tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`);
|
||||
}
|
||||
|
||||
//element tool-tip text
|
||||
@@ -279,9 +279,9 @@ const steps = [
|
||||
|
||||
//element tool-tip background color
|
||||
if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') {
|
||||
console.log('Passed: Content tab tool-tip active background color matched as expected');
|
||||
console.log('Passed: Content tab tool-tip background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Content tab tool-tip active background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
|
||||
errors.push(`Expected: Content tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`);
|
||||
}
|
||||
|
||||
//Throw summary if any validation failed
|
||||
@@ -353,9 +353,9 @@ const steps = [
|
||||
|
||||
//element background color
|
||||
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
|
||||
console.log('Passed: Standards tab title dimmed background color matched as expected');
|
||||
console.log('Passed: Standards tab title background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Standards tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
|
||||
errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
|
||||
}
|
||||
|
||||
//element tool-tip text
|
||||
@@ -388,9 +388,9 @@ const steps = [
|
||||
|
||||
//element tool-tip background color
|
||||
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
|
||||
console.log('Passed: Standards tab tool-tip active background color matched as expected');
|
||||
console.log('Passed: Standards tab tool-tip background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: Standards tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
|
||||
errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
|
||||
}
|
||||
|
||||
//Throw summary if any validation failed
|
||||
@@ -462,9 +462,9 @@ const steps = [
|
||||
|
||||
//element background color
|
||||
if (elementBgColor === 'rgba(0, 0, 0, 0)') {
|
||||
console.log('Passed: AutoAlign tab title dimmed background color matched as expected');
|
||||
console.log('Passed: AutoAlign tab title background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: AutoAlign tab title dimmed background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
|
||||
errors.push(`Expected: AutoAlign tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`);
|
||||
}
|
||||
|
||||
//element tool-tip text
|
||||
@@ -497,9 +497,9 @@ const steps = [
|
||||
|
||||
//element tool-tip background color
|
||||
if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') {
|
||||
console.log('Passed: AutoAlign tab tool-tip active background color matched as expected');
|
||||
console.log('Passed: AutoAlign tab tool-tip background color matched as expected');
|
||||
} else {
|
||||
errors.push(`Expected: AutoAlign tab tool-tip active background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
|
||||
errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`);
|
||||
}
|
||||
|
||||
//Throw summary if any validation failed
|
||||
@@ -740,7 +740,7 @@ const steps = [
|
||||
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');
|
||||
}, 30000, 'Align page did not fully load within 30 seconds');
|
||||
|
||||
//Wait until the element exists in the DOM
|
||||
const element = await driver.wait(
|
||||
|
||||
@@ -5,7 +5,7 @@ import XLSX from 'xlsx';
|
||||
import path from 'path';
|
||||
|
||||
const alignStandardsPage = (req, res) => {
|
||||
res.send('<h2>ExACT Automated Test Script - Align Standards Page(alignStandardsPage): Initiated</h2>');
|
||||
res.send('<h2>ExACT Automated Test Script: Align - Standards Page(alignStandardsPage): Initiated</h2>');
|
||||
(async function example() {
|
||||
let driver = await new Builder()
|
||||
.forBrowser('chrome')
|
||||
@@ -32,7 +32,7 @@ const steps = [
|
||||
action: async () => {
|
||||
const multipleChecks = 'Log In';
|
||||
|
||||
console.log('------------->| ALIGN STANDARDS PAGE |<-------------');
|
||||
console.log('------------->| ALIGN - STANDARDS PAGE |<-------------');
|
||||
const errors = [];
|
||||
|
||||
await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan');
|
||||
@@ -172,7 +172,7 @@ const steps = [
|
||||
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');
|
||||
}, 30000, 'Align page did not fully load within 30 seconds');
|
||||
|
||||
//Wait until the element exists in the DOM
|
||||
const contentTab = await driver.wait(
|
||||
@@ -517,16 +517,16 @@ const steps = [
|
||||
|
||||
//NEXT ACTION
|
||||
{
|
||||
description: 'Click Standards navigation link',
|
||||
description: 'Click Standards tab',
|
||||
action: async () => {
|
||||
await driver.findElement(By.linkText('Standards')).click();
|
||||
console.log('----->| NEXT ACTION: Clicked Standards navigation link');
|
||||
console.log('----->| NEXT ACTION: Clicked Standards tab');
|
||||
|
||||
//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');
|
||||
}, 30000, 'Standards page did not fully load within 30 seconds');
|
||||
|
||||
//Wait until the element exists in the DOM
|
||||
const browseStandardsTitle = await driver.wait(
|
||||
|
||||
Reference in New Issue
Block a user