test:Preferences in the Menu Bar opens the Settings page (#1959)

This commit is contained in:
Suneet Srivastava 2022-01-31 19:50:52 +05:30 committed by GitHub
parent cb3415e3da
commit 88220bc1fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,4 +56,28 @@ describe('file_menu/dropdown', function desc() {
signInToAnotherServerWindow.should.not.be.null;
}
});
it('MM-T804 Preferences in Menu Bar open the Settings page', async () => {
if (process.platform !== 'darwin') {
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
mainWindow.should.not.be.null;
robot.keyTap(',', ['control']);
const settingsWindow = await this.app.waitForEvent('window', {
predicate: (window) => window.url().includes('settings'),
});
settingsWindow.should.not.be.null;
robot.keyTap('w', ['control']);
//Opening the menu bar
robot.keyTap('alt');
robot.keyTap('enter');
robot.keyTap('f');
robot.keyTap('s');
robot.keyTap('enter');
const settingsWindowFromMenu = await this.app.waitForEvent('window', {
predicate: (window) => window.url().includes('settings'),
});
settingsWindowFromMenu.should.not.be.null;
}
});
});