import { Builder, By, Key, until, Select, Browser } from 'selenium-webdriver'; import { Options as ChromeOptions } from 'selenium-webdriver/chrome.js'; import fs from 'fs'; import XLSX from 'xlsx'; import path from 'path'; import { brotliCompress } from 'zlib'; import e from 'express'; //Export JUST the steps so other scripts can import them export const myStandardsSearch_RelatedStandards = (driver) => [ { description: 'Log Related Standards start', action: async () => { console.log('------------->| MY STANDARDS - RELATED STANDARDS |<-------------'); } }, //Search breadcrumb { description: 'Validate Search breadcrumb link text, font, size, and color', action: async () => { const multipleChecks = 'Search breadcrumb link'; const element = await driver.findElement(By.linkText('Search')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Search') { console.log("Passed: Search breadcrumb text link matched as expected"); } else { errors.push(`Expected: "Search" breadcrumb text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Search breadcrumb text link font-family matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Search breadcrumb text link font-size matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(73, 80, 87, 1)') { console.log('Passed: Search breadcrumb text link color matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards breadcrumb { description: 'Validate Standards breadcrumb link text, font, size, and color', action: async () => { const multipleChecks = 'Standards breadcrum'; const element = await driver.findElement(By.css('.breadcrumb-item:nth-child(2)')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Standards') { console.log("Passed: Standards breadcrumb text link matched as expected"); } else { errors.push(`Expected: "Standards" breadcrumb text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standards breadcrumb text link font-family matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standards breadcrumb text link font-size matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards breadcrumb text link color matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Save icon { description: 'Validate Save icon', action: async () => { const multipleChecks = 'Save icon'; const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div.float-right.ml-1 > a:nth-child(1)')); const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Save icon present'); } else { errors.push('Save icon was not found'); } //text if (elementText === 'Save This Search') { console.log('Passed: Save icon tool-tip matched as expected'); } else { errors.push(`Expected: Save icon tool-tip: "Save This Search"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Print icon { description: 'Validate Print icon', action: async () => { const multipleChecks = 'Print icon'; const element = await driver.findElement(By.css('.icon-link > img')); //Get text, font, size, and color const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Print icon present'); } else { errors.push('Print icon was not found'); } //text if (elementText === 'Print This Page') { console.log('Passed: Print icon tool-tip matched as expected'); } else { errors.push(`Expected: Print icon tool-tip: "Print This Page"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Set title { description: 'Validate Standard Set title text, font, size, and color', action: async () => { const multipleChecks = 'Standard Set title'; const element = await driver.findElement(By.css('h1')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Alabama Courses of Study') { console.log("Passed: Alabama Courses of Study Standard Set title text link matched as expected"); } else { errors.push(`Expected: "Alabama Courses of Study" Standard Set title text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Alabama Courses of Study Standard Set title text link font-family matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '18.2px') { console.log('Passed: Alabama Courses of Study Standard Set title text link font-size matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link font-size "18.2px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Alabama Courses of Study Standard Set title text link color matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //SubjectGrade title { description: 'Validate SubjectGrade title text, font, size, and color', action: async () => { const multipleChecks = 'SubjectGrade title'; const element = await driver.findElement(By.css('strong')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Mathematics - Grade 9') { console.log("Passed: Mathematics - Grade 9 SubjectGrade title text link matched as expected"); } else { errors.push(`Expected: "Mathematics - Grade 9" SubjectGrade title text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link font-family matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link font-size matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link color matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Info icon { description: 'Validate Info icon', action: async () => { const multipleChecks = 'Info icon'; const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div:nth-child(5) > a')); //Get text, font, size, and color const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Info icon present'); } else { errors.push('Info icon was not found'); } //text if (elementText === 'Alignment Modification Help') { console.log('Passed: Info icon tool-tip matched as expected'); } else { errors.push(`Expected: Info icon tool-tip: "Alignment Modification Help"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Show All Correlations button { description: 'Validate Show All Correlations button text, size, and color', action: async () => { const multipleChecks = 'Show All Correlations button'; const element = await driver.findElement(By.css('.btn-primary:nth-child(2)')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Show All Correlations') { console.log('Passed: Show All Correlations button text matched as expected'); } else { errors.push(`Expected: "Show All Correlations"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Show All Correlations button text font-family matched as expected'); } else { errors.push(`Expected: Show All Correlations button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '14px') { console.log('Passed: Show All Correlations button text font-size matched as expected'); } else { errors.push(`Expected: Show All Correlations button text font-size "14px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Show All Correlations button text color matched as expected'); } else { errors.push(`Expected: Show All Correlations button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Show All Correlations button background color matched as expected'); } else { errors.push(`Expected: Show All Correlations button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Level 1 Standard title { description: 'Validate Level 1 Standard title text, font, size, color, and background color', action: async () => { const multipleChecks = 'Level 1 Standard title'; const element = await driver.findElement(By.css('.card:nth-child(8) > .card-header')); //Get text, font, size, color, and background color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); const elementBgColor = await element.getCssValue('background-color') //Track all errors const errors = []; //text if (elementText === 'Mathematical Practices (Grade 9)') { console.log("Passed: Mathematical Practices (Grade 9) Level 1 Standard title text matched as expected"); } else { errors.push(`Expected: "Mathematical Practices (Grade 9)" Level 1 Standard title text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text font-family matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '15px') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text font-size matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text font-size "15px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text color matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`); } //background-color if (elementBgColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title background color matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title background color "rgba(48, 200, 172, 1)"; Actual: "${elementBgColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 title { description: 'Validate Standard Code 1, title text, font, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, title'; const element = await driver.findElement(By.xpath('//div[2]/div/b')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'MP1') { console.log("Passed: Standard Code 1, title text matched as expected"); } else { errors.push(`Expected: "MP1" Standard Code 1, title text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, title text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standard Code 1, title text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, title text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Description { description: 'Validate Standard Code 1, description text, font, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, description'; const element = await driver.findElement(By.id('stdbox')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText.includes ('Make sense of problems and persevere in solving them. (Grade 9)')) { console.log("Passed: Standard Code 1, description text matched as expected"); } else { errors.push(`Expected: "Make sense of problems and persevere in solving them. (Grade 9)" Standard Code 1, description text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, description text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standard Code 1, description text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, description text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Tools button { description: 'Validate Standard Code 1, Tools button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Tools button'; const elementIcon = await driver.findElement(By.xpath(`//div[@id='stdbox']/div/div/button/i`)); const element = await driver.findElement(By.css('#stdbox > div.pull-right > div > button')); const elementExpandIcon = await driver.findElement(By.xpath(`(//button[@type='button'])[4]`)); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //icon if (elementIcon) { console.log('Passed: Standard Code 1, tools button icon found') } else { errors.push('FAILED: Standard Code 1 tools button icon not found') } //text if (elementText === 'Tools') { console.log('Passed: Standard Code 1, Tools button text matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Tools"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Tools button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '16px') { console.log('Passed: Standard Code 1, Tools button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text font-size "16px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standard Code 1, Tools button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standard Code 1, Tools button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //expand icon if (elementExpandIcon) { console.log('Passed: Standard Code 1, Tools expand button icon found') } else { errors.push('FAILED: Standard Code 1, Tools expand button icon not found') } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Aligned Content button { description: 'Validate Standard Code 1, Aligned Content 8 button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Aligned Content 8 button'; const element = await driver.findElement(By.id('corr-1439152630-tab')); const elementExpandIcon = await driver.findElement(By.id('colstate1439152630')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Aligned Content 8') { console.log('Passed: Standard Code 1, Aligned Content 8 button text matched as expected'); } else { errors.push(`Expected: "Aligned Content 8"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Aligned Content 8 button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Aligned Content 8 button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standard Code 1, Aligned Content 8 button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, Aligned Content 8 button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button background color: "rgba(40, 39, 90, 1)"; Actual: "${elementButtonColor}"`); } //expand icon if (elementExpandIcon) { console.log('Passed: Standard Code 1, Aligned Content 8 expand button icon found') } else { errors.push('FAILED: Standard Code 1, Aligned Content 8 expand button icon not found') } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Related Standards button { description: 'Validate Standard Code 1, Related Standards 26 button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Related Standards 26 button'; const element = await driver.findElement(By.css('#rel-1439152630-tab')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Related Standards 26') { console.log('Passed: Standard Code 1, Related Standards 26 button text matched as expected'); } else { errors.push(`Expected: "Related Standards 26"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Related Standards 26 button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Related Standards 26 button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Standard Code 1, Related Standards 26 button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Standard Code 1, Related Standards 26 button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Add Direct Alignment button { description: 'Validate Standard Code 1, Add Direct Alignment button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Add Direct Alignment button'; const elementIcon = await driver.findElement(By.css('#add-1439152630-tab > .fa')); const element = await driver.findElement(By.css('#add-1439152630-tab')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //icon if (elementIcon) { console.log('Passed: Standard Code 1, Add Direct Alignment button icon found') } else { errors.push('FAILED: Standard Code 1, Add Direct Alignment button icon not found') } //text if (elementText === 'Add Direct Alignment') { console.log('Passed: Standard Code 1, Add Direct Alignment button text matched as expected'); } else { errors.push(`Expected: "Add Direct Alignment"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Add Direct Alignment button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Add Direct Alignment button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Standard Code 1, Add Direct Alignment button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Standard Code 1, Add Direct Alignment button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION { description: 'Click to expand Aligned Content for Standard Code 1', action: async () => { //Standard Code 1 Aligned Content await driver.findElement(By.css('#rel-1439152630-tab')).click(); console.log('----->| NEXT ACTION: Clicked Standard Code 1 Related Standards button'); //Wait until the element exists in the DOM const openAlignmentNewWindow = await driver.wait( until.elementLocated(By.css('#selectToggle1439152630')), 30000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(openAlignmentNewWindow), 30000 ); } }, //Search breadcrumb { description: 'Validate Search breadcrumb link text, font, size, and color', action: async () => { const multipleChecks = 'Search breadcrumb link'; const element = await driver.findElement(By.linkText('Search')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Search') { console.log("Passed: Search breadcrumb text link matched as expected"); } else { errors.push(`Expected: "Search" breadcrumb text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Search breadcrumb text link font-family matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Search breadcrumb text link font-size matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(73, 80, 87, 1)') { console.log('Passed: Search breadcrumb text link color matched as expected'); } else { errors.push(`Expected: Search breadcrumb text link color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standards breadcrumb { description: 'Validate Standards breadcrumb link text, font, size, and color', action: async () => { const multipleChecks = 'Standards breadcrum'; const element = await driver.findElement(By.css('.breadcrumb-item:nth-child(2)')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Standards') { console.log("Passed: Standards breadcrumb text link matched as expected"); } else { errors.push(`Expected: "Standards" breadcrumb text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standards breadcrumb text link font-family matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standards breadcrumb text link font-size matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standards breadcrumb text link color matched as expected'); } else { errors.push(`Expected: Standards breadcrumb text link color "rgba(48, 200, 172, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Save icon { description: 'Validate Save icon', action: async () => { const multipleChecks = 'Save icon'; const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div.float-right.ml-1 > a:nth-child(1)')); const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Save icon present'); } else { errors.push('Save icon was not found'); } //text if (elementText === 'Save This Search') { console.log('Passed: Save icon tool-tip matched as expected'); } else { errors.push(`Expected: Save icon tool-tip: "Save This Search"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Print icon { description: 'Validate Print icon', action: async () => { const multipleChecks = 'Print icon'; const element = await driver.findElement(By.css('.icon-link > img')); //Get text, font, size, and color const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Print icon present'); } else { errors.push('Print icon was not found'); } //text if (elementText === 'Print This Page') { console.log('Passed: Print icon tool-tip matched as expected'); } else { errors.push(`Expected: Print icon tool-tip: "Print This Page"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Set title { description: 'Validate Standard Set title text, font, size, and color', action: async () => { const multipleChecks = 'Standard Set title'; const element = await driver.findElement(By.css('h1')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Alabama Courses of Study') { console.log("Passed: Alabama Courses of Study Standard Set title text link matched as expected"); } else { errors.push(`Expected: "Alabama Courses of Study" Standard Set title text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Alabama Courses of Study Standard Set title text link font-family matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '18.2px') { console.log('Passed: Alabama Courses of Study Standard Set title text link font-size matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link font-size "18.2px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Alabama Courses of Study Standard Set title text link color matched as expected'); } else { errors.push(`Expected: Alabama Courses of Study Standard Set title text link color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //SubjectGrade title { description: 'Validate SubjectGrade title text, font, size, and color', action: async () => { const multipleChecks = 'SubjectGrade title'; const element = await driver.findElement(By.css('strong')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'Mathematics - Grade 9') { console.log("Passed: Mathematics - Grade 9 SubjectGrade title text link matched as expected"); } else { errors.push(`Expected: "Mathematics - Grade 9" SubjectGrade title text link; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link font-family matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link font-size matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Mathematics - Grade 9 SubjectGrade title text link color matched as expected'); } else { errors.push(`Expected: Mathematics - Grade 9 SubjectGrade title text link color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Info icon { description: 'Validate Info icon', action: async () => { const multipleChecks = 'Info icon'; const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div:nth-child(5) > a')); //Get text, font, size, and color const elementText = await element.getAttribute('title'); //Track all errors const errors = []; //icon if (element) { console.log('Passed: Info icon present'); } else { errors.push('Info icon was not found'); } //text if (elementText === 'Alignment Modification Help') { console.log('Passed: Info icon tool-tip matched as expected'); } else { errors.push(`Expected: Info icon tool-tip: "Alignment Modification Help"; Actual: "${elementText}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Show All Correlations button { description: 'Validate Show All Correlations button text, size, and color', action: async () => { const multipleChecks = 'Show All Correlations button'; const element = await driver.findElement(By.css('.btn-primary:nth-child(2)')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Show All Correlations') { console.log('Passed: Show All Correlations button text matched as expected'); } else { errors.push(`Expected: "Show All Correlations"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Show All Correlations button text font-family matched as expected'); } else { errors.push(`Expected: Show All Correlations button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '14px') { console.log('Passed: Show All Correlations button text font-size matched as expected'); } else { errors.push(`Expected: Show All Correlations button text font-size "14px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Show All Correlations button text color matched as expected'); } else { errors.push(`Expected: Show All Correlations button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Show All Correlations button background color matched as expected'); } else { errors.push(`Expected: Show All Correlations button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Level 1 Standard title { description: 'Validate Level 1 Standard title text, font, size, color, and background color', action: async () => { const multipleChecks = 'Level 1 Standard title'; const element = await driver.findElement(By.css('.card:nth-child(8) > .card-header')); //Get text, font, size, color, and background color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); const elementBgColor = await element.getCssValue('background-color') //Track all errors const errors = []; //text if (elementText === 'Mathematical Practices (Grade 9)') { console.log("Passed: Mathematical Practices (Grade 9) Level 1 Standard title text matched as expected"); } else { errors.push(`Expected: "Mathematical Practices (Grade 9)" Level 1 Standard title text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text font-family matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '15px') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text font-size matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text font-size "15px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title text color matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title text color "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`); } //background-color if (elementBgColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Mathematical Practices (Grade 9) Level 1 Standard title background color matched as expected'); } else { errors.push(`Expected: Mathematical Practices (Grade 9) Level 1 Standard title background color "rgba(48, 200, 172, 1)"; Actual: "${elementBgColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 title { description: 'Validate Standard Code 1, title text, font, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, title'; const element = await driver.findElement(By.xpath('//div[2]/div/b')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText === 'MP1') { console.log("Passed: Standard Code 1, title text matched as expected"); } else { errors.push(`Expected: "MP1" Standard Code 1, title text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, title text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standard Code 1, title text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, title text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Description { description: 'Validate Standard Code 1, description text, font, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, description'; const element = await driver.findElement(By.id('stdbox')); //Get text, font, size, and color const elementText = await element.getText(); const elementFont = await element.getCssValue('font-family'); const elementSize = await element.getCssValue('font-size'); const elementColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementText.includes ('Make sense of problems and persevere in solving them. (Grade 9)')) { console.log("Passed: Standard Code 1, description text matched as expected"); } else { errors.push(`Expected: "Make sense of problems and persevere in solving them. (Grade 9)" Standard Code 1, description text; Actual: "${elementText}"`); } //font if (elementFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, description text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text font-family "Poppins, sans-serif"; Actual: ${elementFont}`); } //size if (elementSize === '13px') { console.log('Passed: Standard Code 1, description text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text font-size "13px"; Actual: "${elementSize}"`); } //color if (elementColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, description text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, description text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Tools button { description: 'Validate Standard Code 1, Tools button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Tools button'; const elementIcon = await driver.findElement(By.xpath(`//div[@id='stdbox']/div/div/button/i`)); const element = await driver.findElement(By.css('#stdbox > div.pull-right > div > button')); const elementExpandIcon = await driver.findElement(By.xpath(`(//button[@type='button'])[4]`)); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //icon if (elementIcon) { console.log('Passed: Standard Code 1, tools button icon found') } else { errors.push('FAILED: Standard Code 1 tools button icon not found') } //text if (elementText === 'Tools') { console.log('Passed: Standard Code 1, Tools button text matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Tools"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Tools button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '16px') { console.log('Passed: Standard Code 1, Tools button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text font-size "16px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standard Code 1, Tools button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Standard Code 1, Tools button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Tools button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //expand icon if (elementExpandIcon) { console.log('Passed: Standard Code 1, Tools expand button icon found') } else { errors.push('FAILED: Standard Code 1, Tools expand button icon not found') } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Aligned Content button { description: 'Validate Standard Code 1, Aligned Content 8 button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Aligned Content 8 button'; const element = await driver.findElement(By.id('corr-1439152630-tab')); const elementExpandIcon = await driver.findElement(By.id('colstate1439152630')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Aligned Content 8') { console.log('Passed: Standard Code 1, Aligned Content 8 button text matched as expected'); } else { errors.push(`Expected: "Aligned Content 8"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Aligned Content 8 button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Aligned Content 8 button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Standard Code 1, Aligned Content 8 button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Standard Code 1, Aligned Content 8 button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Aligned Content 8 button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //expand icon if (elementExpandIcon) { console.log('Passed: Standard Code 1, Aligned Content 8 expand button icon found') } else { errors.push('FAILED: Standard Code 1, Aligned Content 8 expand button icon not found') } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Related Standards button { description: 'Validate Standard Code 1, Related Standards 26 button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Related Standards 26 button'; const element = await driver.findElement(By.css('#rel-1439152630-tab')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Related Standards 26') { console.log('Passed: Standard Code 1, Related Standards 26 button text matched as expected'); } else { errors.push(`Expected: "Related Standards 26"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Related Standards 26 button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Related Standards 26 button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Standard Code 1, Related Standards 26 button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, Related Standards 26 button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Related Standards 26 button background color: "rgba(40, 39, 90, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Add Direct Alignment button { description: 'Validate Standard Code 1, Add Direct Alignment button text, size, and color', action: async () => { const multipleChecks = 'Standard Code 1, Add Direct Alignment button'; const elementIcon = await driver.findElement(By.css('#add-1439152630-tab > .fa')); const element = await driver.findElement(By.css('#add-1439152630-tab')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //icon if (elementIcon) { console.log('Passed: Standard Code 1, Add Direct Alignment button icon found') } else { errors.push('FAILED: Standard Code 1, Add Direct Alignment button icon not found') } //text if (elementText === 'Add Direct Alignment') { console.log('Passed: Standard Code 1, Add Direct Alignment button text matched as expected'); } else { errors.push(`Expected: "Add Direct Alignment"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Add Direct Alignment button text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '15px') { console.log('Passed: Standard Code 1, Add Direct Alignment button text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text font-size "15px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(182, 186, 181, 1)') { console.log('Passed: Standard Code 1, Add Direct Alignment button text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Standard Code 1, Add Direct Alignment button background color matched as expected'); } else { errors.push(`Expected: Standard Code 1, Add Direct Alignment button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Standard Code 1 Related Standards checkbox and label { description: 'Validate Standard Code 1, Related Standards checkbox and label', action: async () => { const multipleChecks = 'Standard Code 1, Related Standards checkbox and label'; const elementCheckbox = await driver.findElement(By.css('#selectToggle1439152630')).getAttribute('checked'); const elementLabel = await driver.findElement(By.css('#rel-std-1439152630 > .ml-2')); //Get text, font, size, and color const elementText = await elementLabel.getText(); const elementTextFont = await elementLabel.getCssValue('font-family'); const elementTextSize = await elementLabel.getCssValue('font-size'); const elementTextColor = await elementLabel.getCssValue('color'); const elementButtonColor = await elementLabel.getCssValue('background-color'); //Track all errors const errors = []; //Validate checkbox is checked or unchecked if (elementCheckbox) { console.log('Passed: Standard Code 1, Select All/None checkbox is selected as expected'); } else { errors.push(`Expected: Standard Code 1, Select All/None checkbox to be selected; Actual: checked="${elementCheckbox}"`); } //text if (elementText === 'Select All/None') { console.log('Passed: Standard Code 1, Select All/None label text matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Select All/None"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Standard Code 1, Select All/None label text font-family matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Select All/None" label text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '13px') { console.log('Passed: Standard Code 1, Select All/None label text font-size matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Select All/None" label text font-size "13px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Standard Code 1, Select All/None label text color matched as expected'); } else { errors.push(`Expected: Standard Code 1, "Select All/None" label text color: "rgba(40, 39, 90, 1)"; Actual: "${elementTextColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Expand All button { description: 'Validate Expand All button text, size, and color', action: async () => { const multipleChecks = 'Expand All button'; const element = await driver.findElement(By.css('#rel-std-1439152630 > .btn:nth-child(3)')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Expand All') { console.log('Passed: Expand All button text matched as expected'); } else { errors.push(`Expected: "Expand All"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Expand All button text font-family matched as expected'); } else { errors.push(`Expected: Expand All button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '14px') { console.log('Passed: Expand All button text font-size matched as expected'); } else { errors.push(`Expected: Expand All button text font-size "14px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Expand All button text color matched as expected'); } else { errors.push(`Expected: Expand All button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Expand All button background color matched as expected'); } else { errors.push(`Expected: Expand All button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Collapse All button { description: 'Validate Collapse All button text, size, and color', action: async () => { const multipleChecks = 'Collapse All button'; const element = await driver.findElement(By.css('#rel-std-1439152630 > .btn:nth-child(4)')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Collapse All') { console.log('Passed: Collapse All button text matched as expected'); } else { errors.push(`Expected: "Collapse All"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Collapse All button text font-family matched as expected'); } else { errors.push(`Expected: Collapse All button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '14px') { console.log('Passed: Collapse All button text font-size matched as expected'); } else { errors.push(`Expected: Collapse All button text font-size "14px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Collapse All button text color matched as expected'); } else { errors.push(`Expected: Collapse All button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(48, 200, 172, 1)') { console.log('Passed: Collapse All button background color matched as expected'); } else { errors.push(`Expected: Collapse All button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Related Standards 1 accordion button { description: 'Validate Related Standards 1 accordion button text, size, and color', action: async () => { const multipleChecks = 'Related Standards 1 accordion button'; const element = await driver.findElement(By.css('#headingCommon-Core-State-Standards1439152630 > .btn')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Common Core State Standards (13 of 13 selected)') { console.log('Passed: Related Standards 1 accordion button text matched as expected'); } else { errors.push(`Expected: "Common Core State Standards (13 of 13 selected)"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Related Standards 1 accordion button text font-family matched as expected'); } else { errors.push(`Expected: Related Standards 1 accordion button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '16px') { console.log('Passed: Related Standards 1 accordion button text font-size matched as expected'); } else { errors.push(`Expected: Related Standards 1 accordion button text font-size "16px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Related Standards 1 accordion button text color matched as expected'); } else { errors.push(`Expected: Related Standards 1 accordion button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Related Standards 1 accordion button background color matched as expected'); } else { errors.push(`Expected: Related Standards 1 accordion button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Related Standards 2 accordion button { description: 'Validate Related Standards 2 accordion button text, size, and color', action: async () => { const multipleChecks = 'Related Standards 2 accordion button'; const element = await driver.findElement(By.css('#headingWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 > .btn')); //Get text, font, size, and color const elementText = await element.getText(); const elementTextFont = await element.getCssValue('font-family'); const elementTextSize = await element.getCssValue('font-size'); const elementTextColor = await element.getCssValue('color'); const elementButtonColor = await element.getCssValue('background-color'); //Track all errors const errors = []; //text if (elementText === 'Washington State K-12 Learning Standards and Guidelines (13 of 13 selected)') { console.log('Passed: Related Standards 2 accordion button text matched as expected'); } else { errors.push(`Expected: "Washington State K-12 Learning Standards and Guidelines (13 of 13 selected)"; Actual: "${elementText}"`); } //font if (elementTextFont === 'Poppins, sans-serif') { console.log('Passed: Related Standards 2 accordion button text font-family matched as expected'); } else { errors.push(`Expected: Related Standards 2 accordion button text font-family "Poppins, sans-serif"; Actual: ${elementTextFont}`); } //size if (elementTextSize === '16px') { console.log('Passed: Related Standards 2 accordion button text font-size matched as expected'); } else { errors.push(`Expected: Related Standards 2 accordion button text font-size "16px"; Actual: "${elementTextSize}"`); } //color if (elementTextColor === 'rgba(255, 255, 255, 1)') { console.log('Passed: Related Standards 2 accordion button text color matched as expected'); } else { errors.push(`Expected: Related Standards 2 accordion button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); } //button color if (elementButtonColor === 'rgba(0, 0, 0, 0)') { console.log('Passed: Related Standards 2 accordion button background color matched as expected'); } else { errors.push(`Expected: Related Standards 2 accordion button background color: "rgba(0, 0, 0, 0)"; Actual: "${elementButtonColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //NEXT ACTION { description: 'Click to expand Related Standards 2 Washington State K-12 Learning Standards and Guidelines accordion', action: async () => { //Standard Code 1 Aligned Content await driver.findElement(By.css('#headingWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 > .btn')).click(); console.log('----->| NEXT ACTION: Clicked Washington State K-12 Learning Standards and Guidelines accordion to expand'); //Wait until the element exists in the DOM const gradeKTitle = await driver.wait( until.elementLocated(By.css('#collapseWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 .list-group-item:nth-child(1) > b')), 30000 ); //Wait until it becomes visible await driver.wait( until.elementIsVisible(gradeKTitle), 30000 ); } }, //Related Standard Code 2, Grade k { description: 'Validate Related Standard Code 2, Grade K', action: async () => { const multipleChecks = 'Related Standard Code 2, Grade K'; const element = await driver.findElement(By.css('#collapseWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 .list-group-item:nth-child(1) > b')); const elementCheckbox = await driver.findElement(By.css('#chk1439152630677984548')).getAttribute('checked'); const elementLabel = await driver.findElement(By.css('#collapseWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 > #rellist1439152630 > .list-group-item:nth-child(2) .form-check-label')); //Get text, font, size, and color const elementTitleText = await element.getText(); const elementTitleFont = await element.getCssValue('font-family'); const elementTitleSize = await element.getCssValue('font-size'); const elementTitleColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementTitleText === 'Grade K') { console.log("Passed: Related Standard Code 2, Grade K title text matched as expected"); } else { errors.push(`Expected: "Grade K" Related Standard Code 2, Grade K title text; Actual: "${elementTitleText}"`); } //font if (elementTitleFont === 'Poppins, sans-serif') { console.log('Passed: Related Standard Code 2, Grade K title text font-family matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade K title text font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); } //size if (elementTitleSize === '14.3px') { console.log('Passed: Related Standard Code 2, Grade K title text font-size matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade K title text font-size "14.3px"; Actual: "${elementTitleSize}"`); } //color if (elementTitleColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Related Standard Code 2, Grade K title text color matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade K title text color "rgba(40, 39, 90, 1)"; Actual: "${elementTitleColor}"`); } //Get text, font, size, and color const elementLabelText = await elementLabel.getText(); const elementLabelTextFont = await elementLabel.getCssValue('font-family'); const elementLabelTextSize = await elementLabel.getCssValue('font-size'); const elementLabelTextColor = await elementLabel.getCssValue('color'); const elementLabelButtonColor = await elementLabel.getCssValue('background-color'); //Validate checkbox is checked or unchecked if (elementCheckbox) { console.log('Passed: Related Standard Grade K, checkbox is selected as expected'); } else { errors.push(`Expected: Related Standard Grade K, checkbox to be selected; Actual: checked="${elementCheckbox}"`); } //text if (elementLabelText === 'MP.1. Make sense of problems and persevere in solving them.') { console.log('Passed: Related Standard Grade K, description label text matched as expected'); } else { errors.push(`Expected: Related Standard Grade K, "MP.1. Make sense of problems and persevere in solving them."; Actual: "${elementLabelText}"`); } //font if (elementLabelTextFont === 'Poppins, sans-serif') { console.log('Passed: Related Standard Grade K, description label text font-family matched as expected'); } else { errors.push(`Expected: Related Standard Grade K, description label text font-family "Poppins, sans-serif"; Actual: ${elementLabelTextFont}`); } //size if (elementLabelTextSize === '14.3px') { console.log('Passed: Related Standard Grade K, description label text font-size matched as expected'); } else { errors.push(`Expected: Related Standard Grade K, description label text font-size "14.3px"; Actual: "${elementLabelTextSize}"`); } //color if (elementLabelTextColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Related Standard Grade K, description label text color matched as expected'); } else { errors.push(`Expected: Related Standard Grade K, description label text color: "rgba(40, 39, 90, 1)"; Actual: "${elementLabelTextColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, //Related Standard Code 2, Grade 1 { description: 'Validate Related Standard Code 2, Grade 1', action: async () => { const multipleChecks = 'Related Standard Code 2, Grade 1'; const element = await driver.findElement(By.css('#collapseWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 .list-group-item:nth-child(3) > b')); const elementCheckbox = await driver.findElement(By.css('#chk1439152630677984596')).getAttribute('checked'); const elementLabel = await driver.findElement(By.css('#collapseWashington-State-K-12-Learning-Standards-and-Guidelines1439152630 > #rellist1439152630 > .list-group-item:nth-child(4) .form-check-label')); //Get text, font, size, and color const elementTitleText = await element.getText(); const elementTitleFont = await element.getCssValue('font-family'); const elementTitleSize = await element.getCssValue('font-size'); const elementTitleColor = await element.getCssValue('color'); //Track all errors const errors = []; //text if (elementTitleText === 'Grade 1') { console.log("Passed: Related Standard Code 2, Grade 1 title text matched as expected"); } else { errors.push(`Expected: "Grade 1" Related Standard Code 2, Grade 1 title text; Actual: "${elementTitleText}"`); } //font if (elementTitleFont === 'Poppins, sans-serif') { console.log('Passed: Related Standard Code 2, Grade 1 title text font-family matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade 1 title text font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); } //size if (elementTitleSize === '14.3px') { console.log('Passed: Related Standard Code 2, Grade 1 title text font-size matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade 1 title text font-size "14.3px"; Actual: "${elementTitleSize}"`); } //color if (elementTitleColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Related Standard Code 2, Grade 1 title text color matched as expected'); } else { errors.push(`Expected: Related Standard Code 2, Grade 1 title text color "rgba(40, 39, 90, 1)"; Actual: "${elementTitleColor}"`); } //Get text, font, size, and color const elementLabelText = await elementLabel.getText(); const elementLabelTextFont = await elementLabel.getCssValue('font-family'); const elementLabelTextSize = await elementLabel.getCssValue('font-size'); const elementLabelTextColor = await elementLabel.getCssValue('color'); const elementLabelButtonColor = await elementLabel.getCssValue('background-color'); //Validate checkbox is checked or unchecked if (elementCheckbox) { console.log('Passed: Related Standard Grade 1, checkbox is selected as expected'); } else { errors.push(`Expected: Related Standard Grade 1, checkbox to be selected; Actual: checked="${elementCheckbox}"`); } //text if (elementLabelText === 'MP.1. Make sense of problems and persevere in solving them.') { console.log('Passed: Related Standard Grade 1, description label text matched as expected'); } else { errors.push(`Expected: Related Standard Grade 1, "MP.1. Make sense of problems and persevere in solving them."; Actual: "${elementLabelText}"`); } //font if (elementLabelTextFont === 'Poppins, sans-serif') { console.log('Passed: Related Standard Grade 1, description label text font-family matched as expected'); } else { errors.push(`Expected: Related Standard Grade 1, description label text font-family "Poppins, sans-serif"; Actual: ${elementLabelTextFont}`); } //size if (elementLabelTextSize === '14.3px') { console.log('Passed: Related Standard Grade 1, description label text font-size matched as expected'); } else { errors.push(`Expected: Related Standard Grade 1, description label text font-size "14.3px"; Actual: "${elementLabelTextSize}"`); } //color if (elementLabelTextColor === 'rgba(40, 39, 90, 1)') { console.log('Passed: Related Standard Grade 1, description label text color matched as expected'); } else { errors.push(`Expected: Related Standard Grade 1, description label text color: "rgba(40, 39, 90, 1)"; Actual: "${elementLabelTextColor}"`); } //Throw summary if any validation failed if (errors.length > 0) { //Add summary line only when multiple checks failed if (errors.length > 1) { errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); } //Throw collected messages — catch() will prefix with "FAILED:" throw new Error(errors.join('\n')); } } }, ]; //STAND ALONE const myStandardsSearchRelatedStandards = (req, res) => { res.send('