diff --git a/tests/ExACT_editItem.js b/tests/ExACT_editItem.js
index c5032d2..875c1a1 100644
--- a/tests/ExACT_editItem.js
+++ b/tests/ExACT_editItem.js
@@ -3,8 +3,8 @@ import fs from 'fs';
import XLSX from 'xlsx';
import path from 'path';
-const ExACT_contentPage = (req, res) => {
- res.send('
ExACT Automated Test Script - Content Page: Initiated
');
+const ExACT_editItem = (req, res) => {
+ res.send('ExACT Automated Test Script - Edit Item: Initiated
');
(async function example() {
let driver = await new Builder().forBrowser('chrome').build();
let testStatus = 'Failed';
@@ -12,9 +12,6 @@ const ExACT_contentPage = (req, res) => {
let worksheet;
const startTime = new Date().toISOString();
-//Constants
-const createContentSetName = 'Automated - QA Content Set - To be deleted';
-
const steps = [
{ description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://stage.edgate.com/exact/login.php') }, //PROD - https://correlation.edgate.com/exact/login.php
{ description: 'Expand browser', action: async () => await driver.manage().window().maximize() },
@@ -45,67 +42,6 @@ const steps = [
}
},
- //Dashboard title text color -dark blue
- {
- description: 'Validate dashboard title text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.e-heading')).getCssValue('color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Dashboard title text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard title text color matched as expected');
- }
- },
-
- //Dashboard title text font
- {
- description: 'Validate dashboard title text font size',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.e-heading')).getCssValue('font-size');
- if (elementStyle !== '32px') {
- throw new Error(`Dashboard title text font-size did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard title text font-size matched as expected');
- }
- },
-
- //MY CONTENT WIDGET
- //Dashboard My Content Widget title
- {
- description: 'Validate dashboard My Content widget title',
- action: async () => {
- const elementText = await driver.findElement(By.css('.h-100 h2:nth-child(2)')).getText();
- if (elementText !== 'My Content') {
- throw new Error(`Expected: "My Content"; Actual: "${elementText}"`);
- }
- console.log('Passed: Dashboard - My Content Widget title matched as expected');
- }
- },
-
- //Dashboard My Content Widget title text color -dark blue
- {
- description: 'Validate dashboard My Content widget title text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.h-100 h2:nth-child(2)')).getCssValue('color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Dashboard - My Content Widget title text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard - My Content Widget title text color matched as expected');
- }
- },
-
- //Dashboard My Content Widget title text font
- {
- description: 'Validate dashboard My Content widget title text font size',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.h-100 h2:nth-child(2)')).getCssValue('font-size');
- if (elementStyle !== '18px') {
- throw new Error(`Dashboard - My Content Widget title text font-size did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard - My Content Widget title text font-size matched as expected');
- }
- },
-
//Dashboard My Content Item Count
{
description: 'Validate Dashboard My Content Item Count',
@@ -118,90 +54,6 @@ const steps = [
}
},
- //Dashboard My Content Item Count button color -dark blue
- {
- description: 'Validate Dashboard My Content Item Count button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('#badge_content_total')).getCssValue('background-color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Dashboard - My Content Item Count button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard - My Content Item Count button color matched as expected');
- }
- },
-
- //Dashboard My Content Item Count text color -white
- {
- description: 'Validate Dashboard My Content Item Count font color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('#badge_content_total')).getCssValue('color');
- if (elementStyle !== 'rgba(255, 255, 255, 1)') {
- throw new Error(`Dashboard - My Content Item Count font color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Dashboard - My Content Item Count font color matched as expected');
- }
- },
-
- //Ellipsis icon color -dark blue
- {
- description: 'Validate ellipsis icon color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.fa-ellipsis-h')).getCssValue('color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Ellipsis icon color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Ellipsis icon color matched as expected');
- }
- },
-
- //Search icon color -dark blue
- {
- description: 'Validate search icon color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.col-12 > .fa')).getCssValue('color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Search icon color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Search icon color matched as expected');
- }
- },
-
- //Filter textbox placeholder
- {
- description: 'Validate Filter placeholder text',
- action: async () => {
- const elementValue = await driver.findElement(By.css('#content-org-filter')).getAttribute('placeholder');
- if (elementValue !== 'filter...') {
- throw new Error(`Expected: "filter..."; Actual: "${elementValue}"`);
- }
- console.log('Passed: Filter placeholder text matched as expected');
- }
- },
-
- //Sort label
- {
- description: 'Validate sort label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.col-4')).getText();
- if (elementText !== 'Sort:') {
- throw new Error(`Expected: "Sort:"; Actual: "${elementText}"`);
- }
- console.log('Passed: Sort label matched as expected');
- }
- },
-
- //Sort Dropdown [should be: "Count", option]
- {
- description: 'Validate sort dropdown option',
- action: async () => {
- const elementOption = await driver.findElement(By.css('#orgsort > option:nth-child(1)')).getAttribute('value');
- if (elementOption !== 'count') {
- throw new Error(`Expected: "count"; Actual: "${elementOption}"`);
- }
- console.log('Passed: Sort dropdown option matched as expected');
- }
- },
-
//Biology-QA
{
description: 'Validate Biology-QA title',
@@ -237,7 +89,7 @@ const steps = [
}
},
- //NAVIGATE TO CONTENT PAGE
+ //NEXT ACTION - NAVIGATE TO CONTENT PAGE
{ description: 'Click Biology - QA link', action: async () => await driver.findElement(By.linkText('Biology - QA')).click() },
//Wait for Biology - QA Content page to load
@@ -248,428 +100,6 @@ const steps = [
}
},
- //FILTERS
- //Filter Results title
- {
- description: 'Validate Filter Results title',
- action: async () => {
- const elementText = await driver.findElement(By.css('.well > b')).getText();
- if (elementText !== 'Filter Results') {
- throw new Error(`Expected: "Filter Results"; Actual: "${elementText}"`);
- }
- console.log('Passed: Filter Results title matched as expected');
- }
- },
-
- //Content Set title
- {
- description: 'Validate Content Set title',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > b')).getText();
- if (elementText !== 'Content Set') {
- throw new Error(`Expected: "Content Set"; Actual: "${elementText}"`);
- }
- console.log('Passed: Content Set title matched as expected');
- }
- },
-
- //Biology - QA checkbox
- {
- description: 'Verify Biology - QA checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metaorgobjectid873576067')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Biology - QA checkbox icon not found');
- }
- console.log('Passed: Biology - QA checkbox icon present');
- }
- },
-
- /*Biology - QA label
- {
- description: 'Validate Biology - QA label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > label')).getText();
- if (elementText !== 'Biology - QA') {
- throw new Error(`Expected: "Biology - QA"; Actual: "${elementText}"`);
- }
- console.log('Passed: Biology - QA label matched as expected');
- }
- },*/
-
- //Biology - QA count
- {
- description: 'Validate Biology - QA count',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(1)')).getText();
- if (elementText !== 'Biology - QA (1046)') {
- throw new Error(`Expected: "Biology - QA (1046)"; Actual: "${elementText}"`);
- }
- console.log('Passed: Biology - QA (1046) label matched as expected');
- }
- },
-
- //Grade title
- {
- description: 'Validate Grade title',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > b')).getText();
- if (elementText !== 'Grade') {
- throw new Error(`Expected: "Grade"; Actual: "${elementText}"`);
- }
- console.log('Passed: Grade title matched as expected');
- }
- },
-
- //9th grade checkbox
- {
- description: 'Verify 9th grade checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metagrades49')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('9th grade checkbox icon not found');
- }
- console.log('Passed: 9th grade checkbox icon present');
- }
- },
-
- //9th grade label
- {
- description: 'Validate 9th grade label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > label:nth-child(4)')).getText();
- if (elementText !== '9') {
- throw new Error(`Expected: "9"; Actual: "${elementText}"`);
- }
- console.log('Passed: 9 label matched as expected');
- }
- },
-
- //10th grade checkbox
- {
- description: 'Verify 10th grade checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metagrades51')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('10th grade checkbox icon not found');
- }
- console.log('Passed: 10th grade checkbox icon present');
- }
- },
-
- //10th grade label
- {
- description: 'Validate 10th grade label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > label:nth-child(7)')).getText();
- if (elementText !== '10') {
- throw new Error(`Expected: "10"; Actual: "${elementText}"`);
- }
- console.log('Passed: 10 label matched as expected');
- }
- },
-
- //11th grade checkbox
- {
- description: 'Verify 11th grade checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metagrades52')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('11th grade checkbox icon not found');
- }
- console.log('Passed: 11th grade checkbox icon present');
- }
- },
-
- //11th grade label
- {
- description: 'Validate 11th grade label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > label:nth-child(10)')).getText();
- if (elementText !== '11') {
- throw new Error(`Expected: "11"; Actual: "${elementText}"`);
- }
- console.log('Passed: 11 label matched as expected');
- }
- },
-
- //12th grade checkbox
- {
- description: 'Verify 12th grade checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metagrades53')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('12th grade checkbox icon not found');
- }
- console.log('Passed: 12th grade checkbox icon present');
- }
- },
-
- //12th grade label
- {
- description: 'Validate 12th grade label',
- action: async () => {
- const elementText = await driver.findElement(By.css('label:nth-child(13)')).getText();
- if (elementText !== '12') {
- throw new Error(`Expected: "12"; Actual: "${elementText}"`);
- }
- console.log('Passed: 12 label matched as expected');
- }
- },
-
- //8th grade checkbox
- {
- description: 'Verify 8th grade checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metagrades48')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('8th grade checkbox icon not found');
- }
- console.log('Passed: 8th grade checkbox icon present');
- }
- },
-
- //8th grade label
- {
- description: 'Validate 8th grade label',
- action: async () => {
- const elementText = await driver.findElement(By.css('label:nth-child(16)')).getText();
- if (elementText !== '8') {
- throw new Error(`Expected: "8"; Actual: "${elementText}"`);
- }
- console.log('Passed: 8 label matched as expected');
- }
- },
-
- //More link
- {
- description: 'Validate More link',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('More>>')).getText();
- if (elementText !== 'More>>') {
- throw new Error(`Expected: "More>>"; Actual: "${elementText}"`);
- }
- console.log('Passed: More>> link matched as expected');
- }
- },
-
- //Subject title
- {
- description: 'Validate Subject title',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > b')).getText();
- if (elementText !== 'Subject') {
- throw new Error(`Expected: "Subject"; Actual: "${elementText}"`);
- }
- console.log('Passed: Subject title matched as expected');
- }
- },
-
- //Science checkbox
- {
- description: 'Verify Science checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metasubjectsScience')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Science checkbox icon not found');
- }
- console.log('Passed: Science checkbox icon present');
- }
- },
-
- //Science label
- {
- description: 'Validate Science label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(4)')).getText();
- if (elementText !== 'Science') {
- throw new Error(`Expected: "Science"; Actual: "${elementText}"`);
- }
- console.log('Passed: Science label matched as expected');
- }
- },
-
- //Mathematics checkbox
- {
- description: 'Verify Mathematics checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#metasubjectsMathematics')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Mathematics checkbox icon not found');
- }
- console.log('Passed: Mathematics checkbox icon present');
- }
- },
-
- //Mathematics label
- {
- description: 'Validate Mathematics label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(7)')).getText();
- if (elementText !== 'Mathematics') {
- throw new Error(`Expected: "Mathematics"; Actual: "${elementText}"`);
- }
- console.log('Passed: Mathematics label matched as expected');
- }
- },
-
- //Social and Emotional Learning checkbox
- {
- description: 'Verify Social and Emotional Learning checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.id('metasubjectsSocial and Emotional Learning')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Social and Emotional Learning checkbox icon not found');
- }
- console.log('Passed: Social and Emotional Learning checkbox icon present');
- }
- },
-
- //Social and Emotional Learning label
- {
- description: 'Validate Social and Emotional Learning label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(10)')).getText();
- if (elementText !== 'Social and Emotional Learning') {
- throw new Error(`Expected: "Social and Emotional Learning"; Actual: "${elementText}"`);
- }
- console.log('Passed: Social and Emotional Learning label matched as expected');
- }
- },
-
- //Reset All link
- {
- description: 'Validate Reset All link',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Reset All')).getText();
- if (elementText !== 'Reset All') {
- throw new Error(`Expected: "Reset All"; Actual: "${elementText}"`);
- }
- console.log('Passed: Reset All link matched as expected');
- }
- },
-
- //CONTENT RESULTS - PAGINATION ROW
- //Home link
- {
- description: 'Validate Home link',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Home')).getText();
- if (elementText !== 'Home') {
- throw new Error(`Expected: "Home"; Actual: "${elementText}"`);
- }
- console.log('Passed: Home link matched as expected');
- }
- },
-
- //Content breadcrumb
- {
- description: 'Validate Content breadcrumb',
- action: async () => {
- const elementText = await driver.findElement(By.css('.breadcrumb-item:nth-child(2)')).getText();
- if (elementText !== 'Content') {
- throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
- }
- console.log('Passed: Content link matched as expected');
- }
- },
-
- //Detail View button
- {
- description: 'Validate Detail View button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Detail View')).getText();
- if (elementText !== 'Detail View') {
- throw new Error(`Expected: "Detail View" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Detail View button text matched as expected');
- }
- },
-
- //Detail View button color -green
- {
- description: 'Validate Detail View button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Detail View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Detail View button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Detail View button color matched as expected');
- }
- },
-
- //Edit View button
- {
- description: 'Validate Edit View button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Edit View')).getText();
- if (elementText !== 'Edit View') {
- throw new Error(`Expected: "Edit View" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Edit View button text matched as expected');
- }
- },
-
- //Edit View button color -green
- {
- description: 'Validate Edit View button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Edit View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(248, 249, 250, 1)') {
- throw new Error(`Edit View button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Edit View button color matched as expected');
- }
- },
-
- //Save icon
- {
- description: 'Verify Save icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.float-right > a:nth-child(1) > img')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Save icon not found');
- }
- console.log('Passed: Save icon present');
- }
- },
-
- //Save icon tool-tip
- {
- description: 'Validate Save icon tool-tip',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div.col-xs-12.col-sm-9 > div.float-right.ml-1 > a:nth-child(1)')).getAttribute('title');
- if (elementStyle !== 'Save This Search') {
- throw new Error(`Expected: "Save This Search"; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Save This Search tool-tip matched as expected');
- }
- },
-
- //Print icon
- {
- description: 'Verify Print icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.icon-link > img')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Print icon not found');
- }
- console.log('Passed: Print icon present');
- }
- },
-
- //Printicon tool-tip
- {
- description: 'Validate Print icon tool-tip',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.icon-link > img')).getAttribute('title');
- if (elementStyle !== 'Print This Page') {
- throw new Error(`Expected: "Print This Page"; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Print This Page tool-tip matched as expected');
- }
- },
-
//Results 1-25 of 1046 label
{
description: 'Validate Results 1-25 of 1046 label',
@@ -682,211 +112,6 @@ const steps = [
}
},
- //PAGINATION BUTTONS
- //Show button text
- {
- description: 'Validate Show button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(6) #contentlimit')).getText();
- if (elementText !== 'Show') {
- throw new Error(`Expected: "Show" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Show button text matched as expected');
- }
- },
-
- //Show dropdown [should be: "25", option]
- {
- description: 'Validate Show dropdown option',
- action: async () => {
- const elementOption = await driver.findElement(By.css('.form-group:nth-child(6) #inputlimit')).getAttribute('value');
- if (elementOption !== '25') {
- throw new Error(`Expected: "25"; Actual: "${elementOption}"`);
- }
- console.log('Passed: Show dropdown option matched as expected');
- }
- },
-
- //Pagination 1 button text
- {
- description: 'Validate pagination 1 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('1')).getText();
- if (elementText !== '1') {
- throw new Error(`Expected: Pagination "1" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 1 button text matched as expected');
- }
- },
-
- //Pagination 1 background color -green
- {
- description: 'Validate pagination 1 button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('1')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 1 button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 1 button color matched as expected');
- }
- },
-
- //Pagination 2 button text
- {
- description: 'Validate pagination 2 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('2')).getText();
- if (elementText !== '2') {
- throw new Error(`Expected: Pagination "2" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 2 button text matched as expected');
- }
- },
-
- //Pagination 2 text color -green
- {
- description: 'Validate pagination 2 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('2')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 2 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 2 text color matched as expected');
- }
- },
-
- //Pagination 3 button text
- {
- description: 'Validate pagination 3 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('3')).getText();
- if (elementText !== '3') {
- throw new Error(`Expected: Pagination "3" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 3 button text matched as expected');
- }
- },
-
- //Pagination 3 text color -green
- {
- description: 'Validate pagination 3 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('3')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 3 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 3 text color matched as expected');
- }
- },
-
- //Pagination 4 button text
- {
- description: 'Validate pagination 4 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('4')).getText();
- if (elementText !== '4') {
- throw new Error(`Expected: Pagination "4" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 4 button text matched as expected');
- }
- },
-
- //Pagination 4 text color -green
- {
- description: 'Validate pagination 4 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('4')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 4 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 4 text color matched as expected');
- }
- },
-
- //Pagination 5 button text
- {
- description: 'Validate pagination 5 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('5')).getText();
- if (elementText !== '5') {
- throw new Error(`Expected: Pagination "5" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 5 button text matched as expected');
- }
- },
-
- //Pagination 5 text color -green
- {
- description: 'Validate pagination 5 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('5')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 5 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 5 text color matched as expected');
- }
- },
-
- //Pagination separator icon
- {
- description: 'Verify Pagination separator icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.linkText('...')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Pagination separator icon not found');
- }
- console.log('Passed: Pagination separator icon present');
- }
- },
-
- //Pagination 42 button text
- {
- description: 'Validate pagination 42 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('42')).getText();
- if (elementText !== '42') {
- throw new Error(`Expected: Pagination "42" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 42 button text matched as expected');
- }
- },
-
- //Pagination 42 text color -green
- {
- description: 'Validate pagination 42 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('42')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 42 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 42 text color matched as expected');
- }
- },
-
- //Pagination Show All button text
- {
- description: 'Validate pagination Show All button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Show All')).getText();
- if (elementText !== 'Show All') {
- throw new Error(`Expected: Pagination "Show All" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination Show All button text matched as expected');
- }
- },
-
- //Pagination Show All text color -green
- {
- description: 'Validate pagination Show All text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Show All')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination Show All text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination Show All text color matched as expected');
- }
- },
-
//CONTENT RESULTS - CONTENT ITEMS
//Content 1 Title
{
@@ -930,7 +155,7 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('.card:nth-child(8) .ml-3')).getCssValue('background-color');
if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 1 Edit button color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Content 1 "Edit" button color did not match; Actual: "${elementStyle}"`);
}
console.log('Passed: Content 1 Edit button color matched as expected');
}
@@ -966,7 +191,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink874454004 > .display-alignment')).getText();
if (elementText !== 'Aligned (reset)') {
- throw new Error(`Expected: Content 1 ECS Alignement label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: Content 1 "ECS Alignement" label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Content 1 ECS Alignement label matched as expected');
}
@@ -978,7 +203,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink874454004 b')).getText();
if (elementText !== 'reset') {
- throw new Error(`Expected: Content 1 ECS Alignement reset label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: Content 1 "ECS Alignement" reset label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Content 1 ECS Alignement reset label matched as expected');
}
@@ -990,7 +215,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(8) .well .fa')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Content 1 View Standards button icon not found');
+ throw new Error('Content 1 "View Standards" button icon not found');
}
console.log('Passed: Content 1 View Standards button icon present');
}
@@ -1002,7 +227,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.card:nth-child(8) .well > .btn')).getText();
if (elementText !== 'View Standards') {
- throw new Error(`Expected: Content 1 View Standards button text did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: Content 1 "View Standards" button text did not match; Actual: "${elementText}"`);
}
console.log('Passed: Content 1 View Standards button text matched as expected');
}
@@ -1014,1138 +239,112 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('.card:nth-child(8) .well > .btn')).getCssValue('background-color');
if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 1 View Standards button color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Content 1 "View Standards" button color did not match; Actual: "${elementStyle}"`);
}
console.log('Passed: Content 1 View Standards button color matched as expected');
}
},
-
- //Content 2 Title
- {
- description: 'Validate Content 2 title',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Abrupt Climate Change')).getText();
- if (elementText !== 'Abrupt Climate Change') {
- throw new Error(`Expected: Content 1 item "Abrupt Climate Change" title; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 1 item Abrupt Climate Change tittle matched as expected');
- }
- },
- //Content 2 edit icon
- {
- description: 'Verify Content 2 edit icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(9) .lo-title .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Content 2 edit icon not found');
- }
- console.log('Passed: Content 2 edit icon present');
- }
- },
+ //NEXT ACTION - VIEW STANDARDS DIV
+ { description: 'Click Content 1 Edit button', action: async () => await driver.findElement(By.css('.card:nth-child(8) .well > .btn')).click() },
- //Content 2 edit button text
- {
- description: 'Validate pagination Show All button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) .ml-3')).getText();
- if (elementText !== 'Edit') {
- throw new Error(`Expected: Content 2 "Edit" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 Edit button text matched as expected');
- }
- },
-
- //Content 2 edit button color -green
- {
- description: 'Validate Content 2 Edit button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(9) .ml-3')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 2 Edit button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Content 2 Edit button color matched as expected');
- }
- },
-
- //Content 2 description
- {
- description: 'Validate Content 2 description',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) .lo-descr')).getText();
- if (elementText !== 'This Science NetLinks lesson focuses on a current issue in science in order to help students understand the process by which scientific knowledge is developed and refined. In this lesson, students are introduced to some recent ideas about abrupt climate change. This gives them a glimpse into how scientific theories are formed and refined by new data.') {
- throw new Error(`Expected: Content 2 description text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 description text matched as expected');
- }
- },
-
- //Content 2 content set label
- {
- description: 'Validate Content 2 content set label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) small')).getText();
- if (elementText !== 'Content Set: Biology - QA') {
- throw new Error(`Expected: Content 2 content set label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 content set label matched as expected');
- }
- },
-
- //Content 2 alignment label
- {
- description: 'Validate Content 2 ECS Alignement label',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578650 > .display-alignment')).getText();
- if (elementText !== 'Alignment Pending (reset)') {
- throw new Error(`Expected: Content 2 Alignement Pending label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 Alignement Pending label matched as expected');
- }
- },
-
- //Content 2 alignment reset label
- {
- description: 'Validate Content 2 Alignement Pending reset label',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578650 b')).getText();
- if (elementText !== 'reset') {
- throw new Error(`Expected: Content 2 Alignement Pending reset label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 Alignement Pending reset label matched as expected');
- }
- },
-
- //Content 2 view standards button icon
- {
- description: 'Verify Content 2 View Standards button icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(9) .well .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Content 2 View Standards button icon not found');
- }
- console.log('Passed: Content 2 View Standards button icon present');
- }
- },
-
- //Content 2 view standards button text
- {
- description: 'Validate Content 2 View Standards button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) .well > .btn')).getText();
- if (elementText !== 'View Standards') {
- throw new Error(`Expected: Content 2 View Standards button text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 View Standards button text matched as expected');
- }
- },
-
- //Content 2 view standards button color -green
- {
- description: 'Validate Content 2 view standards button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(9) .well > .btn')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 2 View Standards button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Content 2 View Standards button color matched as expected');
- }
- },
-
- //APPLY FILTERS
- { description: 'Apply 8th grade filter', action: async () => await driver.findElement(By.css('#metagrades48')).click() },
- { description: 'Wait for action to complete', action: async () => await driver.sleep(5000) },
-
- //Clear link
- {
- description: 'Validate Clear link text',
- action: async () => {
- const elementText = await driver.findElement(By.css('small > a')).getText();
- if (elementText !== 'Clear') {
- throw new Error(`Expected: "Clear" text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Clear text matched as expected');
- }
- },
-
- //Grade8 filter button
- {
- description: 'Validate Grade 8 filter button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.badge')).getText();
- if (elementText !== 'Grade: 8') {
- throw new Error(`Expected: "Grade: 8" text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Grade: 8 text matched as expected');
- }
- },
-
- //Grade8 filter button color -dark gray
- {
- description: 'Verify grade 8 filter buttion close icon color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.badge')).getCssValue('background-color');
- if (elementStyle !== 'rgba(108, 117, 125, 1)') {
- throw new Error(`Expected: Grade 8 button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Grade 8 button color matched as expected');
- }
- },
-
- //Grade8 filter button close icon color -red
- {
- description: 'Verify grade 8 filter buttion close icon color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.glyphicon')).getCssValue('color');
- if (elementStyle !== 'rgba(255, 0, 0, 1)') {
- throw new Error(`Expected: Grade 8 button close icon color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Grade 8 button close icon color matched as expected');
- }
- },
-
- //Filtered Results 1-25 of 667 label
- {
- description: 'Validate Filtered Results 1-25 of 667 label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.float-left:nth-child(6)')).getText();
- if (elementText !== 'Results 1 - 25 of 667') {
- throw new Error(`Expected: Filtered "Results 1 - 25 of 667" label; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Results 1 - 25 of 667 label matched as expected');
- }
- },
-
- //Home link
- {
- description: 'Validate Home link',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Home')).getText();
- if (elementText !== 'Home') {
- throw new Error(`Expected: "Home"; Actual: "${elementText}"`);
- }
- console.log('Passed: Home link matched as expected');
- }
- },
-
- //Content breadcrumb
- {
- description: 'Validate Content breadcrumb',
- action: async () => {
- const elementText = await driver.findElement(By.css('.breadcrumb-item:nth-child(2)')).getText();
- if (elementText !== 'Content') {
- throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
- }
- console.log('Passed: Content link matched as expected');
- }
- },
-
- //Detail View button
- {
- description: 'Validate Detail View button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Detail View')).getText();
- if (elementText !== 'Detail View') {
- throw new Error(`Expected: "Detail View" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Detail View button text matched as expected');
- }
- },
-
- //Detail View button color -green
- {
- description: 'Validate Detail View button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Detail View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Detail View button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Detail View button color matched as expected');
- }
- },
-
- //Edit View button
- {
- description: 'Validate Edit View button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Edit View')).getText();
- if (elementText !== 'Edit View') {
- throw new Error(`Expected: "Edit View" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Edit View button text matched as expected');
- }
- },
-
- //Edit View button color -green
- {
- description: 'Validate Edit View button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Edit View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(248, 249, 250, 1)') {
- throw new Error(`Edit View button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Edit View button color matched as expected');
- }
- },
-
- //Save icon
- {
- description: 'Verify Save icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.float-right > a:nth-child(1) > img')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Save icon not found');
- }
- console.log('Passed: Save icon present');
- }
- },
-
- //Save icon tool-tip
- {
- description: 'Validate Save icon tool-tip',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div.col-xs-12.col-sm-9 > div.float-right.ml-1 > a:nth-child(1)')).getAttribute('title');
- if (elementStyle !== 'Save This Search') {
- throw new Error(`Expected: "Save This Search"; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Save This Search tool-tip matched as expected');
- }
- },
-
- //Print icon
- {
- description: 'Verify Print icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.icon-link > img')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Print icon not found');
- }
- console.log('Passed: Print icon present');
- }
- },
-
- //Printicon tool-tip
- {
- description: 'Validate Print icon tool-tip',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.icon-link > img')).getAttribute('title');
- if (elementStyle !== 'Print This Page') {
- throw new Error(`Expected: "Print This Page"; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Print This Page tool-tip matched as expected');
- }
- },
-
- //Filtered esults 1-25 of 667 label
- {
- description: 'Validate Filtered Results 1-25 of 6676 label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.float-left:nth-child(6)')).getText();
- if (elementText !== 'Results 1 - 25 of 667') {
- throw new Error(`Expected: Filtered "Results 1 - 25 of 667" label; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Results 1 - 25 of 667 label matched as expected');
- }
- },
-
- //PAGINATION BUTTONS
- //Show button text
- {
- description: 'Validate Show button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.form-group:nth-child(7) #contentlimit')).getText();
- if (elementText !== 'Show') {
- throw new Error(`Expected: "Show" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Show button text matched as expected');
- }
- },
-
- //Show dropdown [should be: "25", option]
- {
- description: 'Validate Show dropdown option',
- action: async () => {
- const elementOption = await driver.findElement(By.css('.form-group:nth-child(7) #inputlimit')).getAttribute('value');
- if (elementOption !== '25') {
- throw new Error(`Expected: "25"; Actual: "${elementOption}"`);
- }
- console.log('Passed: Show dropdown option matched as expected');
- }
- },
-
- //Pagination 1 button text
- {
- description: 'Validate pagination 1 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('1')).getText();
- if (elementText !== '1') {
- throw new Error(`Expected: Pagination "1" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 1 button text matched as expected');
- }
- },
-
- //Pagination 1 background color -green
- {
- description: 'Validate pagination 1 button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('1')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 1 button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 1 button color matched as expected');
- }
- },
-
- //Pagination 2 button text
- {
- description: 'Validate pagination 2 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('2')).getText();
- if (elementText !== '2') {
- throw new Error(`Expected: Pagination "2" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 2 button text matched as expected');
- }
- },
-
- //Pagination 2 text color -green
- {
- description: 'Validate pagination 2 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('2')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 2 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 2 text color matched as expected');
- }
- },
-
- //Pagination 3 button text
- {
- description: 'Validate pagination 3 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('3')).getText();
- if (elementText !== '3') {
- throw new Error(`Expected: Pagination "3" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 3 button text matched as expected');
- }
- },
-
- //Pagination 3 text color -green
- {
- description: 'Validate pagination 3 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('3')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 3 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 3 text color matched as expected');
- }
- },
-
- //Pagination 4 button text
- {
- description: 'Validate pagination 4 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('4')).getText();
- if (elementText !== '4') {
- throw new Error(`Expected: Pagination "4" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 4 button text matched as expected');
- }
- },
-
- //Pagination 4 text color -green
- {
- description: 'Validate pagination 4 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('4')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 4 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 4 text color matched as expected');
- }
- },
-
- //Pagination 5 button text
- {
- description: 'Validate pagination 5 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('5')).getText();
- if (elementText !== '5') {
- throw new Error(`Expected: Pagination "5" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination 5 button text matched as expected');
- }
- },
-
- //Pagination 5 text color -green
- {
- description: 'Validate pagination 5 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('5')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination 5 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination 5 text color matched as expected');
- }
- },
-
- //Pagination separator icon
- {
- description: 'Verify Pagination separator icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.linkText('...')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Pagination separator icon not found');
- }
- console.log('Passed: Pagination separator icon present');
- }
- },
-
- //Filtered pagination 27 button text
- {
- description: 'Validate Filtered pagination 27 button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('27')).getText();
- if (elementText !== '27') {
- throw new Error(`Expected: Filtered pagination "27" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: FilteredpPagination 27 button text matched as expected');
- }
- },
-
- //Filtered pagination 27 text color -green
- {
- description: 'Validate pagination 27 text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('27')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Filtered pagination 27 text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Filtered pagination 27 text color matched as expected');
- }
- },
-
- //Pagination Show All button text
- {
- description: 'Validate pagination Show All button text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Show All')).getText();
- if (elementText !== 'Show All') {
- throw new Error(`Expected: Pagination "Show All" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Pagination Show All button text matched as expected');
- }
- },
-
- //Pagination Show All text color -green
- {
- description: 'Validate pagination Show All text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Show All')).getCssValue('color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Pagination Show All text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Pagination Show All text color matched as expected');
- }
- },
-
- //CONTENT RESULTS - CONTENT ITEMS
- //Filtered Content 1 Title
- {
- description: 'Validate Content 1 title',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('All Species Inventory')).getText();
- if (elementText !== 'All Species Inventory') {
- throw new Error(`Expected: Filtered Content 1 item "All Species Inventory" title; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 item All Species Inventory tittle matched as expected');
- }
- },
-
- //Filtered Content 1 edit icon
- {
- description: 'Verify Filtered Content 1 edit icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(8) .lo-title .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Filtered Content 1 edit icon not found');
- }
- console.log('Passed: Filtered Content 1 edit icon present');
- }
- },
-
- //Filtered Content 1 edit button text
- {
- description: 'Validate Filtered Content 1 edit button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(8) .ml-3')).getText();
- if (elementText !== 'Edit') {
- throw new Error(`Expected: Filtered Content 1 "Edit" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 Edit button text matched as expected');
- }
- },
-
- //Filtered Content 1 edit button color -green
- {
- description: 'Validate Filtered Content 1 Edit button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(8) .ml-3')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Filtered Content 1 Edit button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Filtered Content 1 Edit button color matched as expected');
- }
- },
-
- //Filtered Content 1 description
- {
- description: 'Validate Filtered Content 1 description',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(8) .lo-descr')).getText();
- if (elementText !== `In this Science Update, from Science NetLinks, you'll hear an interview with Kevin Kelly, co-founder and board chairman of the All Species Foundation in San Francisco. Kelly discusses his mission to discover, identify, and document every species on Earth within the next 25 years. Students then read more information about the project, and conclude by answering some related questions. Science Updates are audio interviews with scientists and are accompanied by a set of questions as well as links to related Science NetLinks lessons and other related resources.`) {
- throw new Error(`Expected: Filtered Content 1 description tIn this Science Update, from Science NetLinks, you'll hear an interview with Kevin Kelly, co-founder and board chairman of the All Species Foundation in San Francisco. Kelly discusses his mission to discover, identify, and document every species on Earth within the next 25 years. Students then read more information about the project, and conclude by answering some related questions. Science Updates are audio interviews with scientists and are accompanied by a set of questions as well as links to related Science NetLinks lessons and other related resources.ext did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 description text matched as expected');
- }
- },
-
- //Content 1 content set label
- {
- description: 'Validate Filtered Content 1 content set label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(8) small')).getText();
- if (elementText !== 'Content Set: Biology - QA') {
- throw new Error(`Expected: Filtered Content 1 content set label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 content set label matched as expected');
- }
- },
-
- //Filtered Content 1 alignment label
- {
- description: 'Validate Filtered Content 1 Alignment Pending label',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578654 > .display-alignment')).getText();
- if (elementText !== 'Aligned (reset)') {
- throw new Error(`Expected: Filtered Content 1 Alignment Pending label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 Alignment Pending label matched as expected');
- }
- },
-
- //Filtered Content 1 alignment reset label
- {
- description: 'Validate Filtered Content 1 Alignment Pending reset label',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578654 b')).getText();
- if (elementText !== 'reset') {
- throw new Error(`Expected: Filtered Content 1 Alignment Pending reset label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 Alignment Pending reset label matched as expected');
- }
- },
-
- //Content 1 view standards button icon
- {
- description: 'Verify Content 1 View Standards button icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(8) .well .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Content 1 View Standards button icon not found');
- }
- console.log('Passed: Content 1 View Standards button icon present');
- }
- },
-
- //Content 1 view standards button text
- {
- description: 'Validate Content 1 View Standards button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(8) .well > .btn')).getText();
- if (elementText !== 'View Standards') {
- throw new Error(`Expected: Content 1 View Standards button text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 1 View Standards button text matched as expected');
- }
- },
-
- //Content 1 view standards button color -green
- {
- description: 'Validate Content 1 view standards button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(8) .well > .btn')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 1 View Standards button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Content 1 View Standards button color matched as expected');
- }
- },
-
- //Filtered Content 2 Title
- {
- description: 'Validate Filtered Content 2 title',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Altered Elephant Behavior')).getText();
- if (elementText !== 'Altered Elephant Behavior') {
- throw new Error(`Expected: Filtered Content 1 item "Altered Elephant Behavior" title; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 1 item Altered Elephant Behavior tittle matched as expected');
- }
- },
-
- //Content 2 edit icon
- {
- description: 'Verify Content 2 edit icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(9) .lo-title .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Content 2 edit icon not found');
- }
- console.log('Passed: Content 2 edit icon present');
- }
- },
-
- //Content 2 edit button text
- {
- description: 'Validate pagination Show All button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) .ml-3')).getText();
- if (elementText !== 'Edit') {
- throw new Error(`Expected: Content 2 "Edit" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 Edit button text matched as expected');
- }
- },
-
- //Content 2 edit button color -green
- {
- description: 'Validate Content 2 Edit button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(9) .ml-3')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 2 Edit button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Content 2 Edit button color matched as expected');
- }
- },
-
- //Filtered Content 2 description
- {
- description: 'Validate Filtered Content 2 description',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(2) .lo-descr')).getText();
- if (elementText !== 'Poaching is causing alarming changes in the behavior of African elephants.') {
- throw new Error(`Expected: Filtered Content 2 description text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 2 description text matched as expected');
- }
- },
-
- //Filtered Content 2 content set label
- {
- description: 'Validate Filtered Content 2 content set label',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(2) small')).getText();
- if (elementText !== 'Content Set: Biology - QA') {
- throw new Error(`Expected: Filtered Content 2 content set label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 2 content set label matched as expected');
- }
- },
-
- //Filtered Content 2 alignment label
- {
- description: 'Validate Filtered Content 2 Not Aligned label',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText();
- if (elementText !== 'Not Aligned') {
- throw new Error(`Expected: Filtered Content 2 Not Aligned label did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Filtered Content 2 Not Aligned label matched as expected');
- }
- },
-
- //Content 2 view standards button icon
- {
- description: 'Verify Content 2 View Standards button icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(9) .well .fa')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Content 2 View Standards button icon not found');
- }
- console.log('Passed: Content 2 View Standards button icon present');
- }
- },
-
- //Content 2 view standards button text
- {
- description: 'Validate Content 2 View Standards button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('.card:nth-child(9) .well > .btn')).getText();
- if (elementText !== 'View Standards') {
- throw new Error(`Expected: Content 2 View Standards button text did not match; Actual: "${elementText}"`);
- }
- console.log('Passed: Content 2 View Standards button text matched as expected');
- }
- },
-
- //Content 2 view standards button color -green
- {
- description: 'Validate Content 2 view standards button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('.card:nth-child(9) .well > .btn')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Expected: Content 2 View Standards button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Content 2 View Standards button color matched as expected');
- }
- },
-
- //EDIT VIEW -ACTIONS
- { description: 'Click Edit View button', action: async () => await driver.findElement(By.linkText('Edit View')).click() },
-
- //Wait for dashboard to load - Correlation Coverages View Details button
+ //Wait for Edit page to open - Resource tab
{
- description: 'Wait for Actions button to load',
+ description: 'Wait for Edit page to open',
action: async () => {
- return await driver.wait(until.elementLocated(By.linkText('Actions')), 10000).catch(() => false);
- }
+ return await driver.wait(until.elementLocated(By.css('.modal-title')), 5000).catch(() => false);
+ }
},
- //Detail View button
+ //Content 1 view standards DIV
{
- description: 'Validate Detail View button text',
+ description: 'Validate Standards DIV title text',
action: async () => {
- const elementText = await driver.findElement(By.linkText('Detail View')).getText();
- if (elementText !== 'Detail View') {
- throw new Error(`Expected: "Detail View" button text; Actual: "${elementText}"`);
+ const elementText = await driver.findElement(By.css('.modal-title')).getText();
+ if (elementText !== 'View Standards') {
+ throw new Error(`Expected: Content 1 "View Standards" button text did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Detail View button text matched as expected');
+ console.log('Passed: Content 1 View Standards button text matched as expected');
}
},
- //Detail View button color -green
+ //View standards x close icon color -red
{
- description: 'Validate Detail View button color',
+ description: 'Validate Content 1 View standards x icon color',
action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Detail View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(248, 249, 250, 1)') {
- throw new Error(`Detail View button color did not match; Actual: "${elementStyle}"`);
+ const elementStyle = await driver.findElement(By.css('.modal-header span')).getCssValue('color');
+ if (elementStyle !== 'rgba(246, 60, 40, 1)') {
+ throw new Error(`Expected: Content 1 X icon color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Detail View button color matched as expected');
+ console.log('Passed: Content 1 X icon color matched as expected');
}
},
- //Edit View button
+ //Content 1 view standards DIV sub-title
{
- description: 'Validate Edit View button text',
+ description: 'Validate Standards DIV sub-title text',
action: async () => {
- const elementText = await driver.findElement(By.linkText('Edit View')).getText();
- if (elementText !== 'Edit View') {
- throw new Error(`Expected: "Edit View" button text; Actual: "${elementText}"`);
+ const elementText = await driver.findElement(By.css('.mb-1:nth-child(1)')).getText();
+ if (elementText !== 'Please select which standards you wish to view:') {
+ throw new Error(`Expected: Content 1 "Please select which standards you wish to view" sub-title text did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Edit View button text matched as expected');
+ console.log('Passed: Content 1 Please select which standards you wish to view: sub-title text matched as expected');
}
},
- //Edit View button color -dark blue
+ //Content 1 view standards DIV label
{
- description: 'Validate Edit View button color',
+ description: 'Validate Standards DIV label',
action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Edit View')).getCssValue('background-color');
- if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Edit View button color did not match; Actual: "${elementStyle}"`);
+ const elementText = await driver.findElement(By.css('label > b')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: Content 1 "Standards" label did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Edit View button color matched as expected');
+ console.log('Passed: Content 1 Standards label matched as expected');
}
},
- //Select All checkbox
+ //Select Standards dropdown
{
- description: 'Verify Select All checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#selectToggle')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Select All checkbox icon not found');
- }
- console.log('Passed: Select All checkbox icon present');
- }
- },
-
- //Select All label
- {
- description: 'Validate Select All label',
+ description: 'Validate select standards dropdown value',
action: async () => {
- const elementText = await driver.findElement(By.css('.btn-default')).getText();
- if (elementText !== 'Select All / None') {
- throw new Error(`Expected: "Select All / None" label; Actual: "${elementText}"`);
+ const elementValue = await driver.findElement(By.css('#iStateIds')).getAttribute('value');
+ if (elementValue !== 'none') {
+ throw new Error(`Expected: Dropdown value to be "none" (Select Standards); Actual: "${elementValue}"`);
}
- console.log('Passed: Select All / None label matched as expected');
+ console.log('Passed: Dropdown value "none" (Select Standards), matched as expected');
}
},
- //Actions button
+ //View standards button text
{
- description: 'Validate Actions button text',
+ description: 'Validate View Standards button text',
action: async () => {
- const elementText = await driver.findElement(By.linkText('Actions')).getText();
- if (elementText !== 'Actions') {
- throw new Error(`Expected: "Actions" button text; Actual: "${elementText}"`);
+ const elementText = await driver.findElement(By.css('.form-group > .btn')).getAttribute('value');
+ if (elementText !== 'View Standards') {
+ throw new Error(`Expected: Content 1 "View Standards" button text did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Actions button text matched as expected');
+ console.log('Passed: Content 1 View Standards button text matched as expected');
}
},
- //Actions button color -green
+ //View standards button color -green
{
- description: 'Validate Actions button color',
+ description: 'Validate Content 1 View standards button color',
action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Actions')).getCssValue('background-color');
+ const elementStyle = await driver.findElement(By.css('.form-group > .btn')).getCssValue('background-color');
if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Actions button color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Content 1 "View Standards" button color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Actions button color matched as expected');
+ console.log('Passed: Content 1 View Standards button color matched as expected');
}
},
- //First content item checkbox (All Species Inventory)
- {
- description: 'Verify All Species Inventory alignment checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#cu873578654')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('All Species Inventory alignment checkbox icon not found');
- }
- console.log('Passed: All Species Inventory alignment checkbox icon present');
- }
- },
+ //NEXT ACTION - CLOSE VIEW STANDARDS DIV
+ { description: 'Click close icon', action: async () => await driver.findElement(By.css('.modal-header span')).click() },
+ { description: 'Wait for process to complete', action: async () => await driver.sleep(2000) },
- //First content link
- {
- description: 'Validate All Species Inventory link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('All Species Inventory')).getText();
- if (elementText !== 'All Species Inventory') {
- throw new Error(`Expected: "All Species Inventory" link text; Actual: "${elementText}"`);
- }
- console.log('Passed: All Species Inventory link text matched as expected');
- }
- },
-
- //First content item edit button
- {
- description: 'Validate All Species Inventory Edit button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('#\\38 73578654 .ml-3')).getText();
- if (elementText !== 'Edit') {
- throw new Error(`Expected: All Species Inventory alignment "Edit" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: All Species Inventory alignment "Edit" button text matched as expected');
- }
- },
-
- //First content item edit button color -green
- {
- description: 'Validate All Species Inventory Edit button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('#\\38 73578654 .ml-3')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`All Species Inventory "Edit" button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: All Species Inventory alignment "Edit" button color matched as expected');
- }
- },
-
- //First content item alignment pending text
- {
- description: 'Validate All Species Inventory alignment pending text',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578654 > .display-alignment')).getText();
- if (elementText !== 'Alignment Pending (reset)') {
- throw new Error(`Expected: All Species Inventory alignment "Alignment Pending" text; Actual: "${elementText}"`);
- }
- console.log('Passed: All Species Inventory alignment "Alignment Pending" text matched as expected');
- }
- },
-
- //First content item alignment pending text (reset)
- {
- description: 'Validate All Species Inventory alignment reset text',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578654 > div > a > b')).getText();
- if (elementText !== 'reset') {
- throw new Error(`Expected: All Species Inventory alignment "(reset)" text; Actual: "${elementText}"`);
- }
- console.log('Passed: All Species Inventory alignment "(reset)" text matched as expected');
- }
- },
-
- //Second content item checkbox (Altered Elephant Behavior)
- {
- description: 'Verify Altered Elephant Behavior checkbox icon is present',
- action: async () =>
- { const expectedIcon = await driver.wait(until.elementLocated(By.css('#cu873578655')), 5000).catch(() => false);
- if (!expectedIcon) {
- throw new Error('Altered Elephant Behavior checkbox icon not found');
- }
- console.log('Passed: Altered Elephant Behavior checkbox icon present');
- }
- },
-
- //Second content link
- {
- description: 'Validate Altered Elephant Behavior link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Altered Elephant Behavior')).getText();
- if (elementText !== 'Altered Elephant Behavior') {
- throw new Error(`Expected: "Altered Elephant Behavior" link text; Actual: "${elementText}"`);
- }
- console.log('Passed: Altered Elephant Behavior link text matched as expected');
- }
- },
-
- //Second content item edit button
- {
- description: 'Validate Altered Elephant Behavior Edit button text',
- action: async () => {
- const elementText = await driver.findElement(By.css('#\\38 73578655 .ml-3')).getText();
- if (elementText !== 'Edit') {
- throw new Error(`Expected: Altered Elephant Behavior "Edit" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Altered Elephant Behavior "Edit" button text matched as expected');
- }
- },
-
- //Second content item edit button color -green
- {
- description: 'Validate Altered Elephant Behavior Edit button color',
- action: async () => {
- const elementStyle = await driver.findElement(By.css('#\\38 73578655 .ml-3')).getCssValue('background-color');
- if (elementStyle !== 'rgba(48, 200, 172, 1)') {
- throw new Error(`Altered Elephant Behavior Edit button color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Altered Elephant Behavior "Edit" button color matched as expected');
- }
- },
-
- //Second content item alignment pending text
- {
- description: 'Validate Altered Elephant Behavior alignment pending text',
- action: async () => {
- const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText();
- if (elementText !== 'Not Aligned') {
- throw new Error(`Expected: Altered Elephant Behavior "Not Aligned" text; Actual: "${elementText}"`);
- }
- console.log('Passed: Altered Elephant Behavior "Not Aligned" text matched as expected');
- }
- },
-
- //Click the Actions button
- { description: 'Click Actions button', action: async () => await driver.findElement(By.linkText('Actions')).click() },
- { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) },
-
- //Move link
- {
- description: 'Validate Move link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Move')).getText();
- if (elementText !== 'Move') {
- throw new Error(`Expected: "Move" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Move button text matched as expected');
- }
- },
-
- //Copy link
- {
- description: 'Validate Copy link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Copy')).getText();
- if (elementText !== 'Copy') {
- throw new Error(`Expected: "Copy" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Copy button text matched as expected');
- }
- },
-
- //Edit Metadata link
- {
- description: 'Validate Edit Metadata link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Edit Metadata')).getText();
- if (elementText !== 'Edit Metadata') {
- throw new Error(`Expected: "Edit Metadata" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Edit Metadata button text matched as expected');
- }
- },
-
- //Tag Concepts link
- {
- description: 'Validate Tag Concepts link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Tag Concepts')).getText();
- if (elementText !== 'Tag Concepts') {
- throw new Error(`Expected: "Tag Concepts" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Tag Concepts button text matched as expected');
- }
- },
-
- //AutoAlign link
- {
- description: 'Validate AutoAlign link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('AutoAlign')).getText();
- if (elementText !== 'AutoAlign') {
- throw new Error(`Expected: "AutoAlign" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: AutoAlign button text matched as expected');
- }
- },
-
- //Delete link
- {
- description: 'Validate Delete link text',
- action: async () => {
- const elementText = await driver.findElement(By.linkText('Delete')).getText();
- if (elementText !== 'Delete') {
- throw new Error(`Expected: "Delete" button text; Actual: "${elementText}"`);
- }
- console.log('Passed: Delete button text matched as expected');
- }
- },
-
- //Delete text color -red
- {
- description: 'Validate Delte text color',
- action: async () => {
- const elementStyle = await driver.findElement(By.linkText('Delete')).getCssValue('color');
- if (elementStyle !== 'rgba(220, 53, 69, 1)') {
- throw new Error(`Actions Delete text color did not match; Actual: "${elementStyle}"`);
- }
- console.log('Passed: Delete text color matched as expected');
- }
- },
-
- //Select first content item
- { description: 'Select first content item checkbox', action: async () => await driver.findElement(By.css('#cu873578654')).click() },
- { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) },
-
-
-
-
-
-
-
-
-
- /*EDIT CONTENT PAGE - RESOURCE TAB
+ //NEXT ACTION - EDIT CONTENT PAGE
{ description: 'Click Content 1 Edit button', action: async () => await driver.findElement(By.css('.card:nth-child(8) .ml-3')).click() },
//Wait for Edit page to open - Resource tab
@@ -2162,7 +361,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('#myModalLabel')).getText();
if (elementText !== 'Edit Item') {
- throw new Error(`Expected: Edit Item title did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Edit Item" title did not match; Actual: "${elementText}"`);
}
console.log('Passed: Edit Item title matched as expected');
}
@@ -2174,9 +373,9 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('color');
if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Expected: Page title color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: "Edit Item" Page title color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Page title color matched as expected');
+ console.log('Passed: Edit Item Page title color matched as expected');
}
},
@@ -2186,81 +385,81 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('font-size');
if (elementStyle !== '32px') {
- throw new Error(`Expected: Page title font size did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: "Edit Item" Page title font size did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Page title font size matched as expected');
+ console.log('Passed: Edit Item Page title font size matched as expected');
}
},
- //RESOURCE TAB
+ //Resource tab
{
description: 'Validate edit item tab 1',
action: async () => {
- const elementText = await driver.findElement(By.css('#myTab .active')).getText();
+ const elementText = await driver.findElement(By.linkText('Resource')).getText();
if (elementText !== 'Resource') {
- throw new Error(`Expected: Resource tab label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Resource" tab label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Resource tab label matched as expected');
}
},
- //Edit item tab 1 label color -navy blue
+ //Resource tab label color -navy blue
{
description: 'Validate edit item tab 1',
action: async () => {
- const elementStyle = await driver.findElement(By.css('#myTab .active')).getCssValue('color');
+ const elementStyle = await driver.findElement(By.linkText('Resource')).getCssValue('color');
if (elementStyle !== 'rgba(40, 39, 90, 1)') {
- throw new Error(`Expected: Resource tab label color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Active "Resource" tab label color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Resource tab label color matched as expected');
+ console.log('Passed: Active Resource tab label color matched as expected');
}
},
- //Edit item tab 2
+ //Metadata tab
{
description: 'Validate edit item tab 2',
action: async () => {
- const elementText = await driver.findElement(By.css('#myTab > .nav-item:nth-child(2) > .nav-link')).getText();
+ const elementText = await driver.findElement(By.linkText('Metadata')).getText();
if (elementText !== 'Metadata') {
- throw new Error(`Expected: Metadata tab label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Metadata" tab label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Metadata tab label matched as expected');
}
},
- //Edit item tab 2 label color -gray (dimmed)
+ //Metadata tab label color -gray (dimmed)
{
description: 'Validate edit item tab 2',
action: async () => {
- const elementStyle = await driver.findElement(By.css('#myTab > .nav-item:nth-child(2) > .nav-link')).getCssValue('color');
+ const elementStyle = await driver.findElement(By.linkText('Metadata')).getCssValue('color');
if (elementStyle !== 'rgba(182, 186, 181, 1)') {
- throw new Error(`Expected: Metadata tab label color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Dimmed "Metadata" tab label color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Metadata tab label color matched as expected');
+ console.log('Passed: Dimmed Metadata tab label color matched as expected');
}
},
- //Edit item tab 3
+ //Concepts/Correlate tab
{
description: 'Validate edit item tab 3',
action: async () => {
- const elementText = await driver.findElement(By.css('#myTab > .nav-item:nth-child(3) > .nav-link')).getText();
+ const elementText = await driver.findElement(By.linkText('Concepts/Correlate')).getText();
if (elementText !== 'Concepts/Correlate') {
- throw new Error(`Expected: Concepts/Correlate tab label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Concepts/Correlate" tab label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Concepts/Correlate tab label matched as expected');
}
},
- //Edit item tab 3 label color -gray (dimmed)
+ //Concepts/Correlate tab label color -gray (dimmed)
{
description: 'Validate edit item tab 3',
action: async () => {
- const elementStyle = await driver.findElement(By.css('#myTab > .nav-item:nth-child(3) > .nav-link')).getCssValue('color');
+ const elementStyle = await driver.findElement(By.linkText('Concepts/Correlate')).getCssValue('color');
if (elementStyle !== 'rgba(182, 186, 181, 1)') {
- throw new Error(`Expected: Concepts/Correlate tab label color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: Dimmed "Concepts/Correlate" tab label color did not match; Actual: "${elementStyle}"`);
}
- console.log('Passed: Concepts/Correlate tab label color matched as expected');
+ console.log('Passed: Dimmed Concepts/Correlate tab label color matched as expected');
}
},
@@ -2282,9 +481,9 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.submit-content-button')).getText();
if (elementText !== 'Save Changes') {
- throw new Error(`Expected: Save button text did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Save Changes" button text did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Save button text matched as expected');
+ console.log('Passed: Save Changes button text matched as expected');
}
},
@@ -2294,7 +493,7 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('.submit-content-button')).getCssValue('color');
if (elementStyle !== 'rgba(255, 255, 255, 1)') {
- throw new Error(`Expected: Save button text color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: "Save" button text color did not match; Actual: "${elementStyle}"`);
}
console.log('Passed: Save button text color matched as expected');
}
@@ -2306,7 +505,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('#tabsr-1 > div:nth-child(1)')).getText();
if (elementText !== '* Required') {
- throw new Error(`Expected: * Required label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "* Required" label did not match; Actual: "${elementText}"`);
}
console.log('Passed: * Required label matched as expected');
}
@@ -2318,7 +517,7 @@ const steps = [
action: async () => {
const elementStyle = await driver.findElement(By.css('#tabsr-1 > div:nth-child(1)')).getCssValue('color');
if (elementStyle !== 'rgba(255, 0, 0, 1)') {
- throw new Error(`Expected: Required label color did not match; Actual: "${elementStyle}"`);
+ throw new Error(`Expected: "Required" label color did not match; Actual: "${elementStyle}"`);
}
console.log('Passed: Required label color matched as expected');
}
@@ -2330,9 +529,9 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > label')).getText();
if (elementText !== '* Title') {
- throw new Error(`Expected: Title label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "* Title" label did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Title label matched as expected');
+ console.log('Passed: * Title label matched as expected');
}
},
@@ -2344,7 +543,7 @@ const steps = [
if (elementValue !== 'AAA My Test III') {
throw new Error(`Expected: "AAA My Test III"; Actual: "${elementValue}"`);
}
- console.log('Passed: "AAA My Test III" value text matched as expected');
+ console.log('Passed: AAA My Test III value text matched as expected');
}
},
@@ -2354,7 +553,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(4) > label')).getText();
if (elementText !== 'Description') {
- throw new Error(`Expected: Description label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Description" label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Description label matched as expected');
}
@@ -2368,7 +567,7 @@ const steps = [
if (elementValue !== 'Yes, it should work! Perhaps') {
throw new Error(`Expected: "Yes, it should work! Perhaps"; Actual: "${elementValue}"`);
}
- console.log('Passed: "Yes, it should work! Perhaps" value text matched as expected');
+ console.log('Passed: Yes, it should work! Perhaps value text matched as expected');
}
},
@@ -2378,7 +577,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(5) > label')).getText();
if (elementText !== 'URL') {
- throw new Error(`Expected: URL label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "URL" label did not match; Actual: "${elementText}"`);
}
console.log('Passed: URL label matched as expected');
}
@@ -2392,7 +591,7 @@ const steps = [
if (elementValue !== 'https://example.com') {
throw new Error(`Expected: "https://example.com"; Actual: "${elementValue}"`);
}
- console.log('Passed: "https://example.com" placeholder text matched as expected');
+ console.log('Passed: https://example.com placeholder text matched as expected');
}
},
@@ -2402,7 +601,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label')).getText();
if (elementText !== 'Client Item ID') {
- throw new Error(`Expected: Client Item ID label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Client Item ID" label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Client Item ID label matched as expected');
}
@@ -2414,9 +613,9 @@ const steps = [
action: async () => {
const elementValue = await driver.findElement(By.css('#culoid')).getAttribute('value');
if (elementValue !== '') {
- throw new Error(`Expected: "empty"; Actual: "${elementValue}"`);
+ throw new Error(`Expected: Client Item ID "empty"; Actual: "${elementValue}"`);
}
- console.log('Passed: "empty" value text matched as expected');
+ console.log('Passed: Client ITem Id empty value text matched as expected');
}
},
@@ -2426,9 +625,9 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(7) > label')).getText();
if (elementText !== '* Content Set') {
- throw new Error(`Expected: Content Set label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "* Content Set" label did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Content Set label matched as expected');
+ console.log('Passed: *Content Set label matched as expected');
}
},
@@ -2440,7 +639,7 @@ const steps = [
if (elementValue !== '873576067') {
throw new Error(`Expected: "Biology - QA"; Actual: "${elementValue}"`);
}
- console.log('Passed: "Biology - QA" value text matched as expected');
+ console.log('Passed: Biology - QA value text matched as expected');
}
},
@@ -2450,9 +649,9 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > label')).getText();
if (elementText !== '* Grades') {
- throw new Error(`Expected: Grades label did not match; Actual: "${elementText}"`);
+ throw new Error(`Expected: "* Grades" label did not match; Actual: "${elementText}"`);
}
- console.log('Passed: Grades label matched as expected');
+ console.log('Passed: * Grades label matched as expected');
}
},
@@ -2462,7 +661,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('38')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('K grade checkbox icon not found');
+ throw new Error('"K grade" checkbox icon not found');
}
console.log('Passed: K grade checkbox icon present');
}
@@ -2474,7 +673,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(3) > .form-check-label')).getText();
if (elementText !== 'K') {
- throw new Error(`Expected: "K"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "K grade"; Actual: "${elementText}"`);
}
console.log('Passed: K grade label matched as expected');
}
@@ -2486,7 +685,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('39')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 1 checkbox icon not found');
+ throw new Error('"Grade 1" checkbox icon not found');
}
console.log('Passed: Grade 1 checkbox icon present');
}
@@ -2498,7 +697,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(4) > .form-check-label')).getText();
if (elementText !== '1') {
- throw new Error(`Expected: "1"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 1"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 1 label matched as expected');
}
@@ -2510,7 +709,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('40')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 2 checkbox icon not found');
+ throw new Error('"Grade 2" checkbox icon not found');
}
console.log('Passed: Grade 2 checkbox icon present');
}
@@ -2522,7 +721,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(5) > .form-check-label')).getText();
if (elementText !== '2') {
- throw new Error(`Expected: "2"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 2"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 2 label matched as expected');
}
@@ -2534,7 +733,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('41')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 3 checkbox icon not found');
+ throw new Error('"Grade 3" checkbox icon not found');
}
console.log('Passed: Grade 3 checkbox icon present');
}
@@ -2546,7 +745,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(6) > .form-check-label')).getText();
if (elementText !== '3') {
- throw new Error(`Expected: "3"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 3"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 3 label matched as expected');
}
@@ -2558,7 +757,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('43')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 4 checkbox icon not found');
+ throw new Error('"Grade 4" checkbox icon not found');
}
console.log('Passed: Grade 4 checkbox icon present');
}
@@ -2570,7 +769,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(7) > .form-check-label')).getText();
if (elementText !== '4') {
- throw new Error(`Expected: "4"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 4"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 4 label matched as expected');
}
@@ -2582,7 +781,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('44')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 5 checkbox icon not found');
+ throw new Error('"Grade 5" checkbox icon not found');
}
console.log('Passed: Grade 5 checkbox icon present');
}
@@ -2594,7 +793,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(8) > .form-check-label')).getText();
if (elementText !== '5') {
- throw new Error(`Expected: "5"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 5"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 5 label matched as expected');
}
@@ -2606,7 +805,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('45')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 6 checkbox icon not found');
+ throw new Error('"Grade 6" checkbox icon not found');
}
console.log('Passed: Grade 6 checkbox icon present');
}
@@ -2618,7 +817,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(9) > .form-check-label')).getText();
if (elementText !== '6') {
- throw new Error(`Expected: "6"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 6"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 6 label matched as expected');
}
@@ -2630,7 +829,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('47')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 7 checkbox icon not found');
+ throw new Error('"Grade 7" checkbox icon not found');
}
console.log('Passed: Grade 7 checkbox icon present');
}
@@ -2642,7 +841,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(10) > .form-check-label')).getText();
if (elementText !== '7') {
- throw new Error(`Expected: "7"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 7"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 7 label matched as expected');
}
@@ -2654,7 +853,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('48')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 8 checkbox icon not found');
+ throw new Error('"Grade 8" checkbox icon not found');
}
console.log('Passed: Grade 8 checkbox icon present');
}
@@ -2666,7 +865,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(11) > .form-check-label')).getText();
if (elementText !== '8') {
- throw new Error(`Expected: "8"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 8"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 8 label matched as expected');
}
@@ -2678,7 +877,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('49')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 9 checkbox icon not found');
+ throw new Error('"Grade 9" checkbox icon not found');
}
console.log('Passed: Grade 9 checkbox icon present');
}
@@ -2690,7 +889,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(12) > .form-check-label')).getText();
if (elementText !== '9') {
- throw new Error(`Expected: "9"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 9"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 9 label matched as expected');
}
@@ -2702,7 +901,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('51')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 10 checkbox icon not found');
+ throw new Error('"rade 10" checkbox icon not found');
}
console.log('Passed: Grade 10 checkbox icon present');
}
@@ -2714,7 +913,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(13) > .form-check-label')).getText();
if (elementText !== '10') {
- throw new Error(`Expected: "10"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 10"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 10 label matched as expected');
}
@@ -2726,7 +925,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('52')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 11 checkbox icon not found');
+ throw new Error('"Grade 11" checkbox icon not found');
}
console.log('Passed: Grade 11 checkbox icon present');
}
@@ -2738,7 +937,7 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(14) > .form-check-label')).getText();
if (elementText !== '11') {
- throw new Error(`Expected: "11"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 11"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 11 label matched as expected');
}
@@ -2750,7 +949,7 @@ const steps = [
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.id('53')), 5000).catch(() => false);
if (!expectedIcon) {
- throw new Error('Grade 12 checkbox icon not found');
+ throw new Error('"Grade 12" checkbox icon not found');
}
console.log('Passed: Grade 12 checkbox icon present');
}
@@ -2762,12 +961,1384 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-check:nth-child(15) > .form-check-label')).getText();
if (elementText !== '12') {
- throw new Error(`Expected: "12"; Actual: "${elementText}"`);
+ throw new Error(`Expected: "Grade 12"; Actual: "${elementText}"`);
}
console.log('Passed: Grade 12 label matched as expected');
}
+ },
+
+ //NEXT ACTION - METADATA
+ { description: 'Click Metadata tab link', action: async () => await driver.findElement(By.linkText('Metadata')).click() },
+ { description: 'Wait for login process to complete', action: async () => await driver.sleep(5000) },
+
+ //Page title
+ {
+ description: 'Validate Page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#myModalLabel')).getText();
+ if (elementText !== 'Edit Item') {
+ throw new Error(`Expected: "Edit Item" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Edit Item title matched as expected');
+ }
+ },
+
+ //Page title color -navy blue
+ {
+ description: 'Validate Page title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "Edit Item" Page title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Edit Item Page title color matched as expected');
+ }
+ },
+
+ //Page title font size -32px
+ {
+ description: 'Validate Page title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Expected: "Edit Item" Page title font size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Edit Item Page title font size matched as expected');
+ }
+ },
+
+ //Resource tab
+ {
+ description: 'Validate edit item tab 1',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Resource')).getText();
+ if (elementText !== 'Resource') {
+ throw new Error(`Expected: "Resource" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Resource tab label matched as expected');
+ }
+ },
+
+ //Resource tab label color -gray (dimmed)
+ {
+ description: 'Validate edit item tab 1',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Resource')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Expected: Dimmed "Resource" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Dimmed Resource tab label color matched as expected');
+ }
+ },
+
+ //Metadata tab
+ {
+ description: 'Validate edit item tab 2',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Metadata')).getText();
+ if (elementText !== 'Metadata') {
+ throw new Error(`Expected: "Metadata" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Metadata tab label matched as expected');
+ }
+ },
+
+ //Metadata tab label color -navy blue
+ {
+ description: 'Validate edit item tab 2',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Metadata')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Active "Metadata" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Active Metadata tab label color matched as expected');
+ }
+ },
+
+ //Concepts/Correlate tab
+ {
+ description: 'Validate edit item tab 3',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts/Correlate')).getText();
+ if (elementText !== 'Concepts/Correlate') {
+ throw new Error(`Expected: "Concepts/Correlate" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts/Correlate tab label matched as expected');
+ }
+ },
+
+ //Concepts/Correlate tab label color -gray (dimmed)
+ {
+ description: 'Validate edit item tab 3',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts/Correlate')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Expected: Dimmed "Concepts/Correlate" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Dimmed Concepts/Correlate tab label color matched as expected');
+ }
+ },
+
+ //Edit item Save button
+ {
+ description: 'Validate Save button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.submit-content-button')).getText();
+ if (elementText !== 'Save Changes') {
+ throw new Error(`Expected: "Save Changes" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Save Changes button text matched as expected');
+ }
+ },
+
+ //Edit item Save button -green
+ {
+ description: 'Validate required label',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.submit-content-button')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Expected: "Save" button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Save button text color matched as expected');
+ }
+ },
+
+ //Field Name title
+ {
+ description: 'Validate Field Name title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#tabsr-4 > div:nth-child(1) > b')).getText();
+ if (elementText !== 'Field Name') {
+ throw new Error(`Expected: "Field Name" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Field Name title matched as expected');
+ }
+ },
+
+ //Field Name textbox placeholder
+ {
+ description: 'Validate Field Name placeholder text',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('.combobox:nth-child(1)')).getAttribute('placeholder');
+ if (elementValue !== 'Select/Enter Field...') {
+ throw new Error(`Expected: "Select/Enter Field..."; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: Select/Enter Field... placeholder text matched as expected');
+ }
+ },
+
+ //Value title
+ {
+ description: 'Validate Value title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('div:nth-child(2) > b')).getText();
+ if (elementText !== 'Value') {
+ throw new Error(`Expected: "Value" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Value title matched as expected');
+ }
+ },
+
+ //Value textbox placeholder
+ {
+ description: 'Validate Value placeholder text',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('#meta_value')).getAttribute('placeholder');
+ if (elementValue !== '') {
+ throw new Error(`Expected: "empty"; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: empty placeholder text matched as expected');
+ }
+ },
+
+ //Add Metadata button text
+ {
+ description: 'Validate Metadata button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.btn:nth-child(5)')).getAttribute('value');
+ if (elementText !== 'Add Metadata') {
+ throw new Error(`Expected: "Add Metadata" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Add Metadata button text matched as expected');
+ }
+ },
+
+ //Add Metadata button color -green
+ {
+ description: 'Validate Add Metadata button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.btn:nth-child(5)')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Expected: "Add Metadata" button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Add Metadata button color matched as expected');
+ }
+ },
+
+ //Current Metadata title
+ {
+ description: 'Validate Current Metadata title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('span:nth-child(7)')).getText();
+ if (elementText !== 'Current Metadata') {
+ throw new Error(`Expected: "Current Metadata" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Current Metadata title matched as expected');
+ }
+ },
+
+ //Name title
+ {
+ description: 'Validate Name title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('th:nth-child(1)')).getText();
+ if (elementText !== 'Name') {
+ throw new Error(`Expected: "Name" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Name title matched as expected');
+ }
+ },
+
+ //Data title
+ {
+ description: 'Validate Data title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('th:nth-child(2)')).getText();
+ if (elementText !== 'Data') {
+ throw new Error(`Expected: "Data" titlel did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Data title matched as expected');
+ }
+ },
+
+ //Alginment Status title
+ {
+ description: 'Validate Alignment title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#me51861f7f132f814cec419806f86545e > td:nth-child(1)')).getText();
+ if (elementText !== 'Alignment Status') {
+ throw new Error(`Expected: "Alignment Status" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Alignment Status title matched as expected');
+ }
+ },
+
+ //Alignment Status textbox value
+ {
+ description: 'Validate textbox value',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('td > .form-control')).getAttribute('value');
+ if (elementValue !== 'Aligned') {
+ throw new Error(`Expected: Alignment Status value "Aligned"; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: Alignment Status value Aligned text matched as expected');
+ }
+ },
+
+ /*X delete icon - tooltip UNABLE TO FIND TOOLTIP
+ {
+ description: 'Validate X delete icon tooltip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#me51861f7f132f814cec419806f86545e > td:nth-child(3) > a > img')).getAttribute('title');
+ if (elementStyle !== 'Remove Field') {
+ throw new Error(`Expected: X delete icon "Remove Field" tooltip did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: X delete icon Remove Field tooltip matched as expected');
+ }
},*/
+ //NEXT ACTION - CONCEPTS/CORRELTATE
+ { description: 'Click Metadata tab link', action: async () => await driver.findElement(By.linkText('Concepts/Correlate')).click() },
+ { description: 'Wait for action to complete', action: async () => await driver.sleep(5000) },
+
+ //Page title
+ {
+ description: 'Validate Page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#myModalLabel')).getText();
+ if (elementText !== 'Edit Item') {
+ throw new Error(`Expected: "Edit Item" title did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Edit Item title matched as expected');
+ }
+ },
+
+ //Page title color -navy blue
+ {
+ description: 'Validate Page title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "Edit Item" Page title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Edit Item Page title color matched as expected');
+ }
+ },
+
+ //Page title font size -32px
+ {
+ description: 'Validate Page title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#myModalLabel')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Expected: "Edit Item" Page title font size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Edit Item Page title font size matched as expected');
+ }
+ },
+
+ //Resource tab
+ {
+ description: 'Validate edit item tab 1',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Resource')).getText();
+ if (elementText !== 'Resource') {
+ throw new Error(`Expected: "Resource" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Resource tab label matched as expected');
+ }
+ },
+
+ //Resource tab label color -gray (dimmed)
+ {
+ description: 'Validate edit item tab 1',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Resource')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Expected: Dimmed "Resource" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Dimmed Resource tab label color matched as expected');
+ }
+ },
+
+ //Metadata tab
+ {
+ description: 'Validate edit item tab 2',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Metadata')).getText();
+ if (elementText !== 'Metadata') {
+ throw new Error(`Expected: "Metadata" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Metadata tab label matched as expected');
+ }
+ },
+
+ //Metadata tab label color -gray (dimmed)
+ {
+ description: 'Validate edit item tab 2',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Metadata')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Expected: Dimmed "Metadata" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Dimmed Metadata tab label color matched as expected');
+ }
+ },
+
+ //Concepts/Correlate tab
+ {
+ description: 'Validate edit item tab 3',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts/Correlate')).getText();
+ if (elementText !== 'Concepts/Correlate') {
+ throw new Error(`Expected: "Concepts/Correlate" tab label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts/Correlate tab label matched as expected');
+ }
+ },
+
+ //Concepts/Correlate tab label color -navy bue
+ {
+ description: 'Validate edit item tab 3',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts/Correlate')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Active "Concepts/Correlate" tab label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Active Concepts/Correlate tab label color matched as expected');
+ }
+ },
+
+ //Edit item Save button
+ {
+ description: 'Validate Save button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.submit-content-button')).getText();
+ if (elementText !== 'Save Changes') {
+ throw new Error(`Expected: "Save Changes" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Save Changes button text matched as expected');
+ }
+ },
+
+ //Edit item Save button -green
+ {
+ description: 'Validate required label',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.submit-content-button')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Expected: "Save" button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Save button text color matched as expected');
+ }
+ },
+
+ //Tagged Concepts title
+ {
+ description: 'Validate Tagged Concepts title text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.ui-widget-heading')).getText();
+ if (elementText !== 'Tagged Concepts:') {
+ throw new Error(`Expected: "Tagged Concepts:" title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Tagged Concepts: title text matched as expected');
+ }
+ },
+
+ //Tagged Concepts breadcrumb 1 text
+ {
+ description: 'Validate Tagged Concepts breadcrumb 1 text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#k252821892')).getText();
+ if (elementText !== 'Mathematics | Number Operations | Exponents/Powers | Fractional - Note: includes negative fractional; relates to radicals Remove') {
+ throw new Error(`Expected: Tagged Concepts breadcrumb 1 text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Tagged Concepts breadcrumb 1 text matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 1 icon
+ {
+ description: 'Verify remove button 1 icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#k252821892 .glyphicon')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Tagged Concept "Remove" button 1 icon not found');
+ }
+ console.log('Passed: Tagged Concept Remove button 1 icon present');
+ }
+ },
+
+ //Tagged Concepts remove button 1 text
+ {
+ description: 'Validate Tagged Concepts delete button 1 text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#k252821892 > .btn')).getText();
+ if (elementText !== 'Remove') {
+ throw new Error(`Expected: Tagged Concept "Remove" button 1 text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Tagged Concept Remove button 1 text matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 1 color -red
+ {
+ description: 'Validate remove button 1 label color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#k252821892 > .btn')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(246, 60, 40, 1)') {
+ throw new Error(`Expected: Tagged Concept "Remove" button 1 color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Tagged Concept Remove button 1 color matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 1 -tooltip
+ {
+ description: 'Validate Tagged Concepts remove button 1 tooltip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#k252821892 > .btn')).getAttribute('title');
+ if (elementStyle !== 'Remove Concept') {
+ throw new Error(`Expected: Tagged Concept "Remove Concept" button 1 tooltip did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Tagged Concepts Remove Concept button 1 tooltip matched as expected');
+ }
+ },
+
+ //Tagged Concepts primary toggle button 1
+ {
+ description: 'Verify primary toggle button 1 is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#k252821892 .switch-primary')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Tagged Concept "Primary" toggle button 1 icon not found');
+ }
+ console.log('Passed: Tagged Concept Primary toggle button 1 icon present');
+ }
+ },
+
+ //Tagged Concepts breadcrumb 2 text
+ {
+ description: 'Validate Tagged Concepts breadcrumb 2 text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#k425604098')).getText();
+ if (elementText !== 'Mathematics | General Remove checkbox Toggle') {
+ throw new Error(`Expected: Tagged Concepts breadcrumb 2 text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Tagged Concepts breadcrumb 2 text matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 2 icon
+ {
+ description: 'Verify remove button 2 icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#k425604098 .glyphicon')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Tagged Concept "Remove" button 2 icon not found');
+ }
+ console.log('Passed: Remove button 2 icon present');
+ }
+ },
+
+ //Tagged Concepts remove button 2 text
+ {
+ description: 'Validate Tagged Concepts delete button 2 text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#k425604098 > .btn')).getText();
+ if (elementText !== 'Remove') {
+ throw new Error(`Expected: Tagged Concept "Remove" button 2 text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Tagged Concept Remove button 2 text matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 2 color -red
+ {
+ description: 'Validate remove button 2 color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#k425604098 > .btn')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(246, 60, 40, 1)') {
+ throw new Error(`Expected: Tagged Concept "Remove" button 2 text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Tagged Concept Remove button 2 text color matched as expected');
+ }
+ },
+
+ //Tagged Concepts remove button 2 -tooltip
+ {
+ description: 'Validate Tagged Concepts remove button 2 tooltip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#k425604098 > .btn')).getAttribute('title');
+ if (elementStyle !== 'Remove Concept') {
+ throw new Error(`Expected: Tagged Concept "Remove Concept" button 2 tooltip did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Tagged Concept Remove Concept button 2 tooltip matched as expected');
+ }
+ },
+
+ //Tagged Concepts primary toggle button 2
+ {
+ description: 'Verify primary toggle button 2 is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#k425604098 .switch-primary')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Tagged Concept "Primary" toggle button 2 icon not found');
+ }
+ console.log('Passed: Tagged Concept Primary toggle button 2 icon present');
+ }
+ },
+
+ //Find Concepts title text
+ {
+ description: 'Validate Find Concepts title text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('p')).getText();
+ if (elementText !== 'Find Concepts') {
+ throw new Error(`Expected: "Find Concepts" title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Find Concepts title text matched as expected');
+ }
+ },
+
+ //Browse tab title
+ {
+ description: 'Validate browse tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse tab title text matched as expected');
+ }
+ },
+
+ //Browse tab title -navy blue
+ {
+ description: 'Validate browse tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Browse')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "Browse" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse tab title color matched as expected');
+ }
+ },
+
+ //By Standard tab title
+ {
+ description: 'Validate by standard tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('By Standard')).getText();
+ if (elementText !== 'By Standard') {
+ throw new Error(`Expected: "By Standard" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: By Standard tab title text matched as expected');
+ }
+ },
+
+ //By Standard tab title -gray (dimmed)
+ {
+ description: 'Validate by standard tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('By Standard')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "By Standard" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: By Standard tab title color matched as expected');
+ }
+ },
+
+ //AutoAlign tab title
+ {
+ description: 'Validate AutoAlign tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('AutoAlign')).getText();
+ if (elementText !== 'AutoAlign') {
+ throw new Error(`Expected: "AutoAlign" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: AutoAlign tab title text matched as expected');
+ }
+ },
+
+ //AutoAlign tab title -gray (dimmed)
+ {
+ description: 'Validate AutoAlign tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('AutoAlign')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "AutoAlign" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: AutoAlign tab title color matched as expected');
+ }
+ },
+
+ //Browse the concept list and filter by term title
+ {
+ description: 'Validate Browse the concept list and filter by term title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.mt-2 > h5')).getText();
+ if (elementText !== 'Browse the concept list and filter by term') {
+ throw new Error(`Expected: "Browse the concept list and filter by term" title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the concept list and filter by term title text matched as expected');
+ }
+ },
+
+ //Browse the concept list and filter by term -navy blue
+ {
+ description: 'Validate Browse the concept list and filter by term title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.mt-2 > h5')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "Browse the concept list and filter by term" title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse the concept list and filter by term title color matched as expected');
+ }
+ },
+
+ //Browse the concept list and filter by term font size -20px
+ {
+ description: 'Validate Page title color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.mt-2 > h5')).getCssValue('font-size');
+ if (elementStyle !== '20px') {
+ throw new Error(`Expected: "Browse the concept list and filter by term" title font size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse the concept list and filter by term title font size matched as expected');
+ }
+ },
+
+ //Filter Concepts label
+ {
+ description: 'Validate Filter Concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.mr-1')).getText();
+ if (elementText !== 'Filter Concepts') {
+ throw new Error(`Expected: "Filter Concepts" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Filter Concepts label text matched as expected');
+ }
+ },
+
+ //Filter Concepts textbox placeholder
+ {
+ description: 'Validate URL placeholder text',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('#q')).getAttribute('placeholder');
+ if (elementValue !== 'Enter Term...') {
+ throw new Error(`Expected: "Enter Term..."; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: Enter Term... placeholder text matched as expected');
+ }
+ },
+
+ //Filter button text
+ {
+ description: 'Validate filter button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#qbutton')).getText();
+ if (elementText !== 'Filter') {
+ throw new Error(`Expected: "Filter" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Filter button text matched as expected');
+ }
+ },
+
+ //Filter button color -green
+ {
+ description: 'Validate filter button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('#qbutton')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Expected: "Filter" button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Filter button color matched as expected');
+ }
+ },
+
+ //Language Arts label
+ {
+ description: 'Validate language arts label text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) > div:nth-child(3)')).getText();
+ if (elementText !== 'Language Arts') {
+ throw new Error(`Expected: "Language Arts" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Language Arts label text matched as expected');
+ }
+ },
+
+ //Language Arts button text
+ {
+ description: 'Validate language arts button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) > .badge')).getText();
+ if (elementText !== '1359') {
+ throw new Error(`Expected: "Language Arts" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Language Arts button text matched as expected');
+ }
+ },
+
+ //Language Arts button color -navy blue
+ {
+ description: 'Validate language arts button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.list-group-item:nth-child(1) > .badge')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Language Arts button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Language Arts button color matched as expected');
+ }
+ },
+
+ //Language Arts arrow icon
+ {
+ description: 'Verify language arts arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(1) > .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Language Arts arrow icon not found');
+ }
+ console.log('Passed: Language Arts arrow icon present');
+ }
+ },
+
+ //Mathematics label
+ {
+ description: 'Validate mathematics label text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) > div:nth-child(3)')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics label text matched as expected');
+ }
+ },
+
+ //Mathematics button text
+ {
+ description: 'Validate mathematics button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) > .badge')).getText();
+ if (elementText !== '1219') {
+ throw new Error(`Expected: "Mathematics" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics button text matched as expected');
+ }
+ },
+
+ //Mathematics button color -navy blue
+ {
+ description: 'Validate mathematics button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.list-group-item:nth-child(2) > .badge')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Mathematics button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Mathematics button color matched as expected');
+ }
+ },
+
+ //Mathematics arrow icon
+ {
+ description: 'Verify mathematics arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(2) > .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Mathematics arrow icon not found');
+ }
+ console.log('Passed: Mathematics arrow icon present');
+ }
+ },
+
+ //Science label
+ {
+ description: 'Validate science label text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) > div:nth-child(3)')).getText();
+ if (elementText !== 'Science') {
+ throw new Error(`Expected: "Science" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Science label text matched as expected');
+ }
+ },
+
+ //Science button text
+ {
+ description: 'Validate science button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) > .badge')).getText();
+ if (elementText !== '2108') {
+ throw new Error(`Expected: "Science" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Science button text matched as expected');
+ }
+ },
+
+ //Science button color -navy blue
+ {
+ description: 'Validate science button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.list-group-item:nth-child(3) > .badge')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Science button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Science button color matched as expected');
+ }
+ },
+
+ //Science arrow icon
+ {
+ description: 'Verify science arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(3) > .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Science arrow icon not found');
+ }
+ console.log('Passed: Science arrow icon present');
+ }
+ },
+
+ //Social Studies label
+ {
+ description: 'Validate social studies label text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) > div:nth-child(3)')).getText();
+ if (elementText !== 'Social Studies') {
+ throw new Error(`Expected: "Social Studies" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Social Studies label text matched as expected');
+ }
+ },
+
+ //Social Studies label button text
+ {
+ description: 'Validate social studies button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) > .badge')).getText();
+ if (elementText !== '2188') {
+ throw new Error(`Expected: "Social Studies" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Social Studies button text matched as expected');
+ }
+ },
+
+ //Social Studies button color -navy blue
+ {
+ description: 'Validate social studies button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.list-group-item:nth-child(4) > .badge')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: Social Studies button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Social Studies button color matched as expected');
+ }
+ },
+
+ //Social Studies arrow icon
+ {
+ description: 'Verify social studies arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(4) > .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Social Studies arrow icon not found');
+ }
+ console.log('Passed: Social Studies arrow icon present');
+ }
+ },
+
+ //World Languages label
+ {
+ description: 'Validate world languages label text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(5) > div:nth-child(3)')).getText();
+ if (elementText !== 'World Languages') {
+ throw new Error(`Expected: "World Languages" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: World Languages label text matched as expected');
+ }
+ },
+
+ //World Languages label button text
+ {
+ description: 'Validate world languages button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(5) > .badge')).getText();
+ if (elementText !== '375') {
+ throw new Error(`Expected: "World Languages" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: World Languages button text matched as expected');
+ }
+ },
+
+ //World Languages button color -navy blue
+ {
+ description: 'Validate world languages button color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.list-group-item:nth-child(5) > .badge')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: World Languages button color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: World Languages button color matched as expected');
+ }
+ },
+
+ //World Languages arrow icon
+ {
+ description: 'Verify world languages arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(5) > .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('World Languages arrow icon not found');
+ }
+ console.log('Passed: World Languages arrow icon present');
+ }
+ },
+
+ //NEXT ACTION - By Standar
+ { description: 'Click By Standard tab link', action: async () => await driver.findElement(By.linkText('By Standard')).click() },
+ { description: 'Wait for action to complete', action: async () => await driver.sleep(5000) },
+
+ //Browse tab title
+ {
+ description: 'Validate browse tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse tab title text matched as expected');
+ }
+ },
+
+ //Browse tab title -gray (dimmed)
+ {
+ description: 'Validate browse tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Browse')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "Browse" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse tab title color matched as expected');
+ }
+ },
+
+ //By Standard tab title
+ {
+ description: 'Validate by standard tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('By Standard')).getText();
+ if (elementText !== 'By Standard') {
+ throw new Error(`Expected: "By Standard" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: By Standard tab title text matched as expected');
+ }
+ },
+
+ //By Standard tab title -navy blue
+ {
+ description: 'Validate by standard tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('By Standard')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "By Standard" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: By Standard tab title color matched as expected');
+ }
+ },
+
+ //AutoAlign tab title
+ {
+ description: 'Validate AutoAlign tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('AutoAlign')).getText();
+ if (elementText !== 'AutoAlign') {
+ throw new Error(`Expected: "AutoAlign" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: AutoAlign tab title text matched as expected');
+ }
+ },
+
+ //AutoAlign tab title -gray (dimmed)
+ {
+ description: 'Validate AutoAlign tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('AutoAlign')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "AutoAlign" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: AutoAlign tab title color matched as expected');
+ }
+ },
+
+ //Select a set of standards label
+ {
+ description: 'Validate select a set of standards label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('label:nth-child(4)')).getText();
+ if (elementText !== 'Select a set of standards:') {
+ throw new Error(`Expected: "Select a set of standards:" label text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Select a set of standards: label text matched as expected');
+ }
+ },
+
+ //Standards dropdown
+ {
+ description: 'Validate standards dropdown value',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('#correlate-select-state')).getAttribute('value');
+ if (elementValue !== 'none') {
+ throw new Error(`Expected: Dropdown value to be "none"; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: Dropdown "none" value matched as expected');
+ }
+ },
+
+ //NEXT ACTION - AutoAlign
+ { description: 'Click AutoAlign tab link', action: async () => await driver.findElement(By.linkText('AutoAlign')).click() },
+ { description: 'Wait for action to complete', action: async () => await driver.sleep(5000) },
+
+ //Browse tab title
+ {
+ description: 'Validate browse tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse tab title text matched as expected');
+ }
+ },
+
+ //Browse tab title -gray (dimmed)
+ {
+ description: 'Validate browse tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Browse')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "Browse" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse tab title color matched as expected');
+ }
+ },
+
+ //By Standard tab title
+ {
+ description: 'Validate by standard tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('By Standard')).getText();
+ if (elementText !== 'By Standard') {
+ throw new Error(`Expected: "By Standard" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: By Standard tab title text matched as expected');
+ }
+ },
+
+ //By Standard tab title -gray (dimmed)
+ {
+ description: 'Validate by standard tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('By Standard')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Expected: "By Standard" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: By Standard tab title color matched as expected');
+ }
+ },
+
+ //AutoAlign tab title
+ {
+ description: 'Validate AutoAlign tab title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('AutoAlign')).getText();
+ if (elementText !== 'AutoAlign') {
+ throw new Error(`Expected: "AutoAlign" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: AutoAlign tab title text matched as expected');
+ }
+ },
+
+ //AutoAlign tab title -navy blue
+ {
+ description: 'Validate AutoAlign tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('AutoAlign')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Expected: "AutoAlign" tab title color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: AutoAlign tab title color matched as expected');
+ }
+ },
+
+ //EdGates AutoAlign system...title
+ {
+ description: 'Validate EdGates AutoAlign title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#suggest_form > b')).getText();
+ if (elementText !== `EdGate's AutoAlign system can suggest concepts that may be relevant`) {
+ throw new Error(`Expected: "EdGate's AutoAlign system can suggest concepts that may be relevant" tab title text did not match; Actual: "${elementText}"`);
+ }
+ console.log(`Passed: EdGate's AutoAlign system can suggest concepts that may be relevant title text matched as expected`);
+ }
+ },
+
+ /*Base Suggestions On sub-title
+ {
+ description: 'Validate AutoAlign sub-title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#suggest_form')).getText();
+ if (elementText !== 'Base Suggestions On:2') {
+ throw new Error(`Expected: "Base Suggestions On1" sub-title text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Base Suggestions1 On sub-title text matched as expected');
+ }
+ },*/
+
+ //Title checkbox
+ {
+ description: 'Verify Title checkbox is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#inlineCheckbox1')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Title checkbox not found');
+ }
+ console.log('Passed: Title checkbox present');
+ }
+ },
+
+ //Title checkbox label
+ {
+ description: 'Validate Title checkbox label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.checkbox-inline:nth-child(1)')).getText();
+ if (elementText !== 'Title') {
+ throw new Error(`Expected: "Title" checkbox label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Title checkbox label matched as expected');
+ }
+ },
+
+ //Description checkbox
+ {
+ description: 'Verify Description checkbox is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#inlineCheckbox2')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Description checkbox not found');
+ }
+ console.log('Passed: Description checkbox present');
+ }
+ },
+
+ //Description checkbox label
+ {
+ description: 'Validate Description checkbox label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.checkbox-inline:nth-child(2)')).getText();
+ if (elementText !== 'Description') {
+ throw new Error(`Expected: "Description" checkbox label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Description checkbox label matched as expected');
+ }
+ },
+
+ //Alignment Status checkbox
+ {
+ description: 'Verify Alignment Status checkbox is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#inlineCheckbox3')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Alignment Status checkbox not found');
+ }
+ console.log('Passed: Alignment Status checkbox present');
+ }
+ },
+
+ //Alignment Status checkbox label
+ {
+ description: 'Validate Alignment Status checkbox label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.checkbox-inline:nth-child(3)')).getText();
+ if (elementText !== 'Alignment Status') {
+ throw new Error(`Expected: "Alignment Status" checkbox label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Alignment Status checkbox label matched as expected');
+ }
+ },
+
+ /*# of Concepts label
+ {
+ description: 'Validate # of Concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#suggest_form')).getText();
+ if (elementText !== '# of Concepts') {
+ throw new Error(`Expected: "# of Concepts" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: # of Concepts label matched as expected');
+ }
+ },*/
+
+ //# of Concepts dropdown value
+ {
+ description: 'Validate # of Concepts dropdown value text',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('#conceptnum')).getAttribute('value');
+ if (elementValue !== '5') {
+ throw new Error(`Expected: "5"; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: 5 value text matched as expected');
+ }
+ },
+
+ /*Subject Areas label
+ {
+ description: 'Validate Subject Areas label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#suggest_form')).getText();
+ if (elementText !== 'Subject Areas') {
+ throw new Error(`Expected: "Subject Areas" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Subject Areas label matched as expected');
+ }
+ },*/
+
+ //Subject Area value -Language Arts
+ {
+ description: 'Validate Subject Area value Language Arts text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#concept_subjects > option:nth-child(1)')).getText();
+ if (elementText !== 'Language Arts') {
+ throw new Error(`Expected: Subject Areas: "Language Arts" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Subject Areas: Language Arts label matched as expected');
+ }
+ },
+
+ //Subject Area value -Mathematics
+ {
+ description: 'Validate Subject Area value Mathematics text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#concept_subjects > option:nth-child(2)')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: Subject Areas: "Mathematics" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Subject Areas: Mathematics label matched as expected');
+ }
+ },
+
+ //Subject Area value -Science
+ {
+ description: 'Validate Subject Area value Science text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#concept_subjects > option:nth-child(3)')).getText();
+ if (elementText !== 'Science') {
+ throw new Error(`Expected: Subject Areas: "Science" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Subject Areas: Science label matched as expected');
+ }
+ },
+
+ //Subject Area value -Social Studies
+ {
+ description: 'Validate Subject Area value Social Studies text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#concept_subjects > option:nth-child(4)')).getText();
+ if (elementText !== 'Social Studies') {
+ throw new Error(`Expected: Subject Areas: "Social Studies" label did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Subject Areas: Social Studies label matched as expected');
+ }
+ },
+
+ //Suggest Concepts button text
+ {
+ description: 'Validate Suggest Concepts button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.btn:nth-child(9)')).getText();
+ if (elementText !== 'Suggest Concepts') {
+ throw new Error(`Expected: "Suggest Concepts" button text did not match; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Suggest Concepts button text matched as expected');
+ }
+ },
+
+ //Suggest Concepts button icon
+ {
+ description: 'Verify Suggest Concepts button icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.glyphicon-tags')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Suggest Concepts button icon not found');
+ }
+ console.log('Passed: Suggest Concepts button icon present');
+ }
+ },
+
+ //Suggest Concepts button color -green
+ {
+ description: 'Validate Suggest Concepts button color',
+ action: async () => {
+ const elementValue = await driver.findElement(By.css('.btn:nth-child(9)')).getCssValue('background-color');
+ if (elementValue !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Expected: "Suggest Concepts" button color did not match; Actual: "${elementValue}"`);
+ }
+ console.log('Passed: Suggest Concepts button color matched as expected');
+ }
+ },
+
];
const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {
@@ -2779,7 +2350,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', 'contentPage');
+ const dir = path.join('screenshots', 'editItem');
const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
const screenshotPath = path.join(dir, screenshotFileName);
@@ -2789,15 +2360,15 @@ const takeScreenshot = async (driver, stepIndex, stepDescription) => {
const clearOldResults = () => {
// Remove old screenshots
- const screenshotDir = path.join('screenshots', 'contentPage');
+ const screenshotDir = path.join('screenshots', 'editItem');
if (fs.existsSync(screenshotDir)) {
fs.rmSync(screenshotDir, { recursive: true, force: true });
}
fs.mkdirSync(screenshotDir, { recursive: true });
// Remove old Excel file
- if (fs.existsSync('contentPageResults.xlsx')) {
- fs.unlinkSync('contentPageResults.xlsx');
+ if (fs.existsSync('editItemResults.xlsx')) {
+ fs.unlinkSync('editItemResults.xlsx');
}
};
@@ -2848,11 +2419,11 @@ try {
// Write the updated worksheet back to the workbook and save it
workbook.Sheets['Sheet1'] = worksheet;
- XLSX.writeFile(workbook, 'contentPageResults.xlsx');
+ XLSX.writeFile(workbook, 'editItemResults.xlsx');
} finally {
await driver.quit();
}
})();
}
-export default ExACT_contentPage;
+export default ExACT_editItem;