diff --git a/tests/ExACT_alignConceptsPage.js b/tests/ExACT_alignConceptsPage.js
new file mode 100644
index 0000000..119e4a9
--- /dev/null
+++ b/tests/ExACT_alignConceptsPage.js
@@ -0,0 +1,2910 @@
+import { Builder, By, Key, until } from 'selenium-webdriver';
+import fs from 'fs';
+import XLSX from 'xlsx';
+import path from 'path';
+
+const ExACT_alignConceptsPage = (req, res) => {
+ res.send('
ExACT Automated Test Script - Align Concepts Page: Initiated
');
+ (async function example() {
+ let driver = await new Builder().forBrowser('chrome').build();
+ let testStatus = 'Failed';
+ let workbook;
+ let worksheet;
+ const startTime = new Date().toISOString();
+
+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() },
+
+ //LOGIN
+ { description: 'Enter username', action: async () => await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan') },
+ { description: 'Enter password', action: async () => await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!') },
+ { description: 'Click Login button', action: async () => await driver.findElement(By.css('.login')).click() },
+ { description: 'Wait for login process to complete', action: async () => await driver.sleep(10000) },
+
+ //Wait for dashboard to load - Correlation Coverages View Details button
+ {
+ description: 'Wait for dashboard load to completely',
+ action: async () => {
+ return await driver.wait(until.elementLocated(By.linkText('View Details')), 10000).catch(() => false);
+ }
+ },
+
+ //Dashboard title
+ {
+ description: 'Validate dashboard title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.e-heading')).getText();
+ if (elementText !== 'Correlation Dashboard') {
+ throw new Error(`Expected: "Correlation Dashboard"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Dashboard title matched as expected');
+ }
+ },
+
+ //Align icon color -gray
+ {
+ description: 'Validate Align icon color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.fb-align')).getCssValue('color');
+ if (elementStyle !== 'rgba(99, 99, 99, 1)') {
+ throw new Error(`Align icon color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Align icon color matched as expected');
+ }
+ },
+
+ //NEXT ACTION - Navigate to Align page
+ { description: 'Click Align navigation link', action: async () => await driver.findElement(By.linkText('Align')).click() },
+
+ //Wait for dashboard to load - Correlation Coverages View Details button
+ {
+ description: 'Wait for dashboard load to completely',
+ action: async () => {
+ return await driver.wait(until.elementLocated(By.css('h2')), 10000).catch(() => false);
+ }
+ },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -white (active)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -dark blue (active)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -gray (dimmed)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -white (dimmed)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Available Content header
+ {
+ description: 'Validate Available Content header',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#content form > p')).getText();
+ if (elementText !== 'Available Content') {
+ throw new Error(`Expected: "Available Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Available Content header matched as expected');
+ }
+ },
+
+ //NEXT ACTION - Click Concetps tab
+ { description: 'Click Concepts tab', action: async () => await driver.findElement(By.linkText('Concepts')).click() },
+
+ //Wait for page to load
+ {
+ description: 'Wait for Concepts page to load',
+ action: async () => {
+ return await driver.wait(until.elementLocated(By.css('.card-body > p')), 10000).catch(() => false);
+ }
+ },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -gray (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -white (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -white (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -navy blue (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Browse the list of curricular concepts label
+ {
+ description: 'Validate Browse the list of curricular concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card-body > p')).getText();
+ if (elementText !== 'Browse the list of curricular concepts') {
+ throw new Error(`Expected: "Browse the list of curricular concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the list of curricular concepts label matched as expected');
+ }
+ },
+
+ //Language Arts concepts label
+ {
+ description: 'Validate Language Arts concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.concept-item:nth-child(1) > a')).getText();
+ if (elementText !== 'Language Arts') {
+ throw new Error(`Expected: "Language Arts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Language Arts concepts label matched as expected');
+ }
+ },
+
+ //Language Arts total concepts count
+ {
+ description: 'Validate Language Arts total concepts count',
+ 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 total concepts count of "1359"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Language Arts total concepts count matched as expected');
+ }
+ },
+
+ //Language Arts total sub-concepts count
+ {
+ description: 'Validate Language Arts total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).getAttribute('title');
+ if (elementText !== '1359 sub-concepts') {
+ throw new Error(`Expected: Language Arts total concepts count of "1359 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Language Arts total sub-concepts count 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('.concept-item:nth-child(1)')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Language Arts arrow icon not found');
+ }
+ console.log('Passed: Language Arts arrow icon present');
+ }
+ },
+
+ //Mathematics concepts label
+ {
+ description: 'Validate Mathematics concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.concept-item:nth-child(2) > a')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics concepts label matched as expected');
+ }
+ },
+
+ //Mathematics total concepts count
+ {
+ description: 'Validate Mathematics total concepts count',
+ 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 total concepts count of "1219"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics total concepts count matched as expected');
+ }
+ },
+
+ //Mathematics total sub-concepts count
+ {
+ description: 'Validate Mathematics total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .badge')).getAttribute('title');
+ if (elementText !== '1219 sub-concepts') {
+ throw new Error(`Expected: Mathematics total concepts count of "1219 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics total sub-concepts count matched as expected');
+ }
+ },
+
+ //Mathematics arrow icon
+ {
+ description: 'Verify Mathematics arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.concept-item:nth-child(2)')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Mathematics arrow icon not found');
+ }
+ console.log('Passed: Mathematics arrow icon present');
+ }
+ },
+
+ //Science concepts label
+ {
+ description: 'Validate Science concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.concept-item:nth-child(3) > a')).getText();
+ if (elementText !== 'Science') {
+ throw new Error(`Expected: "Science"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Science concepts label matched as expected');
+ }
+ },
+
+ //Science total concepts count
+ {
+ description: 'Validate Science total concepts count',
+ 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 total concepts count of "2108"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Science total concepts count matched as expected');
+ }
+ },
+
+ //Science total sub-concepts count
+ {
+ description: 'Validate Science total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .badge')).getAttribute('title');
+ if (elementText !== '2108 sub-concepts') {
+ throw new Error(`Expected: Science total concepts count of "2108 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Science total sub-concepts count matched as expected');
+ }
+ },
+
+ //Science arrow icon
+ {
+ description: 'Verify Science arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.concept-item:nth-child(3)')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Science arrow icon not found');
+ }
+ console.log('Passed: Science arrow icon present');
+ }
+ },
+
+ //Social Studies concepts label
+ {
+ description: 'Validate Social Studies concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.concept-item:nth-child(4) > a')).getText();
+ if (elementText !== 'Social Studies') {
+ throw new Error(`Expected: "Social Studies"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Social Studies concepts label matched as expected');
+ }
+ },
+
+ //Social Studies total concepts count
+ {
+ description: 'Validate Social Studies total concepts count',
+ 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 total concepts count of "2188"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Social Studies total concepts count matched as expected');
+ }
+ },
+
+ //Social Studies total sub-concepts count
+ {
+ description: 'Validate Social Studies total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) .badge')).getAttribute('title');
+ if (elementText !== '2188 sub-concepts') {
+ throw new Error(`Expected: Social Studies total concepts count of "2188 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Social Studies total sub-concepts count 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('.concept-item:nth-child(4)')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Social Studies arrow icon not found');
+ }
+ console.log('Passed: Social Studies arrow icon present');
+ }
+ },
+
+ //World Languages concepts label
+ {
+ description: 'Validate World Languages concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.concept-item:nth-child(5) > a')).getText();
+ if (elementText !== 'World Languages') {
+ throw new Error(`Expected: "World Languages"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: World Languages concepts label matched as expected');
+ }
+ },
+
+ //World Languages total concepts count
+ {
+ description: 'Validate World Languages total concepts count',
+ 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 total concepts count of "375"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: World Languages total concepts count matched as expected');
+ }
+ },
+
+ //World Languages total sub-concepts count
+ {
+ description: 'Validate World Languages total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(5) .badge')).getAttribute('title');
+ if (elementText !== '375 sub-concepts') {
+ throw new Error(`Expected: World Languages total concepts count of "375 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: World Languages total sub-concepts count 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('.concept-item:nth-child(5)')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('World Languages arrow icon not found');
+ }
+ console.log('Passed: World Languages arrow icon present');
+ }
+ },
+
+ //NEXT ACTION - Click Mathematics link
+ { description: 'Click Mathematics link', action: async () => await driver.findElement(By.css('.concept-item:nth-child(2) > a')).click() },
+ { description: 'Browser sleep', action: async () => await driver.sleep(2000) },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -gray (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -white (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -white (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -navy blue (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Browse the list of curricular concepts label
+ {
+ description: 'Validate Browse the list of curricular concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card-body > p')).getText();
+ if (elementText !== 'Browse the list of curricular concepts') {
+ throw new Error(`Expected: "Browse the list of curricular concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the list of curricular concepts label matched as expected');
+ }
+ },
+
+ //Browse breadcrumb
+ {
+ description: 'Validate Browse breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse breadcrumb matched as expected');
+ }
+ },
+
+ //Mathematics breadcrumb
+ {
+ description: 'Validate Mathematics breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Mathematics')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics breadcrumb matched as expected');
+ }
+ },
+
+ //Concept 1 - Algebra label
+ {
+ description: 'Validate Algebra label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) > .clickable')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Algebra"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra label matched as expected');
+ }
+ },
+
+ //Concept 1 - Algebra count
+ {
+ description: 'Validate Algebra total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).getText();
+ if (elementText !== '5') {
+ throw new Error(`Expected: Algebra total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra total concepts count matched as expected');
+ }
+ },
+
+ //Concept 1 - Algebra total sub-concepts count
+ {
+ description: 'Validate Algebra total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).getAttribute('title');
+ if (elementText !== '5 sub-concepts') {
+ throw new Error(`Expected: Algebra total concepts count of "5 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 1 - Algebra arrow icon
+ {
+ description: 'Verify Algebra 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('Algebra arrow icon not found');
+ }
+ console.log('Passed: Algebra arrow icon present');
+ }
+ },
+
+ //Concept 2 - Computer Math label
+ {
+ description: 'Validate Computer Math label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Computer Math')).getText();
+ if (elementText !== 'Computer Math') {
+ throw new Error(`Expected: "Computer Math"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Computer Math label matched as expected');
+ }
+ },
+
+ //Concept 2 - Computer Math font size
+ {
+ description: 'Validate Concept 2 - Computer Math font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Computer Math')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 2 - Computer Math font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 2 - Computer Math font size matched as expected');
+ }
+ },
+
+ //Concept 2 - Computer Math count
+ {
+ description: 'Validate Computer Math total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .badge')).getText();
+ if (elementText !== '24') {
+ throw new Error(`Expected: Computer Math total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Computer Math total concepts count matched as expected');
+ }
+ },
+
+ //Concept 2 - Computer Math total sub-concepts count
+ {
+ description: 'Validate Computer Math total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .badge')).getAttribute('title');
+ if (elementText !== '24 sub-concepts') {
+ throw new Error(`Expected: Computer Math total concepts count of "24 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Computer Math total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 2 - Computer Math arrow icon
+ {
+ description: 'Verify Computer Math 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('Computer Math arrow icon not found');
+ }
+ console.log('Passed: Computer Math arrow icon present');
+ }
+ },
+
+ //Concept 3 - Discrete Math label
+ {
+ description: 'Validate Discrete Math label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Discrete Math')).getText();
+ if (elementText !== 'Discrete Math') {
+ throw new Error(`Expected: "Discrete Math"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Discrete Math label matched as expected');
+ }
+ },
+
+ //Concept 3 - Discrete Math font size
+ {
+ description: 'Validate Concept 3 - Discrete Math font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Discrete Math')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 3 - Discrete Math font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 3 - Discrete Math font size matched as expected');
+ }
+ },
+
+ //Concept 3 - Discrete Math count
+ {
+ description: 'Validate Discrete Math total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .badge')).getText();
+ if (elementText !== '22') {
+ throw new Error(`Expected: Discrete Math total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Discrete Math total concepts count matched as expected');
+ }
+ },
+
+ //Concept 3 - Discrete Math total sub-concepts count
+ {
+ description: 'Validate Discrete Math total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .badge')).getAttribute('title');
+ if (elementText !== '22 sub-concepts') {
+ throw new Error(`Expected: Discrete Math total concepts count of "22 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Discrete Math total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 3 - Discrete Math arrow icon
+ {
+ description: 'Verify Discrete Math 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('Discrete Math arrow icon not found');
+ }
+ console.log('Passed: Discrete Math arrow icon present');
+ }
+ },
+
+ //Concept 4 - General Mathematics label
+ {
+ description: 'Validate General Mathematics label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) > .clickable')).getText();
+ if (elementText !== 'General Mathematics') {
+ throw new Error(`Expected: "General Mathematics"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: General Mathematics label matched as expected');
+ }
+ },
+
+ //Concept 4 - General Mathematics count
+ {
+ description: 'Validate General Mathematics total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) .badge')).getText();
+ if (elementText !== '7') {
+ throw new Error(`Expected: General Mathematics total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: General Mathematics total concepts count matched as expected');
+ }
+ },
+
+ //Concept 4 - General Mathematics total sub-concepts count
+ {
+ description: 'Validate General Mathematics Math total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) .badge')).getAttribute('title');
+ if (elementText !== '7 sub-concepts') {
+ throw new Error(`Expected: General Mathematics total concepts count of "7 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: General Mathematics total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 4 - General Mathematics arrow icon
+ {
+ description: 'Verify General Mathematics 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('General Mathematics arrow icon not found');
+ }
+ console.log('Passed: General Mathematics arrow icon present');
+ }
+ },
+
+ //Concept 5 - Geometry label
+ {
+ description: 'Validate Geometry label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Geometry')).getText();
+ if (elementText !== 'Geometry') {
+ throw new Error(`Expected: "Geometry"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Geometry label matched as expected');
+ }
+ },
+
+ //Concept 5 - Geometry font size
+ {
+ description: 'Validate Concept 5 - Geometry font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Geometry')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 5 - Geometry font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 5 - Geometry font size matched as expected');
+ }
+ },
+
+ //Concept 5 - Geometry count
+ {
+ description: 'Validate Geometry count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(5) .badge')).getText();
+ if (elementText !== '68') {
+ throw new Error(`Expected: Geometry count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Geometry count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 5 - Geometry total sub-concepts count
+ {
+ description: 'Validate Geometry total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(5) .badge')).getAttribute('title');
+ if (elementText !== '68 sub-concepts') {
+ throw new Error(`Expected: Geometry total concepts count of "68 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Geometry total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 5 - Geometry arrow icon
+ {
+ description: 'Verify Geometry 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('Geometry arrow icon not found');
+ }
+ console.log('Passed: Geometry arrow icon present');
+ }
+ },
+
+ //Concept 6 - Math Process Standards label
+ {
+ description: 'Validate Math Process Standards label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(6) > .clickable')).getText();
+ if (elementText !== 'Math Process Standards') {
+ throw new Error(`Expected: "Math Process Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Math Process Standards label matched as expected');
+ }
+ },
+
+ //Concept 6 - Math Process count
+ {
+ description: 'Validate Math Process count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(6) .badge')).getText();
+ if (elementText !== '11') {
+ throw new Error(`Expected: Math Process count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Math Process count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 6 - Math Process total sub-concepts count
+ {
+ description: 'Validate Math Process total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(6) .badge')).getAttribute('title');
+ if (elementText !== '11 sub-concepts') {
+ throw new Error(`Expected: Math Process total concepts count of "11 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Math Process total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 6 - Math Process arrow icon
+ {
+ description: 'Verify Math Process arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(6) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Math Process arrow icon not found');
+ }
+ console.log('Passed: Math Process arrow icon present');
+ }
+ },
+
+ //Concept 7 - Measurement label
+ {
+ description: 'Validate Measurement label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Measurement')).getText();
+ if (elementText !== 'Measurement') {
+ throw new Error(`Expected: "Measurement"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Measurement label matched as expected');
+ }
+ },
+
+ //Concept 7 - Measurement font size
+ {
+ description: 'Validate Concept 7 - Measurement font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Measurement')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 7 - Measurement font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 7 - Measurement font size matched as expected');
+ }
+ },
+
+ //Concept 7 - Measurements count
+ {
+ description: 'Validate Measurements count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(7) .badge')).getText();
+ if (elementText !== '30') {
+ throw new Error(`Expected: Measurements count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Measurements count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 7 - Measurements total sub-concepts count
+ {
+ description: 'Validate Measurements total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(7) .badge')).getAttribute('title');
+ if (elementText !== '30 sub-concepts') {
+ throw new Error(`Expected: Measurements total concepts count of "30 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Measurements total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 7 - Measurements arrow icon
+ {
+ description: 'Verify Measurements arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(7) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Measurements arrow icon not found');
+ }
+ console.log('Passed: Measurements arrow icon present');
+ }
+ },
+
+ //Concept 8 - Number Operations label
+ {
+ description: 'Validate Number Operations label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Number Operations')).getText();
+ if (elementText !== 'Number Operations') {
+ throw new Error(`Expected: "Number Operations"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Number Operations label matched as expected');
+ }
+ },
+
+ //Concept 8 - Number Operations font size
+ {
+ description: 'Validate Concept 8 - Number Operations font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Number Operations')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 8 - Number Operations font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 8 - Number Operations font size matched as expected');
+ }
+ },
+
+ //Concept 8 - Number Operations count
+ {
+ description: 'Validate Number Operations count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(8) .badge')).getText();
+ if (elementText !== '44') {
+ throw new Error(`Expected: Number Operations count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Number Operations count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 8 - Number Operations total sub-concepts count
+ {
+ description: 'Validate Number Operations total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(8) .badge')).getAttribute('title');
+ if (elementText !== '44 sub-concepts') {
+ throw new Error(`Expected: Number Operations total concepts count of "44 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Number Operations total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 8 - Number Operations arrow icon
+ {
+ description: 'Verify Number Operations arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(8) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Number Operations arrow icon not found');
+ }
+ console.log('Passed: Number Operations arrow icon present');
+ }
+ },
+
+ //Concept 9 - Process Standards label
+ {
+ description: 'Validate Process Standards label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(9) > .clickable')).getText();
+ if (elementText !== 'Process Standards') {
+ throw new Error(`Expected: "Process Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Process Standards label matched as expected');
+ }
+ },
+
+ //Concept 9 - Process Standards count
+ {
+ description: 'Validate Process Standards count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(9) .badge')).getText();
+ if (elementText !== '5') {
+ throw new Error(`Expected: Process Standards count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Process Standards count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 9 - Process Standards total sub-concepts count
+ {
+ description: 'Validate Process Standards total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(9) .badge')).getAttribute('title');
+ if (elementText !== '5 sub-concepts') {
+ throw new Error(`Expected: Process Standards total concepts count of "5 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Process Standards total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 9 - Process Standards arrow icon
+ {
+ description: 'Verify Process Standards arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(9) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Process Standards arrow icon not found');
+ }
+ console.log('Passed: Process Standards arrow icon present');
+ }
+ },
+
+ //Concept 10 - Statistics Probability label
+ {
+ description: 'Validate Statistics Probability label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Statistics Probability')).getText();
+ if (elementText !== 'Statistics Probability') {
+ throw new Error(`Expected: "Statistics Probability"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Statistics Probability label matched as expected');
+ }
+ },
+
+ //Concept 10 - Statistics Probability font size
+ {
+ description: 'Validate Concept 10 - Statistics Probability font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Statistics Probability')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 10 - Statistics Probability font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 10 - Statistics Probability font size matched as expected');
+ }
+ },
+
+ //Concept 10 - Statistics Probability count
+ {
+ description: 'Validate Statistics Probabilitys count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(10) .badge')).getText();
+ if (elementText !== '37') {
+ throw new Error(`Expected: Statistics Probability count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Statistics Probability count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 10 - Statistics Probability total sub-concepts count
+ {
+ description: 'Validate Statistics Probability total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(10) .badge')).getAttribute('title');
+ if (elementText !== '37 sub-concepts') {
+ throw new Error(`Expected: Statistics Probability total concepts count of "37 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Statistics Probability total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 10 - Statistics Probability arrow icon
+ {
+ description: 'Verify Statistics Probability arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(10) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Statistics Probability arrow icon not found');
+ }
+ console.log('Passed: Statistics Probability arrow icon present');
+ }
+ },
+
+ //Concept 11 - Trigonometry label
+ {
+ description: 'Validate Trigonometry label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Trigonometry')).getText();
+ if (elementText !== 'Trigonometry') {
+ throw new Error(`Expected: "Trigonometry"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Trigonometry label matched as expected');
+ }
+ },
+
+ //Concept 11 - Trigonometry font size
+ {
+ description: 'Validate Concept 11 - Trigonometry font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Trigonometry')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Concept 11 - Trigonometry font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept 11 - Trigonometry font size matched as expected');
+ }
+ },
+
+ //Concept 11 - Trigonometry count
+ {
+ description: 'Validate Trigonometry count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(11) .badge')).getText();
+ if (elementText !== '20') {
+ throw new Error(`Expected: Trigonometry count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Trigonometry count total concepts count matched as expected');
+ }
+ },
+
+ //Concept 11 - Trigonometry total sub-concepts count
+ {
+ description: 'Validate Trigonometry total sub-concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(11) .badge')).getAttribute('title');
+ if (elementText !== '20 sub-concepts') {
+ throw new Error(`Expected: Trigonometry total concepts count of "20 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Trigonometry total sub-concepts count matched as expected');
+ }
+ },
+
+ //Concept 11 - Trigonometry arrow icon
+ {
+ description: 'Verify Trigonometry arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.list-group-item:nth-child(11) .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Trigonometry arrow icon not found');
+ }
+ console.log('Passed: Trigonometry arrow icon present');
+ }
+ },
+
+ //NEXT ACTION - Click Algebra count icon
+ { description: 'Click Algebra count icon', action: async () => await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).click() },
+ { description: 'Browser sleep', action: async () => await driver.sleep(2000) },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -gray (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -white (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -white (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -navy blue (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Browse the list of curricular concepts label
+ {
+ description: 'Validate Browse the list of curricular concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card-body > p')).getText();
+ if (elementText !== 'Browse the list of curricular concepts') {
+ throw new Error(`Expected: "Browse the list of curricular concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the list of curricular concepts label matched as expected');
+ }
+ },
+
+ //Browse breadcrumb
+ {
+ description: 'Validate Browse breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse breadcrumb matched as expected');
+ }
+ },
+
+ //Mathematics breadcrumb
+ {
+ description: 'Validate Mathematics breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Mathematics')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics breadcrumb matched as expected');
+ }
+ },
+
+ //Algebra breadcrumb
+ {
+ description: 'Validate Algebra breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Algebra')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Algebra" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra breadcrumb matched as expected');
+ }
+ },
+
+ //Change of Parameter/Constant/Coefficient label
+ {
+ description: 'Validate Concept - Change of Parameter-Constant-Coefficient label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) > .clickable')).getText();
+ if (elementText !== 'Change of Parameter/Constant/Coefficient') {
+ throw new Error(`Expected: Concept - "Change of Parameter/Constant/Coefficient"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Change of Parameter/Constant/Coefficient label matched as expected');
+ }
+ },
+
+ //Change of Parameter/Constant/Coefficient count
+ {
+ description: 'Validate Concept - Change of Parameter-Constant-Coefficient count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).getText();
+ if (elementText !== '5') {
+ throw new Error(`Expected: Concept - Change of Parameter/Constant/Coefficient count total concepts count of "5"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Change of Parameter/Constant/Coefficient count total concepts count matched as expected');
+ }
+ },
+
+ //Change of Parameter/Constant/Coefficient sub-concepts count
+ {
+ description: 'Validate Concept - Change of Parameter-Constant-Coefficient sub-concepts count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .badge')).getAttribute('title');
+ if (elementText !== '5 sub-concepts') {
+ throw new Error(`Expected: Concept - Change of Parameter/Constant/Coefficient sub-concepts count total concepts count of "5 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Change of Parameter/Constant/Coefficient sub-concepts count total concepts count matched as expected');
+ }
+ },
+
+ //Change of Parameter/Constant/Coefficient arrow icon
+ {
+ description: 'Verify Concept - Change of Parameter-Constant-Coefficient 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('Concept - Change of Parameter/Constant/Coefficient arrow icon not found');
+ }
+ console.log('Passed: Concept - Change of Parameter/Constant/Coefficient arrow icon present');
+ }
+ },
+
+ //Equations/Inequalities & Functions label
+ {
+ description: 'Validate Concept - Equations 1 label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) > .clickable')).getText();
+ if (elementText !== 'Equations/Inequalities & Functions') {
+ throw new Error(`Expected: Concept - "Equations/Inequalities & Functions"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Functions label matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions count
+ {
+ description: 'Validate Concept - Equations-Inequalities & Functions count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .badge')).getText();
+ if (elementText !== '4') {
+ throw new Error(`Expected: Concept - Equations/Inequalities & Function count total concepts count of "4"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Function count total concepts count matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions sub-concepts count
+ {
+ description: 'Validate Concept - Equations-Inequalities & Functions sub-concepts count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .badge')).getAttribute('title');
+ if (elementText !== '4 sub-concepts') {
+ throw new Error(`Expected: Concept - Equations/Inequalities & Function sub-concepts count total concepts count of "4 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Function sub-concepts count total concepts count matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions arrow icon
+ {
+ description: 'Verify Concept -Equations-Inequalities & Functions 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('Concept - Equations/Inequalities & Function arrow icon not found');
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Function arrow icon present');
+ }
+ },
+
+ //Equations/Inequalities & Functions/Solving label
+ {
+ description: 'Validate Concept - Equations-Inequalities & Functions-Solving label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) > .clickable')).getText();
+ if (elementText !== 'Equations/Inequalities & Functions/Solving') {
+ throw new Error(`Expected: Concept - "Equations/Inequalities & Functions/Solving"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Functions/Solving label matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions/Solving count
+ {
+ description: 'Validate Concept - Equations-Inequalities & Functions-Solving count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .badge')).getText();
+ if (elementText !== '1') {
+ throw new Error(`Expected: Concept - Equations/Inequalities & Functions/Solving count total concepts count of "1"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Functions/Solving count total concepts count matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions/Solving sub-content count
+ {
+ description: 'Validate Concept - Equations-Inequalities & Functions-Solving sub-content count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .badge')).getAttribute('title');
+ if (elementText !== '1 sub-concepts') {
+ throw new Error(`Expected: Concept - Equations/Inequalities & Functions/Solving sub-content count total concepts count of "1 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Functions/Solving sub-content count total concepts count matched as expected');
+ }
+ },
+
+ //Equations/Inequalities & Functions/Solving arrow icon
+ {
+ description: 'Verify Concept - Equations-Inequalities & Functions-Solving 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('Concept - Equations/Inequalities & Functions/Solving arrow icon not found');
+ }
+ console.log('Passed: Concept - Equations/Inequalities & Functions/Solving arrow icon present');
+ }
+ },
+
+ //Inequalities label
+ {
+ description: 'Validate Concept - Inequalities label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) > .clickable')).getText();
+ if (elementText !== 'Inequalities') {
+ throw new Error(`Expected: Concept - "Inequalities"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Inequalities label matched as expected');
+ }
+ },
+
+ //Inequalities count
+ {
+ description: 'Validate Concept - Inequalities count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) .badge')).getText();
+ if (elementText !== '1') {
+ throw new Error(`Expected: Concept - Inequalities count total concepts count of "1"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Inequalities count total concepts count matched as expected');
+ }
+ },
+
+ //Inequalities sub-content count
+ {
+ description: 'Validate Concept - Inequalities sub-content count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.list-group-item:nth-child(4) .badge')).getAttribute('title');
+ if (elementText !== '1 sub-concepts') {
+ throw new Error(`Expected: Concept - Inequalities sub-content count total concepts count of "1 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Inequalities sub-content count total concepts count matched as expected');
+ }
+ },
+
+ //Inequalities arrow icon
+ {
+ description: 'Verify Concept - Inequalities 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('Concept - Inequalities arrow icon not found');
+ }
+ console.log('Passed: Concept - Inequalities arrow icon present');
+ }
+ },
+
+ //Systems of Inequalities label
+ {
+ description: 'Validate Concept - Systems of Inequalities label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Systems of Inequalities')).getText();
+ if (elementText !== 'Systems of Inequalities') {
+ throw new Error(`Expected: Concept - "Systems of Inequalities"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Systems of Inequalities label matched as expected');
+ }
+ },
+
+ //Systems of Inequalities font size
+ {
+ description: 'Validate Systems of Inequalities font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Systems of Inequalities')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Systems of Inequalities font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Systems of Inequalities font size matched as expected');
+ }
+ },
+
+ //NEXT ACTION - Click Inequalities label
+ { description: 'Click Inequalities label', action: async () => await driver.findElement(By.css('.list-group-item:nth-child(4) > .clickable')).click() },
+ { description: 'Browser sleep', action: async () => await driver.sleep(2000) },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -gray (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -white (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -white (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -navy blue (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Browse the list of curricular concepts label
+ {
+ description: 'Validate Browse the list of curricular concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card-body > p')).getText();
+ if (elementText !== 'Browse the list of curricular concepts') {
+ throw new Error(`Expected: "Browse the list of curricular concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the list of curricular concepts label matched as expected');
+ }
+ },
+
+ //Browse breadcrumb
+ {
+ description: 'Validate Browse breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse breadcrumb matched as expected');
+ }
+ },
+
+ //Mathematics breadcrumb
+ {
+ description: 'Validate Mathematics breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Mathematics')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics breadcrumb matched as expected');
+ }
+ },
+
+ //Algebra breadcrumb
+ {
+ description: 'Validate Algebra breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Algebra')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Algebra" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra breadcrumb matched as expected');
+ }
+ },
+
+ //Inequalities breadcrumb
+ {
+ description: 'Validate Inequalities breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Algebra')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Inequalities" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Inequalities breadcrumb matched as expected');
+ }
+ },
+
+ //Writing label
+ {
+ description: 'Validate Inequalities label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.clickable')).getText();
+ if (elementText !== 'Writing') {
+ throw new Error(`Expected: "Writing" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Writing label matched as expected');
+ }
+ },
+
+ //Writing count
+ {
+ description: 'Validate Concept - Writing count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.badge')).getText();
+ if (elementText !== '1') {
+ throw new Error(`Expected: Concept - Writing count total concepts count of "1"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Writing count total concepts count matched as expected');
+ }
+ },
+
+ //Writing sub-content count
+ {
+ description: 'Validate Concept - Writing sub-content count total concepts count',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.badge')).getAttribute('title');
+ if (elementText !== '1 sub-concepts') {
+ throw new Error(`Expected: Concept - Writing sub-content count total concepts count of "1 sub-concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concept - Writing sub-content count total concepts count matched as expected');
+ }
+ },
+
+ //Writing arrow icon
+ {
+ description: 'Verify Concept - Writing arrow icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-chevron-right')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Concept - Writing arrow icon not found');
+ }
+ console.log('Passed: Concept - Writing arrow icon present');
+ }
+ },
+
+ //NEXT ACTION - Click Writing label
+ { description: 'Click Writing label', action: async () => await driver.findElement(By.css('.clickable')).click() },
+ { description: 'Browser sleep', action: async () => await driver.sleep(2000) },
+
+ //Browse page title
+ {
+ description: 'Validate Browse page title',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('h2')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse page title matched as expected');
+ }
+ },
+
+ //Browse page title text color -dark blue
+ {
+ description: 'Validate Browse page title text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Browse page title text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text color matched as expected');
+ }
+ },
+
+ //Browse page title text font
+ {
+ description: 'Validate Browse page title text font size',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size');
+ if (elementStyle !== '32px') {
+ throw new Error(`Browse page title text font-size did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Browse page title text font-size matched as expected');
+ }
+ },
+
+ //Content tab label
+ {
+ description: 'Validate Content tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Content')).getText();
+ if (elementText !== 'Content') {
+ throw new Error(`Expected: "Content"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Content tab label matched as expected');
+ }
+ },
+
+ //Content tab text color -gray (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Content tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab text color matched as expected');
+ }
+ },
+
+ //Content tab color -white (dimmed)
+ {
+ description: 'Validate Content tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Content')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Content tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Content tab color matched as expected');
+ }
+ },
+
+ //Standards tab label
+ {
+ description: 'Validate Standards tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Standards')).getText();
+ if (elementText !== 'Standards') {
+ throw new Error(`Expected: "Standards"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Standards tab label matched as expected');
+ }
+ },
+
+ //Standards tab text color -gray (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('color');
+ if (elementStyle !== 'rgba(182, 186, 181, 1)') {
+ throw new Error(`Standards tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab text color matched as expected');
+ }
+ },
+
+ //Standards tab color -white (dimmed)
+ {
+ description: 'Validate Standards tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Standards')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(0, 0, 0, 0)') {
+ throw new Error(`Standards tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Standards tab color matched as expected');
+ }
+ },
+
+ //Concepts tab label
+ {
+ description: 'Validate Concepts tab label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Concepts')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts tab label matched as expected');
+ }
+ },
+
+ //Concepts tab text color -white (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('color');
+ if (elementStyle !== 'rgba(255, 255, 255, 1)') {
+ throw new Error(`Concepts tab text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab text color matched as expected');
+ }
+ },
+
+ //Concepts tab color -navy blue (active)
+ {
+ description: 'Validate Concepts tab color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.linkText('Concepts')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(40, 39, 90, 1)') {
+ throw new Error(`Concepts tab color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts tab color matched as expected');
+ }
+ },
+
+ //Browse the list of curricular concepts label
+ {
+ description: 'Validate Browse the list of curricular concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card-body > p')).getText();
+ if (elementText !== 'Browse the list of curricular concepts') {
+ throw new Error(`Expected: "Browse the list of curricular concepts"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse the list of curricular concepts label matched as expected');
+ }
+ },
+
+ //Browse breadcrumb
+ {
+ description: 'Validate Browse breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Browse')).getText();
+ if (elementText !== 'Browse') {
+ throw new Error(`Expected: "Browse" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Browse breadcrumb matched as expected');
+ }
+ },
+
+ //Mathematics breadcrumb
+ {
+ description: 'Validate Mathematics breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Mathematics')).getText();
+ if (elementText !== 'Mathematics') {
+ throw new Error(`Expected: "Mathematics" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Mathematics breadcrumb matched as expected');
+ }
+ },
+
+ //Algebra breadcrumb
+ {
+ description: 'Validate Algebra breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Algebra')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Algebra" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Algebra breadcrumb matched as expected');
+ }
+ },
+
+ //Inequalities breadcrumb
+ {
+ description: 'Validate Inequalities breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Algebra')).getText();
+ if (elementText !== 'Algebra') {
+ throw new Error(`Expected: "Inequalities" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Inequalities breadcrumb matched as expected');
+ }
+ },
+
+ //Writing breadcrumb
+ {
+ description: 'Validate Writing breadcrumb',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Writing')).getText();
+ if (elementText !== 'Writing') {
+ throw new Error(`Expected: "Writing" breadcrumb; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Writing breadcrumb matched as expected');
+ }
+ },
+
+ //Linear label
+ {
+ description: 'Validate Linear label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Linear')).getText();
+ if (elementText !== 'Linear') {
+ throw new Error(`Expected: "Linear" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Linear label matched as expected');
+ }
+ },
+
+ //Linear font size
+ {
+ description: 'Validate Linear font size',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Linear')).getCssValue('font-size');
+ if (elementText !== '14.3px') {
+ throw new Error(`Expected: Linear font size to be "14.3px"; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Linear font size matched as expected');
+ }
+ },
+
+ //NEXT ACTION - Click Linear label
+ { description: 'Click Linear label', action: async () => await driver.findElement(By.linkText('Linear')).click() },
+ { description: 'Browser sleep', action: async () => await driver.sleep(2000) },
+
+ //Search label
+ {
+ description: 'Validate Search label',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Search')).getText();
+ if (elementText !== 'Search') {
+ throw new Error(`Expected: "Search" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Search label matched as expected');
+ }
+ },
+
+ //Concepts label
+ {
+ description: 'Validate Concepts label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.active:nth-child(2)')).getText();
+ if (elementText !== 'Concepts') {
+ throw new Error(`Expected: "Concepts" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Concepts label matched as expected');
+ }
+ },
+
+ //Concepts label color -green
+ {
+ description: 'Validate Concepts label color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.fb-align')).getCssValue('color');
+ if (elementStyle !== 'rgba(99, 99, 99, 1)') {
+ throw new Error(`Concepts label color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Concepts label 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 > 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');
+ }
+ },
+
+ //Excel icon
+ {
+ description: 'Verify Excel icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.icon-link:nth-child(2) > img')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Excel icon not found');
+ }
+ console.log('Passed: Excel icon present');
+ }
+ },
+
+ //Excel icon tool-tip
+ {
+ description: 'Validate Excel icon tool-tip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.icon-link:nth-child(2) > img')).getAttribute('title');
+ if (elementStyle !== 'Download in Excel format') {
+ throw new Error(`Expected: "Download in Excel format"; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Download in Excel format tool-tip matched as expected');
+ }
+ },
+
+ //Word icon
+ {
+ description: 'Verify Word icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.icon-link:nth-child(3) > img')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Word icon not found');
+ }
+ console.log('Passed: Word icon present');
+ }
+ },
+
+ //Word icon tool-tip
+ {
+ description: 'Validate Word icon tool-tip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.icon-link:nth-child(3) > img')).getAttribute('title');
+ if (elementStyle !== 'Download in Word format') {
+ throw new Error(`Expected: "Download in Word format"; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Download in Word format 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:nth-child(4) > img')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Print icon not found');
+ }
+ console.log('Passed: Print icon present');
+ }
+ },
+
+ //Print icon tool-tip
+ {
+ description: 'Validate Print icon tool-tip',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.icon-link:nth-child(4) > 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');
+ }
+ },
+
+ //Items Related label
+ {
+ description: 'Validate Items Related label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('tr:nth-child(1) div')).getText();
+ if (elementText !== 'Item(s) Related To: Algebra | Inequalities | Writing | Linear:') {
+ throw new Error(`Expected: "Item(s) Related To: Algebra | Inequalities | Writing | Linear:" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Items Related label matched as expected');
+ }
+ },
+
+ //Items Related path label
+ {
+ description: 'Validate Items Related path label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('div > b')).getText();
+ if (elementText !== 'Algebra | Inequalities | Writing | Linear:') {
+ throw new Error(`Expected: "Algebra | Inequalities | Writing | Linear:" path label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Items Related Path label matched as expected');
+ }
+ },
+
+ //Sort label
+ {
+ description: 'Validate Sort label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#contetsort')).getText();
+ if (elementText !== 'Sort') {
+ throw new Error(`Expected: "Sort" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Sort label matched as expected');
+ }
+ },
+
+ //Relevance dropdown label option
+ {
+ description: 'Validate Relevance label option',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('option:nth-child(1)')).getText();
+ if (elementText !== 'Relevance') {
+ throw new Error(`Expected: "Relevance" label option; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Relevance label option matched as expected');
+ }
+ },
+
+ //Results 1-12 of 12 label
+ {
+ description: 'Validate Results 1-12 of 12 label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.float-left:nth-child(4)')).getText();
+ if (elementText !== 'Results 1 - 12 of 12') {
+ throw new Error(`Expected: "Results 1 - 12 of 12" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Results 1 - 12 of 12 label matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems title
+ {
+ description: 'Validate Applications of Linear Systems title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Applications of Linear Systems')).getText();
+ if (elementText !== 'Applications of Linear Systems') {
+ throw new Error(`Expected: "Applications of Linear Systems" title; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems title matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems edit icon
+ {
+ description: 'Verify Applications of Linear Systems edit icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(6) .lo-title .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Applications of Linear Systems edit icon not found');
+ }
+ console.log('Passed: Applications of Linear Systems edit icon present');
+ }
+ },
+
+ //Applications of Linear Systems edit button text
+ {
+ description: 'Validate Applications of Linear Systems edit button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(6) .ml-3')).getText();
+ if (elementText !== 'Edit') {
+ throw new Error(`Expected: Applications of Linear Systems "Edit" button text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems "Edit" button text matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems edit button text color -green
+ {
+ description: 'Validate Applications of Linear Systems edit button text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.card:nth-child(6) .ml-3')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Applications of Linear Systems edit button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Applications of Linear Systems edit button text color matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems description text
+ {
+ description: 'Validate Applications of Linear Systems description text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(6) .lo-descr')).getText();
+ if (elementText !== 'Unit: Systems of Equations and Inequalities') {
+ throw new Error(`Expected: "Unit: Systems of Equations and Inequalities" text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Unit: Systems of Equations and Inequalities text matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems content set label
+ {
+ description: 'Validate Applications of Linear Systems content set label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(6) em')).getText();
+ if (elementText !== 'Content Set:') {
+ throw new Error(`Expected: Applications of Linear Systems "Content Set:" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems Content Set label matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems alignment icon
+ {
+ description: 'Verify Applications of Linear Systems alignment icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#alignstatuslink874414463')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Applications of Linear Systems alignment icon not found');
+ }
+ console.log('Passed: Applications of Linear Systems alignment icon present');
+ }
+ },
+
+ //Applications of Linear Systems alignment text
+ {
+ description: 'Validate Applications of Linear Systems alignment text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#alignstatuslink874414463 > .display-alignment')).getText();
+ if (elementText !== 'ECS Alignment (reset)') {
+ throw new Error(`Expected: Applications of Linear Systems "ECS Alignment (reset)" alignment text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems "ECS Alignment (reset)" alignment text matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems reset text
+ {
+ description: 'Validate Applications of Linear Systems reset text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#alignstatuslink874414463 > div > a > b')).getText();
+ if (elementText !== 'reset') {
+ throw new Error(`Expected: Applications of Linear Systems "reset" text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems "reset" text matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems view standards icon
+ {
+ description: 'Verify Applications of Linear Systems View Standards icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(6) .well .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Applications of Linear Systems "View Standards" icon not found');
+ }
+ console.log('Passed: Applications of Linear Systems "View Standards" icon present');
+ }
+ },
+
+ //Applications of Linear Systems view standards button text
+ {
+ description: 'Validate Applications of Linear Systems edit button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(6) .well > .btn')).getText();
+ if (elementText !== 'View Standards') {
+ throw new Error(`Expected: Applications of Linear Systems "View Standards" button text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Applications of Linear Systems "View Standards" button text matched as expected');
+ }
+ },
+
+ //Applications of Linear Systems view standards button text color -green
+ {
+ description: 'Validate Applications of Linear Systems view standards button text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.card:nth-child(6) .well > .btn')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Applications of Linear Systems "View Standards" button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Applications of Linear Systems "View Standards" button text color matched as expected');
+ }
+ },
+
+ //Direct Variation title
+ {
+ description: 'Validate Direct Variation title',
+ action: async () => {
+ const elementText = await driver.findElement(By.linkText('Direct Variation')).getText();
+ if (elementText !== 'Direct Variation') {
+ throw new Error(`Expected: "Direct Variation" title; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation title matched as expected');
+ }
+ },
+
+ //Direct Variation edit icon
+ {
+ description: 'Verify Direct Variation edit icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(7) .lo-title .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Direct Variation edit icon not found');
+ }
+ console.log('Passed: Direct Variation edit icon present');
+ }
+ },
+
+ //Direct Variation edit button text
+ {
+ description: 'Validate Direct Variation edit button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(7) .ml-3')).getText();
+ if (elementText !== 'Edit') {
+ throw new Error(`Expected: Direct Variation "Edit" button text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation "Edit" button text matched as expected');
+ }
+ },
+
+ //Direct Variation edit button text color -green
+ {
+ description: 'Validate Direct Variation edit button text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.card:nth-child(7) .ml-3')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Direct Variation edit button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Direct Variation edit button text color matched as expected');
+ }
+ },
+
+ //Direct Variation description text
+ {
+ description: 'Validate Direct Variation description text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(7) .lo-descr')).getText();
+ if (elementText !== 'Unit: Linear Functions') {
+ throw new Error(`Expected: "Unit: Linear Functions" text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Unit: Linear Functions text matched as expected');
+ }
+ },
+
+ //Direct Variation content set label
+ {
+ description: 'Validate Direct Variation content set label',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(7) em')).getText();
+ if (elementText !== 'Content Set:') {
+ throw new Error(`Expected: Direct Variation "Content Set:" label; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation Content Set label matched as expected');
+ }
+ },
+
+ //Direct Variation alignment icon
+ {
+ description: 'Verify Direct Variation alignment icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('#alignstatuslink874414465')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Direct Variation alignment icon not found');
+ }
+ console.log('Passed: Direct Variation alignment icon present');
+ }
+ },
+
+ //Direct Variation alignment text
+ {
+ description: 'Validate Direct Variation alignment text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#alignstatuslink874414465 > .display-alignment')).getText();
+ if (elementText !== 'ECS Alignment (reset)') {
+ throw new Error(`Expected: Direct Variation "ECS Alignment (reset)" alignment text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation "ECS Alignment (reset)" alignment text matched as expected');
+ }
+ },
+
+ //Direct Variation reset text
+ {
+ description: 'Validate Direct Variation reset text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('#alignstatuslink874414465 > div > a > b')).getText();
+ if (elementText !== 'reset') {
+ throw new Error(`Expected: Direct Variation "reset" text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation "reset" text matched as expected');
+ }
+ },
+
+ //Direct Variation view standards icon
+ {
+ description: 'Verify Direct Variation view standards icon is present',
+ action: async () =>
+ { const expectedIcon = await driver.wait(until.elementLocated(By.css('.card:nth-child(7) .well .fa')), 5000).catch(() => false);
+ if (!expectedIcon) {
+ throw new Error('Direct Variation "View Standards" icon not found');
+ }
+ console.log('Passed: Direct Variation "View Standards" icon present');
+ }
+ },
+
+ //Direct Variation view standards button text
+ {
+ description: 'Validate Direct Variation edit button text',
+ action: async () => {
+ const elementText = await driver.findElement(By.css('.card:nth-child(7) .well > .btn')).getText();
+ if (elementText !== 'View Standards') {
+ throw new Error(`Expected: Direct Variation "View Standards" button text; Actual: "${elementText}"`);
+ }
+ console.log('Passed: Direct Variation "View Standards" button text matched as expected');
+ }
+ },
+
+ //Direct Variation view standards button text color -green
+ {
+ description: 'Validate Direct Variation view standards button text color',
+ action: async () => {
+ const elementStyle = await driver.findElement(By.css('.card:nth-child(7) .well > .btn')).getCssValue('background-color');
+ if (elementStyle !== 'rgba(48, 200, 172, 1)') {
+ throw new Error(`Direct Variation "View Standards" button text color did not match; Actual: "${elementStyle}"`);
+ }
+ console.log('Passed: Direct Variation "View Standards" button text color matched as expected');
+ }
+ },
+
+];
+
+const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {
+ const json_data = XLSX.utils.sheet_to_json(worksheet, { header: 1 });
+ json_data.push([stepIndex, stepDescription, status, timestamp, screenshotPath]);
+ return XLSX.utils.aoa_to_sheet(json_data);
+};
+
+const takeScreenshot = async (driver, stepIndex, stepDescription) => {
+ const screenshot = await driver.takeScreenshot();
+
+ const dir = path.join('screenshots', 'alignConceptsPage');
+
+ const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`;
+ const screenshotPath = path.join(dir, screenshotFileName);
+ fs.writeFileSync(screenshotPath, screenshot, 'base64');
+ return screenshotPath;
+};
+
+const clearOldResults = () => {
+ // Remove old screenshots
+ const screenshotDir = path.join('screenshots', 'alignConceptsPage');
+ if (fs.existsSync(screenshotDir)) {
+ fs.rmSync(screenshotDir, { recursive: true, force: true });
+ }
+ fs.mkdirSync(screenshotDir, { recursive: true });
+
+ // Remove old Excel file
+ if (fs.existsSync('alignConceptsPageResults.xlsx')) {
+ fs.unlinkSync('alignConceptsPageResults.xlsx');
+ }
+};
+
+try {
+ // Initialize workbook and worksheet
+ clearOldResults();
+
+ // Initialize workbook and worksheet
+ workbook = XLSX.utils.book_new();
+ worksheet = XLSX.utils.aoa_to_sheet([
+ ['Step Number', 'Step Description', 'Status', 'Timestamp', 'Screenshot']
+ ]);
+ XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+
+ // Log test start time
+ worksheet = logStep(worksheet, 'Test Start', 'Started', '', startTime, '');
+
+ for (const step of steps) {
+ const stepIndex = steps.indexOf(step) + 1;
+ const timestamp = new Date().toISOString();
+
+ try {
+ await step.action();
+ const screenshotPath = await takeScreenshot(driver, stepIndex, step.description);
+ worksheet = logStep(worksheet, step.description, 'Passed', stepIndex, timestamp, screenshotPath);
+ } catch (error) {
+ const screenshotPath = await takeScreenshot(driver, stepIndex, `${step.description}_Failed`);
+ worksheet = logStep(worksheet, step.description, 'Failed', stepIndex, timestamp, screenshotPath);
+ console.error(`Step ${stepIndex} FAILED: ${error.message}`);
+ testStatus = 'Failed';
+ }
+ }
+
+ //Check if login was successful
+ const usernameValidation = await driver.wait(until.elementLocated(By.css('#navbarDropdown > span')), 5000).catch(() => false);
+
+ if (usernameValidation) {
+ console.log('PASSED: System logged in as expected');
+ testStatus = 'Passed';
+ } else {
+ console.log('FAILED: Unable to log in');
+ testStatus = 'Failed';
+ }
+
+ // Log test end time
+ const endTime = new Date().toISOString();
+ worksheet = logStep(worksheet, 'Test End', testStatus, '', endTime, '');
+
+ // Write the updated worksheet back to the workbook and save it
+ workbook.Sheets['Sheet1'] = worksheet;
+ XLSX.writeFile(workbook, 'alignConceptsPageResults.xlsx');
+} finally {
+ await driver.quit();
+}
+})();
+}
+
+export default ExACT_alignConceptsPage;