Updated expected results as some seemed to have changed

This commit is contained in:
2025-08-11 15:33:49 -07:00
parent dfa257dc70
commit fd7f59da06

View File

@@ -334,17 +334,17 @@ const steps = [
} }
}, },
/*Biology - QA label //Biology - QA label
{ {
description: 'Validate Biology - QA label', description: 'Validate Biology - QA label',
action: async () => { action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > label')).getAttribute('label'); const elementText = await driver.findElement(By.css('.form-group:nth-child(1) > label')).getText();
if (elementText !== 'Biology - QA') { if (elementText !== 'Biology - QA') {
throw new Error(`Expected: yup "Biology - QA"; Actual: "${elementText}"`); throw new Error(`Expected: "Biology - QA"; Actual: "${elementText}"`);
} }
console.log('Passed: Biology - QA label matched as expected'); console.log('Passed: Biology - QA label matched as expected');
} }
},*/ },
//Biology - QA count //Biology - QA count
{ {
@@ -585,31 +585,7 @@ const steps = [
} }
}, },
//Mathematics checkbox //Language Arts checkbox (changed place with Mathemtics?)
{
description: 'Verify Mathematics checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metasubjectsMathematics')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('Expected: Mathematics checkbox icon not found');
}
console.log('Passed: Mathematics checkbox icon present');
}
},
//Mathematics label
{
description: 'Validate Mathematics label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(7)')).getText();
if (elementText !== 'Mathematics') {
throw new Error(`Expected: "Mathematics"; Actual: "${elementText}"`);
}
console.log('Passed: Mathematics label matched as expected');
}
},
//Language Arts checkbox (added?)
{ {
description: 'Verify Language Arts checkbox icon is present', description: 'Verify Language Arts checkbox icon is present',
action: async () => action: async () =>
@@ -621,11 +597,11 @@ const steps = [
} }
}, },
//Language Arts label (added?) //Language Arts label (changeed place with Mathematics?)
{ {
description: 'Validate Language Arts label', description: 'Validate Language Arts label',
action: async () => { action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(10)')).getText(); const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(7)')).getText();
if (elementText !== 'Language Arts') { if (elementText !== 'Language Arts') {
throw new Error(`Expected: "Language Arts"; Actual: "${elementText}"`); throw new Error(`Expected: "Language Arts"; Actual: "${elementText}"`);
} }
@@ -633,7 +609,31 @@ const steps = [
} }
}, },
//Social Studies checkbox (added?) //Mathematics checkbox (switched with Language Arts?)
{
description: 'Verify Mathematics checkbox icon is present',
action: async () =>
{ const expectedIcon = await driver.wait(until.elementLocated(By.css('#metasubjectsMathematics')), 5000).catch(() => false);
if (!expectedIcon) {
throw new Error('Expected: Mathematics checkbox icon not found');
}
console.log('Passed: Mathematics checkbox icon present');
}
},
//Mathematics label (switched with Language Arts?)
{
description: 'Validate Mathematics label',
action: async () => {
const elementText = await driver.findElement(By.css('.form-group:nth-child(6) > label:nth-child(10)')).getText();
if (elementText !== 'Mathematics') {
throw new Error(`Expected: "Mathematics"; Actual: "${elementText}"`);
}
console.log('Passed: Mathematics label matched as expected');
}
},
//Social Studies checkbox
{ {
description: 'Verify Social Studies checkbox icon is present', description: 'Verify Social Studies checkbox icon is present',
action: async () => action: async () =>
@@ -645,7 +645,7 @@ const steps = [
} }
}, },
//Social Studies label (added?) //Social Studies label
{ {
description: 'Validate Social Studies label', description: 'Validate Social Studies label',
action: async () => { action: async () => {
@@ -657,7 +657,7 @@ const steps = [
} }
}, },
//Social and Emotional Learning checkbox (pushed down) //Social and Emotional Learning checkbox
{ {
description: 'Verify Social and Emotional Learning checkbox icon is present', description: 'Verify Social and Emotional Learning checkbox icon is present',
action: async () => action: async () =>
@@ -669,7 +669,7 @@ const steps = [
} }
}, },
//Social and Emotional Learning label (pushed down) //Social and Emotional Learning label
{ {
description: 'Validate Social and Emotional Learning label', description: 'Validate Social and Emotional Learning label',
action: async () => { action: async () => {
@@ -1986,18 +1986,8 @@ const steps = [
}, },
//Filtered Content 1 description //Filtered Content 1 description
/*{
description: 'Validate Filtered Content 1 description',
action: async () => {
const elementText = await driver.findElement(By.css('.card:nth-child(8) .lo-descr')).getText();
if (elementText !== `In this Science Update, from Science NetLinks, you'll hear an interview with Kevin Kelly, co-founder and board chairman of the All Species Foundation in San Francisco. Kelly discusses his mission to discover, identify, and document every species on Earth within the next 25 years. Students then read more information about the project, and conclude by answering some related questions. Science Updates are audio interviews with scientists and are accompanied by a set of questions as well as links to related Science NetLinks lessons and other related resources.`) {
throw new Error(`Expected: Filtered Content 1 description tIn this Science Update, from Science NetLinks, you'll hear an interview with Kevin Kelly, co-founder and board chairman of the All Species Foundation in San Francisco. Kelly discusses his mission to discover, identify, and document every species on Earth within the next 25 years. Students then read more information about the project, and conclude by answering some related questions. Science Updates are audio interviews with scientists and are accompanied by a set of questions as well as links to related Science NetLinks lessons and other related resources.ext did not match; Actual: "${elementText}"`);
}
console.log('Passed: Filtered Content 1 description text matched as expected');
}
},*/
{ {
description: 'Validate Content 2 description', description: 'Validate Filtered Content 1 description',
action: async () => { action: async () => {
try { try {
const element = await driver.findElement(By.css('.card:nth-child(8) .lo-descr')); const element = await driver.findElement(By.css('.card:nth-child(8) .lo-descr'));
@@ -2132,9 +2122,9 @@ const steps = [
action: async () => { action: async () => {
const elementStyle = await driver.findElement(By.linkText('Altered Elephant Behavior')).getCssValue('font-size'); const elementStyle = await driver.findElement(By.linkText('Altered Elephant Behavior')).getCssValue('font-size');
if (elementStyle !== '13px') { if (elementStyle !== '13px') {
throw new Error(`Expected: Filtered content 1 item "Altered Elephant Behavior" tile text font-size did not match; Actual: "${elementStyle}"`); throw new Error(`Expected: Filtered content 2 item "Altered Elephant Behavior" tile text font-size did not match; Actual: "${elementStyle}"`);
} }
console.log('Passed: Content 1 item Altered Elephant Behavior title text font-size matched as expected'); console.log('Passed: Content 2 item Altered Elephant Behavior title text font-size matched as expected');
} }
}, },
@@ -2221,15 +2211,15 @@ const steps = [
} }
}, },
//Filtered Content 2 ECS Alignment (reset) label (previously Not Aligned) //Filtered Content 2 Not Aligned label (previously: ECS alignment - reset)
{ {
description: 'Validate Filtered Content 2 ECS Alignment (reset) label', description: 'Validate Filtered Content 2 Not Aligned label',
action: async () => { action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText(); const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText();
if (elementText !== 'ECS Alignment (reset)') { if (elementText !== 'Not Aligned') {
throw new Error(`Expected: Filtered Content 2 "ECS Alignment (reset)" label did not match; Actual: "${elementText}"`); throw new Error(`Expected: Filtered Content 2 "Not Aligned" label did not match; Actual: "${elementText}"`);
} }
console.log('Passed: Filtered Content 2 ECS Alignment (reset) label matched as expected'); console.log('Passed: Filtered Content 2 Not Aligned label matched as expected');
} }
}, },
@@ -2496,15 +2486,15 @@ const steps = [
} }
}, },
//Second content item ECS Alignment (reset) text (previously Not Aligned) //Second content item Not Aligned text (previously: ECS Alignment (reset)
{ {
description: 'Validate Altered Elephant Behavior ECS Alignment (reset) text', description: 'Validate Altered Elephant Behavior Not Aligned text',
action: async () => { action: async () => {
const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText(); const elementText = await driver.findElement(By.css('#alignstatuslink873578655 > .display-alignment')).getText();
if (elementText !== 'ECS Alignment (reset)') { if (elementText !== 'Not Aligned') {
throw new Error(`Expected: Altered Elephant Behavior "ECS Alignment (reset)" text; Actual: "${elementText}"`); throw new Error(`Expected: Altered Elephant Behavior "Not Aligned" text; Actual: "${elementText}"`);
} }
console.log('Passed: Altered Elephant Behavior ECS Alignment (reset) text matched as expected'); console.log('Passed: Altered Elephant Behavior Not Aligned text matched as expected');
} }
}, },