[MM-50485] Migrate app to ServerManager, remove view names and replace with IDs (#2672)

* Migrate app to ServerManager, remove view names and replace with IDs

* Fixed a test

* Fixed a bug when adding the initial server

* Merge'd

* Bug fixes and PR feedback
This commit is contained in:
Devin Binnie
2023-04-12 12:52:34 -04:00
committed by GitHub
parent d87097b1eb
commit 686b4ac9f1
58 changed files with 1570 additions and 2175 deletions

View File

@@ -124,10 +124,10 @@ jest.mock('main/app/utils', () => ({
getDeeplinkingURL: jest.fn(),
handleUpdateMenuEvent: jest.fn(),
shouldShowTrayIcon: jest.fn(),
updateServerInfos: jest.fn(),
updateSpellCheckerLocales: jest.fn(),
wasUpdated: jest.fn(),
initCookieManager: jest.fn(),
updateServerInfos: jest.fn(),
}));
jest.mock('main/appState', () => ({
on: jest.fn(),
@@ -149,6 +149,11 @@ jest.mock('main/notifications', () => ({
displayDownloadCompleted: jest.fn(),
}));
jest.mock('main/ParseArgs', () => jest.fn());
jest.mock('common/servers/serverManager', () => ({
reloadFromConfig: jest.fn(),
getAllServers: jest.fn(),
on: jest.fn(),
}));
jest.mock('main/tray/tray', () => ({
refreshTrayImages: jest.fn(),
setupTray: jest.fn(),
@@ -194,7 +199,6 @@ describe('main/app/initialize', () => {
}
});
Config.data = {};
Config.teams = [];
app.whenReady.mockResolvedValue();
app.requestSingleInstanceLock.mockReturnValue(true);
app.getPath.mockImplementation((p) => `/basedir/${p}`);