Added split row validation fix
This commit is contained in:
Binary file not shown.
@@ -706,7 +706,7 @@ const steps = [
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (alertText !== 'You must select a subject') {
|
if (alertText !== 'You must select a subject') {
|
||||||
throw new Error(`Expected: "You must select a subject (ecs-2829)"; Actual: "${alertText}"`);
|
throw new Error(`Expected: "You must select a subject (ECS-2829)"; Actual: "${alertText}"`);
|
||||||
}
|
}
|
||||||
console.log('Passed: "You must select a subject" Alert DIV text matched as expected');
|
console.log('Passed: "You must select a subject" Alert DIV text matched as expected');
|
||||||
console.log('Passed: "OK" button text matched as expected');
|
console.log('Passed: "OK" button text matched as expected');
|
||||||
@@ -1568,11 +1568,34 @@ const steps = [
|
|||||||
{
|
{
|
||||||
description: 'Validate child standard 1 text',
|
description: 'Validate child standard 1 text',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const elementText = await driver.findElement(By.id('stdbox')).getText();
|
try {
|
||||||
if (elementText !== 'Make sense of problems and persevere in solving them.') {
|
const element = await driver.findElement(By.xpath(`//div[@id='stdbox']`));
|
||||||
throw new Error(`Expected: "Make sense of problems and persevere in solving them." text; Actual: "${elementText}"`);
|
|
||||||
|
//Get different versions of the text for debugging
|
||||||
|
const fullText = await element.getText();
|
||||||
|
|
||||||
|
//Check for the expected text in different ways
|
||||||
|
const expectedText = 'Make sense of problems and persevere in solving them.';
|
||||||
|
const trimmedFullText = fullText.trim();
|
||||||
|
const firstLine = trimmedFullText.split('\n')[0].trim();
|
||||||
|
|
||||||
|
//Try multiple matching strategies
|
||||||
|
if (firstLine.includes(expectedText)) {
|
||||||
|
console.log(`Passed: "${expectedText}" text in first line`);
|
||||||
|
} else if (trimmedFullText.includes(expectedText)) {
|
||||||
|
console.log(`Passed: "${expectedText}" text within full text`);
|
||||||
|
} else {
|
||||||
|
throw new Error(
|
||||||
|
`Text validation failed.\nExpected: "${expectedText}"\n` +
|
||||||
|
`Full text: "${fullText}"\n` +
|
||||||
|
`First line: "${firstLine}"\n`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Detailed error during validation:', error);
|
||||||
|
throw error; //Re-throw after logging
|
||||||
}
|
}
|
||||||
console.log('Passed: Make sense of problems and persevere in solving them. text matched as expected');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1899,7 +1922,7 @@ const steps = [
|
|||||||
{ description: 'Click alignment 1 Deatils button', action: async () => await driver.findElement(By.css('#\\38 73598469')).click() },
|
{ description: 'Click alignment 1 Deatils button', action: async () => await driver.findElement(By.css('#\\38 73598469')).click() },
|
||||||
{ description: 'Browser sleep', action: async () => await driver.sleep(2000) },
|
{ description: 'Browser sleep', action: async () => await driver.sleep(2000) },
|
||||||
|
|
||||||
//3-variable linear system word problems description
|
//3-variable linear system word problems description 1
|
||||||
{
|
{
|
||||||
description: 'Validate 3-variable linear system word problems description',
|
description: 'Validate 3-variable linear system word problems description',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1911,7 +1934,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Alignment Pending warning icon
|
//Alignment Pending warning icon 1
|
||||||
{
|
{
|
||||||
description: 'Verify Alignment Pending warning icon is present',
|
description: 'Verify Alignment Pending warning icon is present',
|
||||||
action: async () =>
|
action: async () =>
|
||||||
@@ -1923,7 +1946,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Alignment Pending label
|
//Alignment Pending label 1
|
||||||
{
|
{
|
||||||
description: 'Validate Alignment Pending label',
|
description: 'Validate Alignment Pending label',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1935,7 +1958,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Alignment Pending checkbox icon
|
//Alignment Pending checkbox icon 1
|
||||||
{
|
{
|
||||||
description: 'Verify Alignment Pending checkbox icon is present',
|
description: 'Verify Alignment Pending checkbox icon is present',
|
||||||
action: async () =>
|
action: async () =>
|
||||||
@@ -1947,7 +1970,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//A Lunch-In Affair link text
|
//A Lunch-In Affair link text 2
|
||||||
{
|
{
|
||||||
description: 'Validate A Lunch-In Affair link text',
|
description: 'Validate A Lunch-In Affair link text',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1959,7 +1982,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//A Lunch-In Affair link text color -gray
|
//A Lunch-In Affair link text 2 color -gray
|
||||||
{
|
{
|
||||||
description: 'Validate A Lunch-In Affair link text color',
|
description: 'Validate A Lunch-In Affair link text color',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1971,7 +1994,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Alignment 2 Details button text
|
//Alignment 2 Details button text 2
|
||||||
{
|
{
|
||||||
description: 'Validate Alignment 2 Details button text',
|
description: 'Validate Alignment 2 Details button text',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1983,7 +2006,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Alignment 2 Details button color -gray
|
//Alignment 2 Details button 2 color -gray
|
||||||
{
|
{
|
||||||
description: 'Validate Alignment 2 Details button color',
|
description: 'Validate Alignment 2 Details button color',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -1995,7 +2018,7 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Not Aligned warning icon
|
//Not Aligned warning icon 2
|
||||||
{
|
{
|
||||||
description: 'Verify Not Aligned warning icon is present',
|
description: 'Verify Not Aligned warning icon is present',
|
||||||
action: async () =>
|
action: async () =>
|
||||||
@@ -2007,19 +2030,19 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Not Aligned label
|
//ECS Aligned label 2
|
||||||
{
|
{
|
||||||
description: 'Validate Not Aligned label',
|
description: 'Validate Not Aligned label',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const elementText = await driver.findElement(By.css('#lsn-id-873598488 span')).getText();
|
const elementText = await driver.findElement(By.css('#lsn-id-873598488 span')).getText();
|
||||||
if (elementText !== 'Not Aligned') {
|
if (elementText !== 'ECS Aligned') {
|
||||||
throw new Error(`Expected: "Not Aligned" label; Actual: "${elementText}"`);
|
throw new Error(`Expected: "ECS Aligned" label; Actual: "${elementText}"`);
|
||||||
}
|
}
|
||||||
console.log('Passed: Not Aligned label matched as expected');
|
console.log('Passed: ECS Aligned label matched as expected');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Not Aligned checkbox icon
|
//ECS Aligned checkbox icon 2
|
||||||
{
|
{
|
||||||
description: 'Verify Not Aligned checkbox icon is present',
|
description: 'Verify Not Aligned checkbox icon is present',
|
||||||
action: async () =>
|
action: async () =>
|
||||||
@@ -3056,11 +3079,34 @@ const steps = [
|
|||||||
{
|
{
|
||||||
description: 'Validate Concept List label',
|
description: 'Validate Concept List label',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const elementText = await driver.findElement(By.css('#tabsr-3')).getText();
|
try {
|
||||||
if (elementText !== '* Concept List') {
|
const element = await driver.findElement(By.css('#tabsr-3'));
|
||||||
throw new Error(`Expected: "* Concept List" label; Actual: "${elementText}"`);
|
|
||||||
|
//Get different versions of the text for debugging
|
||||||
|
const fullText = await element.getText();
|
||||||
|
|
||||||
|
//Check for the expected text in different ways
|
||||||
|
const expectedText = '* Concept List';
|
||||||
|
const trimmedFullText = fullText.trim();
|
||||||
|
const firstLine = trimmedFullText.split('\n')[0].trim();
|
||||||
|
|
||||||
|
//Try multiple matching strategies
|
||||||
|
if (firstLine.includes(expectedText)) {
|
||||||
|
console.log(`Passed: "${expectedText}" text in first line`);
|
||||||
|
} else if (trimmedFullText.includes(expectedText)) {
|
||||||
|
console.log(`Passed: "${expectedText}" text within full text`);
|
||||||
|
} else {
|
||||||
|
throw new Error(
|
||||||
|
`Text validation failed.\nExpected: "${expectedText}"\n` +
|
||||||
|
`Full text: "${fullText}"\n` +
|
||||||
|
`First line: "${firstLine}"\n`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Detailed error during validation:', error);
|
||||||
|
throw error; //Re-throw after logging
|
||||||
}
|
}
|
||||||
console.log('Passed: * Concept List label matched as expected');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -5448,7 +5494,7 @@ try {
|
|||||||
console.log('PASSED: Align Standards Page(ExACT_alignStandardsPage); All test steps completed successfully');
|
console.log('PASSED: Align Standards Page(ExACT_alignStandardsPage); All test steps completed successfully');
|
||||||
testStatus = 'Passed';
|
testStatus = 'Passed';
|
||||||
} else {
|
} else {
|
||||||
console.log('FAILED: Align Standards Page(ExACT_alignStandardsPage); One or more test steps failed');
|
console.log('FAILED: (ECS-2829) Align Standards Page(ExACT_alignStandardsPage); One or more test steps failed');
|
||||||
testStatus = 'Failed';
|
testStatus = 'Failed';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user