Added scroll into view to continue test
This commit is contained in:
@@ -780,15 +780,15 @@ const steps = [
|
||||
}
|
||||
},
|
||||
|
||||
//Subject: Social Studies (77) label
|
||||
//Subject: Social Studies (102) label
|
||||
{
|
||||
description: 'Validate Subject Social Studies (77) label',
|
||||
description: 'Validate Subject Social Studies (102) label',
|
||||
action: async () => {
|
||||
const elementText = await driver.findElement(By.css('.show > li:nth-child(6) .checkbox')).getText();
|
||||
if (elementText !== 'Social Studies (77)') {
|
||||
throw new Error(`Expected: Subject: "Social Studies (77)" checkbox label; Actual: "${elementText}"`);
|
||||
if (elementText !== 'Social Studies (102)') {
|
||||
throw new Error(`Expected: Subject: "Social Studies (102)" checkbox label; Actual: "${elementText}"`);
|
||||
}
|
||||
console.log('Passed: Subject Social Studies (77) checkbox label matched as expected');
|
||||
console.log('Passed: Subject Social Studies (102) checkbox label matched as expected');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -872,15 +872,15 @@ const steps = [
|
||||
}
|
||||
},
|
||||
|
||||
//Alignment Status:Not Aligned (3261) label
|
||||
//Alignment Status:Not Aligned (3286) label
|
||||
{
|
||||
description: 'Validate Alignment Status Not Aligned (3261) label',
|
||||
description: 'Validate Alignment Status Not Aligned (3286) label',
|
||||
action: async () => {
|
||||
const elementText = await driver.findElement(By.css('.show > li:nth-child(3) .checkbox')).getText();
|
||||
if (elementText !== 'Not Aligned (3261)') {
|
||||
throw new Error(`Expected: Alignment Status: "Not Aligned (3261)" checkbox label; Actual: "${elementText}"`);
|
||||
if (elementText !== 'Not Aligned (3286)') {
|
||||
throw new Error(`Expected: Alignment Status: "Not Aligned (3286)" checkbox label; Actual: "${elementText}"`);
|
||||
}
|
||||
console.log('Passed: Alignment Status Not Aligned (3261) checkbox label matched as expected');
|
||||
console.log('Passed: Alignment Status Not Aligned (3286) checkbox label matched as expected');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1075,10 +1075,10 @@ const steps = [
|
||||
description: 'Validate selected Grade option',
|
||||
action: async () => {
|
||||
const elementText = await driver.findElement(By.xpath('//*[@id="searchbox-content"]/ul/li[2]/div/button/span')).getText();
|
||||
if (elementText !== 'Science (1066), Social Studies (77)') {
|
||||
throw new Error(`Expected: Subject: "Science (1066), Social Studies (77)" option; Actual: "${elementText}"`);
|
||||
if (elementText !== 'Science (1066), Social Studies (102)') {
|
||||
throw new Error(`Expected: Subject: "Science (1066), Social Studies (102)" option; Actual: "${elementText}"`);
|
||||
}
|
||||
console.log('Passed: Subject: "Science (1066), Social Studies (77)" option matched as expected');
|
||||
console.log('Passed: Subject: "Science (1066), Social Studies (102)" option matched as expected');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1129,6 +1129,15 @@ const steps = [
|
||||
}
|
||||
},
|
||||
|
||||
//Scroll to Biology - QA link
|
||||
{
|
||||
description: 'Scroll to Biology - QA link',
|
||||
action: async () => {
|
||||
const location = await driver.findElement(By.linkText('Biology - QA'));
|
||||
await driver.executeScript("arguments[0].scrollIntoView({block: 'center'});", location);
|
||||
}
|
||||
},
|
||||
|
||||
//NEXT ACTION - Navigate to Align page
|
||||
{ description: 'Click Biology - QA link', action: async () => await driver.findElement(By.linkText('Biology - QA')).click() },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user