diff --git a/e2e/specs/menu_bar/window_menu.test.js b/e2e/specs/menu_bar/window_menu.test.js index eecac1cb..f5bde557 100644 --- a/e2e/specs/menu_bar/window_menu.test.js +++ b/e2e/specs/menu_bar/window_menu.test.js @@ -49,7 +49,6 @@ describe('Menu/window_menu', function desc() { fs.writeFileSync(env.configFilePath, JSON.stringify(config)); await asyncSleep(1000); this.app = await env.getApp(); - this.serverMap = await env.getServerMap(this.app); }); afterEach(async () => { @@ -59,6 +58,7 @@ describe('Menu/window_menu', function desc() { }); it('MM-T826 should switch to servers when keyboard shortcuts are pressed', async () => { + await env.getServerMap(this.app); const mainWindow = this.app.windows().find((window) => window.url().includes('index')); let dropdownButtonText = await mainWindow.innerText('.TeamDropdownButton'); @@ -95,4 +95,30 @@ describe('Menu/window_menu', function desc() { tabViewButton = await mainView.innerText('.active'); tabViewButton.should.equal('Channels'); }); + + it.skip('MM-T824 should be minimized when keyboard shortcuts are pressed', async () => { + const browserWindow = await this.app.browserWindow(await this.app.firstWindow()); + const mainWindow = this.app.windows().find((window) => window.url().includes('index')); + await mainWindow.click('button.three-dot-menu'); + robot.keyTap('w'); + robot.keyTap('m'); + robot.keyTap('enter'); + await asyncSleep(2000); + const isMinimized = await browserWindow.evaluate((window) => window.isMinimized()); + isMinimized.should.be.true; + }); + + it.skip('MM-T825 should be hidden when keyboard shortcuts are pressed', async () => { + const browserWindow = await this.app.browserWindow(await this.app.firstWindow()); + const mainWindow = this.app.windows().find((window) => window.url().includes('index')); + await mainWindow.click('button.three-dot-menu'); + robot.keyTap('w'); + robot.keyTap('c'); + robot.keyTap('enter'); + await asyncSleep(2000); + const isVisible = await browserWindow.evaluate((window) => window.isVisible()); + isVisible.should.be.false; + const isDestroyed = await browserWindow.evaluate((window) => window.isDestroyed()); + isDestroyed.should.be.false; + }); });