diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-27 04:43:01 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-27 21:22:51 +0800 |
commit | ec4c93c59fccb83453d538e2d4a71dfc400ba4aa (patch) | |
tree | e6b94f2fa2d17e56cc44367ae5ac7bd167fbb436 | |
parent | a9d3c1a87d474e283c90ed6e17f6f3d9a4181111 (diff) | |
download | tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.gz tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.tar.zst tangerine-wallet-browser-ec4c93c59fccb83453d538e2d4a71dfc400ba4aa.zip |
Add JSDoc to closeAllWindowHandlesExcept e2e helper fn
-rw-r--r-- | test/e2e/beta/helpers.js | 7 |
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() |