E2E test fixups (#2045)
* Reinstall reporter and re-enable skipped tests * Fixups for Linux * Mac fixes * Windows fixes * Use keyboard shortcuts instead of menu for most menu actions * Couple fixes * One more fix for now * Windows fixes * Lint fixes * Change up developer tools tests to be more consistent * Fix key for mac * Couple fixes for flaky tests/to avoid crashes on unload
This commit is contained in:
@@ -35,17 +35,16 @@ describe('file_menu/dropdown', function desc() {
|
||||
it('MM-T1313 Open Settings modal using keyboard shortcuts', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||
robot.keyTap(',', ['control']);
|
||||
const settingsWindow = await this.app.waitForEvent('window', {
|
||||
predicate: (window) => window.url().includes('settings'),
|
||||
});
|
||||
settingsWindow.should.not.be.null;
|
||||
}
|
||||
robot.keyTap(',', [env.cmdOrCtrl]);
|
||||
const settingsWindow = await this.app.waitForEvent('window', {
|
||||
predicate: (window) => window.url().includes('settings'),
|
||||
});
|
||||
settingsWindow.should.not.be.null;
|
||||
});
|
||||
|
||||
it('MM-T805 Sign in to Another Server Window opens using menu item', async () => {
|
||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||
// TODO: No keyboard shortcut for macOS
|
||||
if (process.platform !== 'darwin') {
|
||||
it('MM-T805 Sign in to Another Server Window opens using menu item', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
await mainWindow.click('button.three-dot-menu');
|
||||
@@ -57,19 +56,20 @@ describe('file_menu/dropdown', function desc() {
|
||||
predicate: (window) => window.url().includes('newServer'),
|
||||
});
|
||||
signInToAnotherServerWindow.should.not.be.null;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
it('MM-T804 Preferences in Menu Bar open the Settings page', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
robot.keyTap(',', [env.cmdOrCtrl]);
|
||||
const settingsWindow = await this.app.waitForEvent('window', {
|
||||
predicate: (window) => window.url().includes('settings'),
|
||||
});
|
||||
settingsWindow.should.not.be.null;
|
||||
|
||||
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']);
|
||||
robot.keyTap('w', [env.cmdOrCtrl]);
|
||||
|
||||
//Opening the menu bar
|
||||
robot.keyTap('alt');
|
||||
@@ -84,20 +84,23 @@ describe('file_menu/dropdown', function desc() {
|
||||
}
|
||||
});
|
||||
|
||||
it('MM-T806 Exit in the Menu Bar', () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
// TODO: Causes issues on Windows so skipping for Windows
|
||||
if (process.platform !== 'win32') {
|
||||
it('MM-T806 Exit in the Menu Bar', () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
robot.keyTap('q', ['command']);
|
||||
}
|
||||
if (process.platform === 'darwin') {
|
||||
robot.keyTap('q', ['command']);
|
||||
}
|
||||
|
||||
if (process.platform === 'linux' || process.platform === 'win32') {
|
||||
robot.keyTap('q', ['control']);
|
||||
}
|
||||
if (process.platform === 'linux' || process.platform === 'win32') {
|
||||
robot.keyTap('q', ['control']);
|
||||
}
|
||||
|
||||
this.app.windows().find((window) => window.url().should.not.include('index'));
|
||||
this.app.windows().find((window) => window.url().should.not.include('index'));
|
||||
|
||||
skipAfterEach = true; // Need to skip closing in aftereach as apps execution context is destroyed above
|
||||
});
|
||||
skipAfterEach = true; // Need to skip closing in aftereach as apps execution context is destroyed above
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user