aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-11-27 04:43:01 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-11-27 21:22:51 +0800
commitec4c93c59fccb83453d538e2d4a71dfc400ba4aa (patch)
treee6b94f2fa2d17e56cc44367ae5ac7bd167fbb436 /test
parenta9d3c1a87d474e283c90ed6e17f6f3d9a4181111 (diff)
downloadtangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.gz
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.bz2
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.lz
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.xz
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.zst
tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.zip
Add JSDoc to closeAllWindowHandlesExcept e2e helper fn
Diffstat (limited to 'test')
-rw-r--r--test/e2e/beta/helpers.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/beta/helpers.js b/test/e2e/beta/helpers.js
index 5e3f45b2b..b6fc35e08 100644
--- a/test/e2e/beta/helpers.js
+++ b/test/e2e/beta/helpers.js
@@ -120,6 +120,13 @@ async function switchToWindowWithTitle (driver, title, windowHandles) {
}
}
+/**
+ * Closes all windows except those in the given list of exceptions
+ * @param {object} driver the WebDriver instance
+ * @param {string|Array<string>} exceptions the list of window handle exceptions
+ * @param {Array?} windowHandles the full list of window handles
+ * @returns {Promise<void>}
+ */
async function closeAllWindowHandlesExcept (driver, exceptions, windowHandles) {
exceptions = typeof exceptions === 'string' ? [ exceptions ] : exceptions
windowHandles = windowHandles || await driver.getAllWindowHandles()