From f7e2743b7e7926c31c0d0fedc75ce631cf327e63 Mon Sep 17 00:00:00 2001 From: Suneet Srivastava Date: Wed, 2 Feb 2022 23:03:40 +0530 Subject: [PATCH] test:MM-T808 Redo in the Menu Bar (#1977) --- e2e/specs/menu_bar/edit_menu.test.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/e2e/specs/menu_bar/edit_menu.test.js b/e2e/specs/menu_bar/edit_menu.test.js index c4f50059..dd33d3e4 100644 --- a/e2e/specs/menu_bar/edit_menu.test.js +++ b/e2e/specs/menu_bar/edit_menu.test.js @@ -52,6 +52,34 @@ describe('edit_menu', function desc() { } }); + it('MM-T808 Redo in the Menu Bar', async () => { + if (process.platform === 'win32' || process.platform === 'linux') { + const mainWindow = this.app.windows().find((window) => window.url().includes('index')); + const loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen')); + await loadingScreen.waitForSelector('.LoadingScreen', {state: 'hidden'}); + const firstServer = this.serverMap[`${config.teams[0].name}___TAB_MESSAGING`].win; + await env.loginToMattermost(firstServer); + await firstServer.waitForSelector('#sidebarItem_suscipit-4'); + + // click on sint channel + await firstServer.click('#sidebarItem_suscipit-4'); + await firstServer.click('#post_textbox'); + await firstServer.type('#post_textbox', 'Mattermost'); + await firstServer.click('#post_textbox'); + await mainWindow.click('button.three-dot-menu'); + robot.keyTap('e'); + robot.keyTap('u'); + const textAfterUndo = await firstServer.inputValue('#post_textbox'); + textAfterUndo.should.be.equal('Mattermos'); + await firstServer.click('#post_textbox'); + await mainWindow.click('button.three-dot-menu'); + robot.keyTap('e'); + robot.keyTap('r'); + const content = await firstServer.inputValue('#post_textbox'); + content.should.be.equal('Mattermost'); + } + }); + it('MM-T812 Select All in the Menu Bar', async () => { const mainWindow = this.app.windows().find((window) => window.url().includes('index')); const loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen'));