fix test pck

This commit is contained in:
Eugenio Romano
2019-03-27 13:26:47 +00:00
parent a2823eeb99
commit 1ecbf25030

View File

@@ -73,11 +73,16 @@ export class BrowserVisibility {
* Wait for element to not be visible * Wait for element to not be visible
*/ */
static waitUntilElementIsNotVisible(elementToCheck, waitTimeout: number = DEFAULT_TIMEOUT) { static waitUntilElementIsNotVisible(elementToCheck, waitTimeout: number = DEFAULT_TIMEOUT) {
let isPresent = false;
return browser.wait(() => { return browser.wait(() => {
browser.waitForAngularEnabled(); browser.waitForAngularEnabled();
return elementToCheck.isPresent().then(function (present) {
return !present; elementToCheck.isPresent().then(
}); (present) => {
isPresent = !present;
}
);
return isPresent;
}, waitTimeout, 'Element is Visible and it should not' + elementToCheck.locator()); }, waitTimeout, 'Element is Visible and it should not' + elementToCheck.locator());
} }