test:MM-T812 Select All in the Menu Bar (#1973)

This commit is contained in:
Suneet Srivastava
2022-01-31 23:02:03 +05:30
committed by GitHub
parent 6702f41143
commit aa9e177895

View File

@@ -51,4 +51,23 @@ describe('edit_menu', function desc() {
content.should.be.equal('Mattermos');
}
});
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'));
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.fill('#post_textbox', 'Mattermost');
await mainWindow.click('button.three-dot-menu');
robot.keyTap('e');
robot.keyTap('s');
const channelHeaderText = await firstServer.evaluate('window.getSelection().toString()');
channelHeaderText.should.equal('Mattermost');
});
});