Added Alignment Status filter checks

This commit is contained in:
2025-02-12 13:28:51 -08:00
parent df8642aade
commit f6b9c01684

View File

@@ -262,18 +262,42 @@ const steps = [
}
},
//Filter Results title font size
{
description: 'Validate Filter Results title font size',
action: async () => {
const elementText = await driver.findElement(By.css('.well > b')).getCssValue('font-size');
if (elementText !== '13px') {
throw new Error(`Expected: Filter Results title font size to be "13px"; Actual: "${elementText}"`);
}
console.log('Passed: Filter Results title font size matched as expected');
}
},
//Content Set title
{
description: 'Validate Content Set title',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > b')).getText();
if (elementText !== 'Content Set') {
throw new Error(`Expected: "Content Set"; Actual: "${elementText}"`);
throw new Error(`Expected: "Content Set" title; Actual: "${elementText}"`);
}
console.log('Passed: Content Set title matched as expected');
}
},
//Content Set title font size
{
description: 'Validate Content Set title font size',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > b')).getCssValue('font-size');
if (elementText !== '13px') {
throw new Error(`Expected: Content Set title font size to be "13px"; Actual: "${elementText}"`);
}
console.log('Passed: Content Set title font size matched as expected');
}
},
//Biology - QA checkbox
{
description: 'Verify Biology - QA checkbox icon is present',
@@ -290,9 +314,9 @@ const steps = [
{
description: 'Validate Biology - QA label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > label')).getText();
const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > label')).getAttribute('label');
if (elementText !== 'Biology - QA') {
throw new Error(`Expected: "Biology - QA"; Actual: "${elementText}"`);
throw new Error(`Expected: yup "Biology - QA"; Actual: "${elementText}"`);
}
console.log('Passed: Biology - QA label matched as expected');
}
@@ -316,12 +340,24 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > b')).getText();
if (elementText !== 'Grade') {
throw new Error(`Expected: "Grade"; Actual: "${elementText}"`);
throw new Error(`Expected: "Grade" title; Actual: "${elementText}"`);
}
console.log('Passed: Grade title matched as expected');
}
},
//Grade title font size
{
description: 'Validate Grade title font size',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(3) > b')).getCssValue('font-size');
if (elementText !== '13px') {
throw new Error(`Expected: Grade title font size to be "13px"; Actual: "${elementText}"`);
}
console.log('Passed: Grade title font size matched as expected');
}
},
//9th grade checkbox
{
description: 'Verify 9th grade checkbox icon is present',
@@ -342,7 +378,7 @@ const steps = [
if (elementText !== '9') {
throw new Error(`Expected: "9"; Actual: "${elementText}"`);
}
console.log('Passed: 9 label matched as expected');
console.log('Passed: 9th label matched as expected');
}
},
@@ -366,7 +402,7 @@ const steps = [
if (elementText !== '10') {
throw new Error(`Expected: "10"; Actual: "${elementText}"`);
}
console.log('Passed: 10 label matched as expected');
console.log('Passed: 10th label matched as expected');
}
},
@@ -390,7 +426,7 @@ const steps = [
if (elementText !== '11') {
throw new Error(`Expected: "11"; Actual: "${elementText}"`);
}
console.log('Passed: 11 label matched as expected');
console.log('Passed: 11th label matched as expected');
}
},
@@ -414,7 +450,7 @@ const steps = [
if (elementText !== '12') {
throw new Error(`Expected: "12"; Actual: "${elementText}"`);
}
console.log('Passed: 12 label matched as expected');
console.log('Passed: 12th label matched as expected');
}
},
@@ -438,7 +474,7 @@ const steps = [
if (elementText !== '8') {
throw new Error(`Expected: "8"; Actual: "${elementText}"`);
}
console.log('Passed: 8 label matched as expected');
console.log('Passed: 8th label matched as expected');
}
},
@@ -460,12 +496,24 @@ const steps = [
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > b')).getText();
if (elementText !== 'Subject') {
throw new Error(`Expected: "Subject"; Actual: "${elementText}"`);
throw new Error(`Expected: "Subject" title; Actual: "${elementText}"`);
}
console.log('Passed: Subject title matched as expected');
}
},
//Subject title font size
{
description: 'Validate Subject title font size',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > b')).getCssValue('font-size');
if (elementText !== '13px') {
throw new Error(`Expected: Subject title font size to be "13px"; Actual: "${elementText}"`);
}
console.log('Passed: Subject title font size matched as expected');
}
},
//Science checkbox
{
description: 'Verify Science checkbox icon is present',
@@ -538,6 +586,126 @@ const steps = [
}
},
//Alignment Status title
{
description: 'Validate Alignment Status title',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > b')).getText();
if (elementText !== 'Alignment Status') {
throw new Error(`Expected: "Alignment Status" title; Actual: "${elementText}"`);
}
console.log('Passed: Alignment Status title matched as expected');
}
},
//Alignment Status title font size
{
description: 'Validate Alignment Status title font size',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > b')).getCssValue('font-size');
if (elementText !== '13px') {
throw new Error(`Expected: Alignment Status title font size to be "13px"; Actual: "${elementText}"`);
}
console.log('Passed: Alignment Status title font size matched as expected');
}
},
//Not Aligned checkbox
{
description: 'Verify Not Aligned checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metaAlignmentStatusNot\\ Aligned')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('Not Aligned checkbox icon not found');
}
console.log('Passed: Not Aligned checkbox icon present');
}
},
//Not Aligned label
{
description: 'Validate Not Aligned label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > label:nth-child(4)')).getText();
if (elementText !== 'Not Aligned') {
throw new Error(`Expected: "Not Aligned"; Actual: "${elementText}"`);
}
console.log('Passed: Not Aligned label matched as expected');
}
},
//ECS Alignment checkbox
{
description: 'Verify ECS Alignment checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metaAlignmentStatusECS\\ Alignment')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('ECS Alignment checkbox icon not found');
}
console.log('Passed: ECS Alignment checkbox icon present');
}
},
//ECS Alignment label
{
description: 'Validate ECS Alignment label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > label:nth-child(7)')).getText();
if (elementText !== 'ECS Alignment') {
throw new Error(`Expected: "ECS Alignment"; Actual: "${elementText}"`);
}
console.log('Passed: ECS Alignment label matched as expected');
}
},
//Pending checkbox
{
description: 'Verify Pending checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metaAlignmentStatusPending')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('Pending checkbox icon not found');
}
console.log('Passed: Pending checkbox icon present');
}
},
//Pending label
{
description: 'Validate Pending label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > label:nth-child(10)')).getText();
if (elementText !== 'Pending') {
throw new Error(`Expected: "Pending"; Actual: "${elementText}"`);
}
console.log('Passed: Pending label matched as expected');
}
},
//Aligned checkbox
{
description: 'Verify Aligned checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metaAlignmentStatusAligned')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('Aligned checkbox icon not found');
}
console.log('Passed: Aligned checkbox icon present');
}
},
//Aligned label
{
description: 'Validate Aligned label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(8) > label:nth-child(13)')).getText();
if (elementText !== 'Aligned') {
throw new Error(`Expected: "Aligned"; Actual: "${elementText}"`);
}
console.log('Passed: Aligned label matched as expected');
}
},
//Reset All link
{
description: 'Validate Reset All link',
@@ -1098,7 +1266,7 @@ const steps = [
description: 'Validate Content 2 ECS Alignement label',
action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink873578650 > .display-alignment')).getText();
if (elementText !== 'Alignment Pending') {
if (elementText !== 'Alignment Pending (reset)') {
throw new Error(`Expected: Content 2 Alignement Pending label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Content 2 Alignement Pending label matched as expected');
@@ -1298,7 +1466,7 @@ const steps = [
if (elementText !== 'Grade: 8') {
throw new Error(`Expected: "Grade: 8" text did not match; Actual: "${elementText}"`);
}
console.log('Passed: Grade: 8 text matched as expected');
console.log('Passed: Grade 8 text matched as expected');
}
},
@@ -1621,7 +1789,7 @@ const steps = [
description: 'Validate Filtered Content 1 Alignment Pending label',
action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink873578654 > .display-alignment')).getText();
if (elementText !== 'Alignment Pending') {
if (elementText !== 'Alignment Pending (reset)') {
throw new Error(`Expected: Filtered Content 1 Alignment Pending label did not match; Actual: "${elementText}"`);
}
console.log('Passed: Filtered Content 1 Alignment Pending label matched as expected');
@@ -1956,7 +2124,7 @@ const steps = [
description: 'Validate All Species Inventory alignment pending text',
action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink873578654 > .display-alignment')).getText();
if (elementText !== 'Alignment Pending') {
if (elementText !== 'Alignment Pending (reset)') {
throw new Error(`Expected: All Species Inventory alignment "Alignment Pending" text; Actual: "${elementText}"`);
}
console.log('Passed: All Species Inventory alignment "Alignment Pending" text matched as expected');