Skip to content

Commit

Permalink
Close #646: Upgrade electron to 27.0.3 (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
araujoarthur0 authored Nov 12, 2023
1 parent 26f5d4c commit 26066c4
Show file tree
Hide file tree
Showing 7 changed files with 21,177 additions and 17,548 deletions.
6 changes: 4 additions & 2 deletions __tests__/__main__/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ describe('Notifications', function()
notification.on('show', (event) =>
{
expect(event).toBeTruthy();
expect(event.sender.title).toBe('Time to Leave');
// In Electron 25 the definition of Event changed and we can no longer
// check information about the event sender
notification.close();
done();
});
Expand Down Expand Up @@ -60,7 +61,8 @@ describe('Notifications', function()
notification.on('show', (event) =>
{
expect(event).toBeTruthy();
expect(event.sender.title).toBe('Time to Leave');
// In Electron 25 the definition of Event changed and we can no longer
// check information about the event sender
notification.close();
done();
});
Expand Down
3 changes: 1 addition & 2 deletions __tests__/__renderer__/window-aux.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
'use strict';

const path = require('path');
const { remote } = require('electron');
const { BrowserWindow } = remote;
const BrowserWindow = require('@electron/remote').BrowserWindow;
import * as windowAux from '../../js/window-aux.js';

describe('window-aux.js Testing', function()
Expand Down
2 changes: 1 addition & 1 deletion js/user-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function getPreferencesFilePath()
{
const path = require('path');
const electron = require('electron');
const userDataPath = (electron.app || electron.remote.app).getPath('userData');
const userDataPath = (electron.app || require('@electron/remote').app).getPath('userData');
return path.join(userDataPath, 'preferences.json');
}

Expand Down
4 changes: 2 additions & 2 deletions js/window-aux.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const electron = require('electron');
const BrowserWindow = (electron || electron.remote).BrowserWindow;
const dialog = (electron || electron.remote).dialog;
const BrowserWindow = (electron || require('@electron/remote')).BrowserWindow;
const dialog = (electron || require('@electron/remote')).dialog;

/**
* Opens an electron dialog, based on the options, and returns the promise.
Expand Down
Loading

0 comments on commit 26066c4

Please sign in to comment.