aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/beta/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/beta/helpers.js')
-rw-r--r--test/e2e/beta/helpers.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/e2e/beta/helpers.js b/test/e2e/beta/helpers.js
index 828f87db7..d90cd5d66 100644
--- a/test/e2e/beta/helpers.js
+++ b/test/e2e/beta/helpers.js
@@ -122,12 +122,14 @@ async function closeAllWindowHandlesExcept (driver, exceptions, windowHandles) {
}
async function assertElementNotPresent (webdriver, driver, by) {
+ let dataTab
try {
- const dataTab = await findElement(driver, by, 4000)
- if (dataTab) {
- assert(false, 'Data tab should not be present')
- }
+ dataTab = await findElement(driver, by, 4000)
} catch (err) {
- assert(err instanceof webdriver.error.NoSuchElementError)
+ console.log(err)
+ assert(err instanceof webdriver.error.NoSuchElementError || err instanceof webdriver.error.TimeoutError)
+ }
+ if (dataTab) {
+ assert(false, 'Data tab should not be present')
}
}