mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add JSDoc to closeAllWindowHandlesExcept e2e helper fn
This commit is contained in:
parent
a9d3c1a87d
commit
ec4c93c59f
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user