diff --git a/e2e/modules/environment.js b/e2e/modules/environment.js index 30e38ae5711..adfb58af424 100644 --- a/e2e/modules/environment.js +++ b/e2e/modules/environment.js @@ -246,18 +246,18 @@ module.exports = { await Promise.all(app.windows(). filter((win) => !win.url().includes('mattermost-desktop://')). map(async (win) => { - return win.evaluate(async () => { - if (!window.testHelper) { - return null; - } - const info = await window.testHelper.getViewInfoForTest(); - return {viewName: `${info.serverName}___${info.viewType}`, webContentsId: info.webContentsId}; - }).then((result) => { - if (result) { - map[result.viewName] = {win, webContentsId: result.webContentsId}; - } - }); - })); + return win.evaluate(async () => { + if (!window.testHelper) { + return null; + } + const info = await window.testHelper.getViewInfoForTest(); + return {viewName: `${info.serverName}___${info.viewType}`, webContentsId: info.webContentsId}; + }).then((result) => { + if (result) { + map[result.viewName] = {win, webContentsId: result.webContentsId}; + } + }); + })); return map; },