Cleaned up results
This commit is contained in:
@@ -6346,44 +6346,21 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Wait for alert confirmation to clear
|
//Wait for alert confirmation to be removed from DOM
|
||||||
{
|
{
|
||||||
description: 'Verify alert confirmation to clear',
|
description: 'Verify alert confirmation to clear',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
||||||
if (elementText) {
|
if (elementText) {
|
||||||
await driver.wait(until.stalenessOf(elementText), 5000).catch(() => {
|
await driver.wait(until.stalenessOf(elementText), 5000).catch(() => {
|
||||||
throw new Error('1Alert banner did not disappear');
|
throw new Error('Submission alert banner did not disappear as expected');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log('Passed: 1Alert banner disappeared as expected');
|
console.log('Passed: Submission alert banner disappeared as expected');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Wait until alert confirmation is hidden via CSS
|
//Wait for page to load
|
||||||
{
|
|
||||||
description: 'Verify alert confirmation is hidden',
|
|
||||||
action: async () => {
|
|
||||||
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
|
||||||
if (!elementText) {
|
|
||||||
console.log('Passed: 2Alert DIV did disappear');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await driver.wait(async () => {
|
|
||||||
const display = await elementText.getCssValue('display');
|
|
||||||
return display === 'none';
|
|
||||||
}, 5000).catch(() => {
|
|
||||||
throw new Error('2Alert DIV did not hide in time');
|
|
||||||
});
|
|
||||||
console.log('Passed: 2Alert DIV hidden');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Wait for confirmation bannter to load
|
|
||||||
{
|
{
|
||||||
description: 'Wait for page to load',
|
description: 'Wait for page to load',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
@@ -8880,44 +8857,21 @@ const steps = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//Wait for alert confirmation to clear
|
//Wait for alert confirmation to be removed from DOM
|
||||||
{
|
{
|
||||||
description: 'Verify alert confirmation to clear',
|
description: 'Verify alert confirmation to clear',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
||||||
if (elementText) {
|
if (elementText) {
|
||||||
await driver.wait(until.stalenessOf(elementText), 5000).catch(() => {
|
await driver.wait(until.stalenessOf(elementText), 5000).catch(() => {
|
||||||
throw new Error('Alert banner did not disappear');
|
throw new Error('Submission alert banner did not disappear as expected');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log('Passed: Alert banner disappeared as expected');
|
console.log('Passed: Submission alert banner disappeared as expected');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//Wait for page to load
|
||||||
//Wait until alert confirmation is hidden via CSS
|
|
||||||
{
|
|
||||||
description: 'Verify alert confirmation is hidden',
|
|
||||||
action: async () => {
|
|
||||||
const elementText = await driver.findElement(By.css('.toast-body')).catch(() => false);
|
|
||||||
if (!elementText) {
|
|
||||||
console.log('Passed: Alert DIV did not disappear');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await driver.wait(async () => {
|
|
||||||
const display = await elementText.getCssValue('display');
|
|
||||||
return display === 'none';
|
|
||||||
}, 5000).catch(() => {
|
|
||||||
throw new Error('cAlert DIV did not hide in time');
|
|
||||||
});
|
|
||||||
console.log('Passed: cAlert DIV hidden');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Wait for confirmation bannter to load
|
|
||||||
{
|
{
|
||||||
description: 'Wait for page to load',
|
description: 'Wait for page to load',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user