Updated dropdown text check
This commit is contained in:
@@ -340,6 +340,18 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//Grade dropdown value
|
||||||
|
{
|
||||||
|
description: 'Validate Grade dropdown value',
|
||||||
|
action: async () => {
|
||||||
|
const elementText = await driver.findElement(By.css('.list-group-item:nth-child(1) .multiselect-selected-text')).getText();
|
||||||
|
if (elementText !== 'None selected') {
|
||||||
|
throw new Error(`Expected: Grade: "None selected" dropdown value did not match; Actual: "${elementText}"`);
|
||||||
|
}
|
||||||
|
console.log('Passed: Grade: None selected dropdown value matched as expected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//Subject:
|
//Subject:
|
||||||
{
|
{
|
||||||
description: 'Validate Subject label',
|
description: 'Validate Subject label',
|
||||||
@@ -352,6 +364,18 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//Subject dropdown value
|
||||||
|
{
|
||||||
|
description: 'Validate Subject dropdown value',
|
||||||
|
action: async () => {
|
||||||
|
const elementText = await driver.findElement(By.css('.list-group-item:nth-child(2) .multiselect-selected-text')).getText();
|
||||||
|
if (elementText !== 'None selected') {
|
||||||
|
throw new Error(`Expected: Subject: "None selected" dropdown value did not match; Actual: "${elementText}"`);
|
||||||
|
}
|
||||||
|
console.log('Passed: Subject: None selected dropdown value matched as expected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//Alignment Status:
|
//Alignment Status:
|
||||||
{
|
{
|
||||||
description: 'Validate Alignment Status label',
|
description: 'Validate Alignment Status label',
|
||||||
@@ -364,6 +388,18 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//Alignment Status dropdown value
|
||||||
|
{
|
||||||
|
description: 'Validate Alignment Status dropdown value',
|
||||||
|
action: async () => {
|
||||||
|
const elementText = await driver.findElement(By.css('.list-group-item:nth-child(3) .multiselect-selected-text')).getText();
|
||||||
|
if (elementText !== 'None selected') {
|
||||||
|
throw new Error(`Expected: Alignment Status: "None selected" dropdown value did not match; Actual: "${elementText}"`);
|
||||||
|
}
|
||||||
|
console.log('Passed: Alignment Status: None selected dropdown value matched as expected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//NEXT ACTION - Click Grade dropdown
|
//NEXT ACTION - Click Grade dropdown
|
||||||
{ description: 'Click Grade dropdown', action: async () => await driver.findElement(By.css('.list-group-item:nth-child(1) .multiselect')).click() },
|
{ description: 'Click Grade dropdown', action: async () => await driver.findElement(By.css('.list-group-item:nth-child(1) .multiselect')).click() },
|
||||||
{ description: 'Wait for action to complete', action: async () => await driver.sleep(2000) },
|
{ description: 'Wait for action to complete', action: async () => await driver.sleep(2000) },
|
||||||
|
|||||||
Reference in New Issue
Block a user