Remove WindowManager, separate functionality into smaller modules (#2682)
* Move sendToRenderer to respective singletons * Move to using ViewManager call for getting view by webContentsId * Move show and create logic to main window, handle deep linking seperately * Move resizing logic and event handing to mainWindow * Move server switching logic to main/app * Move tab switching logic to main/app, rely on showById for most usage * Migrate remaining functions, remove windowManager objects, set up imports for self-contained singletons * Fix E2E tests * Update src/main/app/servers.ts Co-authored-by: Elias Nahum <nahumhbl@gmail.com> --------- Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
@@ -60,21 +60,12 @@ describe('file_menu/dropdown', function desc() {
|
||||
});
|
||||
}
|
||||
|
||||
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') {
|
||||
robot.keyTap('w', [env.cmdOrCtrl]);
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
it('MM-T804 Preferences in Menu Bar open the Settings page', async () => {
|
||||
//Opening the menu bar
|
||||
robot.keyTap('alt');
|
||||
robot.keyTap('enter');
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
mainWindow.should.not.be.null;
|
||||
await mainWindow.click('button.three-dot-menu');
|
||||
robot.keyTap('f');
|
||||
robot.keyTap('s');
|
||||
robot.keyTap('enter');
|
||||
@@ -82,8 +73,8 @@ describe('file_menu/dropdown', function desc() {
|
||||
predicate: (window) => window.url().includes('settings'),
|
||||
});
|
||||
settingsWindowFromMenu.should.not.be.null;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: Causes issues on Windows so skipping for Windows
|
||||
if (process.platform !== 'win32') {
|
||||
|
@@ -139,6 +139,7 @@ describe('Add Server Modal', function desc() {
|
||||
name: 'TestTeam',
|
||||
url: 'http://example.org/',
|
||||
order: 2,
|
||||
lastActiveTab: 0,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
|
@@ -86,6 +86,7 @@ describe('Configure Server Modal', function desc() {
|
||||
url: 'http://example.org/',
|
||||
name: 'TestTeam',
|
||||
order: 0,
|
||||
lastActiveTab: 0,
|
||||
tabs: [
|
||||
{
|
||||
name: 'TAB_MESSAGING',
|
||||
|
Reference in New Issue
Block a user