Added reset alert validation check
This commit is contained in:
@@ -2496,6 +2496,18 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//Items Related path label font size
|
||||||
|
{
|
||||||
|
description: 'Validate Items Related path label font size',
|
||||||
|
action: async () => {
|
||||||
|
const elementText = await driver.findElement(By.css('div > b')).getCssValue('font-size');
|
||||||
|
if (elementText !== '14.3px') {
|
||||||
|
throw new Error(`Expected: Items Related path label font size to be "14.3px"; Actual: "${elementText}"`);
|
||||||
|
}
|
||||||
|
console.log('Passed: Items Related path label font size matched as expected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//Sort label
|
//Sort label
|
||||||
{
|
{
|
||||||
description: 'Validate Sort label',
|
description: 'Validate Sort label',
|
||||||
@@ -2820,6 +2832,42 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//NEXT ACTION -Click Direct Variation reset link
|
||||||
|
{
|
||||||
|
description: 'Validate reset assert message',
|
||||||
|
action: async () => {
|
||||||
|
await driver.sleep(2000);
|
||||||
|
|
||||||
|
const resetLink = await driver.wait(
|
||||||
|
until.elementLocated(By.css('#alignstatuslink874414465 > div > a > b')),
|
||||||
|
5000
|
||||||
|
);
|
||||||
|
await resetLink.click();
|
||||||
|
await driver.sleep(2000);
|
||||||
|
|
||||||
|
const alert = await driver.wait(
|
||||||
|
until.alertIsPresent(),
|
||||||
|
5000
|
||||||
|
);
|
||||||
|
|
||||||
|
const alertText = await alert.getText();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (alertText !== 'Are you sure you want to reset the alignment?') {
|
||||||
|
throw new Error('Expected: "Are you sure you want to reset the alignment?"');
|
||||||
|
}
|
||||||
|
console.log('Passed: Reset Alert DIV text matched as expected');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('FAILED: Reset Alert DIV, unable to validate text; Error Message: ', error.message);
|
||||||
|
await alert.dismiss();
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
await alert.dismiss();
|
||||||
|
await driver.sleep(2000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {
|
const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user