From d220b6ada62f07188a25207ee4c68323447fa551 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 6 Jul 2017 15:09:50 +0530 Subject: [PATCH 1/2] Refactored spectron tests --- package.json | 4 +- tests/alwaysOnTop.test.js | 84 +++++++++++------ tests/bringToFront.test.js | 63 +++++++++---- tests/clipboard.test.js | 46 ++++++---- tests/notificationPosition.test.js | 141 ++++++++++++++++++++--------- tests/{ => utils}/spectronSetup.js | 10 +- 6 files changed, 236 insertions(+), 112 deletions(-) rename tests/{ => utils}/spectronSetup.js (60%) diff --git a/package.json b/package.json index b1ec3e98..2f40012d 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,9 @@ "prebuild": "npm run rebuild && npm run browserify-preload", "browserify-preload": "browserify -o js/preload/_preloadMain.js -x electron --insert-global-vars=__filename,__dirname js/preload/preloadMain.js", "rebuild": "electron-rebuild -f", - "test": "npm run lint && jest --verbose --testPathPattern test", + "test": "npm run lint && npm run copy-config && jest --verbose --testPathPattern test --runInBand", "lint": "eslint --ext .js js/", + "copy-config": "ncp 'config' 'node_modules/electron/dist/Electron.app/Contents/config'", "rename-exe": "cd dist/win-unpacked && ren Symphony.exe Symphony-Electron.exe" }, "jest": { @@ -79,6 +80,7 @@ "eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-react": "^6.10.0", "jest": "^19.0.2", + "ncp": "^2.0.0", "spectron": "^3.7.2" }, "dependencies": { diff --git a/tests/alwaysOnTop.test.js b/tests/alwaysOnTop.test.js index 132fd0d1..ba3870c8 100644 --- a/tests/alwaysOnTop.test.js +++ b/tests/alwaysOnTop.test.js @@ -1,56 +1,80 @@ -const Application = require('./spectronSetup'); -const path = require('path'); - describe('Tests for Always on top', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; let app; - beforeAll(() => { + beforeAll((done) => { + const Application = require('./utils/spectronSetup'); app = new Application({}); - }); - - afterAll(() => { - if (app && app.isRunning()) { - jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - return app.stop(); - } - }); - - it('should launch the app', () => { return app.startApplication().then((startedApp) => { app = startedApp; - return app.client.waitUntilWindowLoaded().then(async () => { - const count = await app.client.getWindowCount(); - expect(count === 1).toBeTruthy(); - }) + done(); + }).catch((err) => { + expect(err).toBeNull(); }); }); - it('should check window count', async () => { - const count = await app.client.getWindowCount(); - expect(count === 1).toBeTruthy(); + afterAll((done) => { + if (app && app.isRunning()) { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + app.stop().then(() => { + done(); + }).catch((err) => { + console.log(err); + done(); + }); + } }); - it('should check browser window visibility', async () => { - const isVisible = await app.browserWindow.isVisible(); - expect(isVisible).toBeTruthy(); + it('should launch the app', (done) => { + return app.client.waitUntilWindowLoaded().then(() => { + return app.client.getWindowCount().then((count) => { + expect(count === 1).toBeTruthy(); + done(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); + }); + }); + + it('should check window count', () => { + return app.client.getWindowCount().then((count) => { + expect(count === 1).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }); + + it('should check browser window visibility', () => { + return app.browserWindow.isVisible().then((isVisible) => { + expect(isVisible).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should check is always on top', async () => { - const isAlwaysOnTop = await app.browserWindow.isAlwaysOnTop(); - expect(isAlwaysOnTop).toBeFalsy(); + return app.browserWindow.isAlwaysOnTop().then((isAlwaysOnTop) => { + expect(isAlwaysOnTop).toBeFalsy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should change the always on top property', () => { return app.browserWindow.setAlwaysOnTop(true); }); - it('should check is always on top to be true', async () => { - const isAlwaysOnTop = await app.browserWindow.isAlwaysOnTop(); - expect(isAlwaysOnTop).toBeTruthy(); + it('should check is always on top to be true', () => { + return app.browserWindow.isAlwaysOnTop().then((isAlwaysOnTop) => { + expect(isAlwaysOnTop).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); }); \ No newline at end of file diff --git a/tests/bringToFront.test.js b/tests/bringToFront.test.js index 28dd865d..a33ab4ce 100644 --- a/tests/bringToFront.test.js +++ b/tests/bringToFront.test.js @@ -1,56 +1,83 @@ -const Application = require('./spectronSetup'); - describe('Tests for Bring to front', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; let app; - beforeAll(() => { + beforeAll((done) => { + const Application = require('./utils/spectronSetup'); app = new Application({}); + return app.startApplication().then((startedApp) => { + app = startedApp; + done(); + }).catch(() => { + expect(true).toBe(false); + }); }); - afterAll(() => { + afterAll((done) => { if (app && app.isRunning()) { jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - return app.stop(); + app.stop().then(() => { + done(); + }).catch((err) => { + console.log(err); + done(); + }); } }); - it('should launch the app', () => { - return app.startApplication().then((startedApp) => { - app = startedApp; - return app.client.waitUntilWindowLoaded().then(async () => { - const count = await app.client.getWindowCount(); + it('should launch the app', (done) => { + return app.client.waitUntilWindowLoaded().then(() => { + return app.client.getWindowCount().then((count) => { expect(count === 1).toBeTruthy(); - }) + done(); + }).catch(() => { + expect(true).toBe(false); + }); + }).catch(() => { + expect(true).toBe(false); }); }); it('should minimize the app', () => { - return app.browserWindow.minimize().then(async () => { - const isMinimized = await app.browserWindow.isMinimized(); - expect(isMinimized).toBeTruthy(); - }) + return app.browserWindow.minimize().then(() => { + return app.browserWindow.isMinimized().then((isMinimized) => { + expect(isMinimized).toBeTruthy(); + }).catch(() => { + expect(true).toBe(false); + }); + }).catch(() => { + expect(true).toBe(false); + }); }); it('should not be focused', () => { return app.browserWindow.isFocused().then((isFocused) => { expect(isFocused).toBeFalsy(); + }).catch(() => { + expect(true).toBe(false); }); }); it('should maximize browser window', () => { return app.browserWindow.restore().then(async () => { - const isMinimized = await app.browserWindow.isMinimized(); - expect(isMinimized).toBeFalsy(); + return app.browserWindow.isMinimized().then((isMinimized) => { + expect(isMinimized).toBeFalsy(); + }).catch(() => { + expect(true).toBe(false); + }); + }).catch(() => { + expect(true).toBe(false); }); }); it('should be focused', () => { return app.browserWindow.isFocused().then((isFocused) => { expect(isFocused).toBeTruthy(); + }).catch(() => { + expect(true).toBe(false); }); }); diff --git a/tests/clipboard.test.js b/tests/clipboard.test.js index 92e09522..ca74ac19 100644 --- a/tests/clipboard.test.js +++ b/tests/clipboard.test.js @@ -1,36 +1,48 @@ -const Application = require('./spectronSetup'); const path = require('path'); describe('Tests for clipboard', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; let app; - beforeAll(() => { + beforeAll((done) => { + const Application = require('./utils/spectronSetup'); app = new Application({}); + return app.startApplication().then((startedApp) => { + app = startedApp; + done(); + }); }); - afterAll(() => { + afterAll((done) => { if (app && app.isRunning()) { jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - return app.stop(); + app.stop().then(() => { + done(); + }).catch((err) => { + console.log(err); + done(); + }); } }); - it('should launch the app', () => { - return app.startApplication().then((startedApp) => { - app = startedApp; - return app.client.waitUntilWindowLoaded().then(async () => { - const count = await app.client.getWindowCount(); + it('should launch the app', (done) => { + return app.client.waitUntilWindowLoaded().then(() => { + return app.client.getWindowCount().then((count) => { expect(count === 1).toBeTruthy(); - }) + done(); + }).catch((err) => { + expect(err).toBeFalsy(); + }); + }).catch((err) => { + expect(err).toBeFalsy(); }); }); it('should check window count', () => { - return app.client.url('file:///' + path.join(__dirname, '..', 'demo/index.html')) + return app.client.url('file:///' + path.join(__dirname, '..', 'demo/index.html')); }); it('should set the username field', () => { @@ -45,16 +57,16 @@ describe('Tests for clipboard', () => { it('should verify electron clipboard', () => { return app.client .getValue('#tag').then((value) => { - app.electron.clipboard.writeText(value) - .electron.clipboard.readText().then(function (clipboardText) { - expect(clipboardText === 'Test').toBeTruthy(); - }); + return app.electron.clipboard.writeText(value) + .electron.clipboard.readText().then((clipboardText) => { + expect(clipboardText === 'Test').toBeTruthy(); + }); }); }); it('should verify electron clipboard copy', () => { return app.electron.clipboard.writeText('Testing copy') - .electron.clipboard.readText().then(function (clipboardText) { + .electron.clipboard.readText().then((clipboardText) => { return app.client.setValue('#tag', clipboardText).getValue('#tag').then((value) => { expect(value === 'Testing copy').toBeTruthy(); }); diff --git a/tests/notificationPosition.test.js b/tests/notificationPosition.test.js index c64e4706..fb8a3065 100644 --- a/tests/notificationPosition.test.js +++ b/tests/notificationPosition.test.js @@ -1,31 +1,45 @@ -const Application = require('./spectronSetup'); +const Application = require('./utils/spectronSetup'); const path = require('path'); describe('Tests for Notification position', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; let app; - beforeAll(() => { + beforeAll((done) => { app = new Application({}); + return app.startApplication().then((startedApp) => { + app = startedApp; + done(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); - afterAll(() => { + afterAll((done) => { if (app && app.isRunning()) { jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - return app.stop(); + app.stop().then(() => { + done(); + }).catch((err) => { + console.log(err); + done(); + }); } }); - it('should launch the app', () => { - return app.startApplication().then((startedApp) => { - app = startedApp; - return app.client.waitUntilWindowLoaded().then(async () => { - const count = await app.client.getWindowCount(); + it('should launch the app', (done) => { + return app.client.waitUntilWindowLoaded().then(() => { + return app.client.getWindowCount().then((count) => { expect(count === 1).toBeTruthy(); - }) + done(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -39,10 +53,15 @@ describe('Tests for Notification position', () => { return app.client.url(filePath); }); - it('should load demo html', async () => { - return app.client.waitUntilWindowLoaded().then(async () => { - const title = await app.client.getTitle(); - expect(title === '').toBeTruthy(); + it('should load demo html', () => { + return app.client.waitUntilWindowLoaded().then(() => { + return app.client.getTitle().then((title) => { + expect(title === '').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -57,16 +76,24 @@ describe('Tests for Notification position', () => { .windowByIndex(1) }); - it('should check notification position', async () => { - const bounds = await app.browserWindow.getBounds(); - expect(bounds.x === 0).toBeTruthy(); - expect(bounds.y > 0).toBeTruthy(); + it('should check notification position', () => { + return app.browserWindow.getBounds().then((bounds) => { + expect(bounds.x === 0).toBeTruthy(); + expect(bounds.y > 0).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should change the window', () => { - return app.client.windowByIndex(0).then(async () => { - const title = await app.browserWindow.getTitle(); - expect(title === 'Symphony | Secure Seamless Communication').toBeTruthy(); + return app.client.windowByIndex(0).then(() => { + return app.browserWindow.getTitle().then((title) => { + expect(title === 'Symphony | Secure Seamless Communication').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -78,24 +105,36 @@ describe('Tests for Notification position', () => { .click('#ok-button') .windowByIndex(0) .click('#notf') - .windowByIndex(1).then(async () => { - const title = await app.browserWindow.getTitle(); - expect(title === 'Electron').toBeTruthy(); + .windowByIndex(1).then(() => { + return app.browserWindow.getTitle().then((title) => { + expect(title === 'Electron').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); }); }); - it('should check notification position and equal to lower-right', async () => { - const bounds = await app.browserWindow.getBounds(); - expect(bounds.x > 0).toBeTruthy(); - expect(bounds.y > 0).toBeTruthy(); + it('should check notification position and equal to lower-right', () => { + return app.browserWindow.getBounds().then((bounds) => { + expect(bounds.x > 0).toBeTruthy(); + expect(bounds.y > 0).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should change the window', () => { - return app.client - .windowByIndex(0).then(async () => { - const title = await app.browserWindow.getTitle(); + return app.client.windowByIndex(0).then(() => { + return app.browserWindow.getTitle().then((title) => { expect(title === 'Symphony | Secure Seamless Communication').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); }); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should change notification position to upper-right', () => { @@ -106,24 +145,36 @@ describe('Tests for Notification position', () => { .click('#ok-button') .windowByIndex(0) .click('#notf') - .windowByIndex(1).then(async () => { - const title = await app.browserWindow.getTitle(); - expect(title === 'Electron').toBeTruthy(); + .windowByIndex(1).then(() => { + return app.browserWindow.getTitle().then((title) => { + expect(title === 'Electron').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); + }).catch((err) => { + expect(err).toBeNull(); }); }); - it('should check notification position and equal to upper-right', async () => { - const bounds = await app.browserWindow.getBounds(); - expect(bounds.x > 0).toBeTruthy(); - expect(bounds.y > 0).toBeTruthy(); + it('should check notification position and equal to upper-right', () => { + return app.browserWindow.getBounds().then((bounds) => { + expect(bounds.x > 0).toBeTruthy(); + expect(bounds.y > 0).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should change the window to main', () => { - return app.client - .windowByIndex(0).then(async () => { - const title = await app.browserWindow.getTitle(); + return app.client.windowByIndex(0).then(() => { + return app.browserWindow.getTitle().then((title) => { expect(title === 'Symphony | Secure Seamless Communication').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); }); + }).catch((err) => { + expect(err).toBeNull(); + }); }); it('should open notification and close', () => { @@ -132,11 +183,17 @@ describe('Tests for Notification position', () => { .click('#notf') .getWindowCount().then((count) => { expect(count === 3).toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); }) .windowByIndex(1).then(() => { return app.browserWindow.getTitle().then((title) => { expect(title === 'Electron').toBeTruthy(); + }).catch((err) => { + expect(err).toBeNull(); }); + }).catch((err) => { + expect(err).toBeNull(); }); }); diff --git a/tests/spectronSetup.js b/tests/utils/spectronSetup.js similarity index 60% rename from tests/spectronSetup.js rename to tests/utils/spectronSetup.js index 74729cfc..78df2b46 100644 --- a/tests/spectronSetup.js +++ b/tests/utils/spectronSetup.js @@ -9,20 +9,22 @@ class App { if (!this.options.path){ this.options.path = App.getAppPath(); - this.options.args = [path.join(__dirname, '..', 'js/main.js')]; + this.options.args = [path.join(__dirname, '..', '..', 'js/main.js')]; } this.app = new Application(this.options); } startApplication() { - return this.app.start().then(() => { - return this.app + return this.app.start().then((app) =>{ + return app; + }).catch((err) => { + console.log(err); }); } static getAppPath() { - let electronPath = path.join(__dirname, '..', 'node_modules', '.bin', 'electron'); + let electronPath = path.join(__dirname, '..', '..', 'node_modules', '.bin', 'electron'); if (process.platform === 'win32') { electronPath += '.cmd'; } From 763d27aa8d3234d85bb18c2153c7d60af988b0e1 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 6 Jul 2017 17:06:16 +0530 Subject: [PATCH 2/2] Refactored spectron tests --- tests/alwaysOnTop.test.js | 9 ++--- tests/bringToFront.test.js | 45 +++++++++++----------- tests/clipboard.test.js | 8 ++-- tests/notificationPosition.test.js | 8 ++-- tests/{utils => spectron}/spectronSetup.js | 8 +++- 5 files changed, 38 insertions(+), 40 deletions(-) rename tests/{utils => spectron}/spectronSetup.js (82%) diff --git a/tests/alwaysOnTop.test.js b/tests/alwaysOnTop.test.js index ba3870c8..f5b9246e 100644 --- a/tests/alwaysOnTop.test.js +++ b/tests/alwaysOnTop.test.js @@ -1,13 +1,12 @@ +const Application = require('./spectron/spectronSetup'); +let app = new Application({}); + describe('Tests for Always on top', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; - - let app; + jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut(); beforeAll((done) => { - const Application = require('./utils/spectronSetup'); - app = new Application({}); return app.startApplication().then((startedApp) => { app = startedApp; done(); diff --git a/tests/bringToFront.test.js b/tests/bringToFront.test.js index a33ab4ce..be33c7e0 100644 --- a/tests/bringToFront.test.js +++ b/tests/bringToFront.test.js @@ -1,18 +1,17 @@ +const Application = require('./spectron/spectronSetup'); +let app = new Application({}); + describe('Tests for Bring to front', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; - - let app; + jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut(); beforeAll((done) => { - const Application = require('./utils/spectronSetup'); - app = new Application({}); return app.startApplication().then((startedApp) => { app = startedApp; done(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -33,11 +32,11 @@ describe('Tests for Bring to front', () => { return app.client.getWindowCount().then((count) => { expect(count === 1).toBeTruthy(); done(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -45,19 +44,19 @@ describe('Tests for Bring to front', () => { return app.browserWindow.minimize().then(() => { return app.browserWindow.isMinimized().then((isMinimized) => { expect(isMinimized).toBeTruthy(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); it('should not be focused', () => { return app.browserWindow.isFocused().then((isFocused) => { expect(isFocused).toBeFalsy(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); @@ -65,19 +64,19 @@ describe('Tests for Bring to front', () => { return app.browserWindow.restore().then(async () => { return app.browserWindow.isMinimized().then((isMinimized) => { expect(isMinimized).toBeFalsy(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); it('should be focused', () => { return app.browserWindow.isFocused().then((isFocused) => { expect(isFocused).toBeTruthy(); - }).catch(() => { - expect(true).toBe(false); + }).catch((err) => { + expect(err).toBeNull(); }); }); diff --git a/tests/clipboard.test.js b/tests/clipboard.test.js index ca74ac19..98200f89 100644 --- a/tests/clipboard.test.js +++ b/tests/clipboard.test.js @@ -1,15 +1,13 @@ +const Application = require('./spectron/spectronSetup'); const path = require('path'); +let app = new Application({}); describe('Tests for clipboard', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; - - let app; + jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut(); beforeAll((done) => { - const Application = require('./utils/spectronSetup'); - app = new Application({}); return app.startApplication().then((startedApp) => { app = startedApp; done(); diff --git a/tests/notificationPosition.test.js b/tests/notificationPosition.test.js index fb8a3065..b196700d 100644 --- a/tests/notificationPosition.test.js +++ b/tests/notificationPosition.test.js @@ -1,15 +1,13 @@ -const Application = require('./utils/spectronSetup'); +const Application = require('./spectron/spectronSetup'); const path = require('path'); +let app = new Application({}); describe('Tests for Notification position', () => { let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000; - - let app; + jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut(); beforeAll((done) => { - app = new Application({}); return app.startApplication().then((startedApp) => { app = startedApp; done(); diff --git a/tests/utils/spectronSetup.js b/tests/spectron/spectronSetup.js similarity index 82% rename from tests/utils/spectronSetup.js rename to tests/spectron/spectronSetup.js index 78df2b46..4c6401b2 100644 --- a/tests/utils/spectronSetup.js +++ b/tests/spectron/spectronSetup.js @@ -7,7 +7,7 @@ class App { this.options = options; - if (!this.options.path){ + if (!this.options.path) { this.options.path = App.getAppPath(); this.options.args = [path.join(__dirname, '..', '..', 'js/main.js')]; } @@ -16,7 +16,7 @@ class App { } startApplication() { - return this.app.start().then((app) =>{ + return this.app.start().then((app) => { return app; }).catch((err) => { console.log(err); @@ -31,6 +31,10 @@ class App { return electronPath } + static getTimeOut() { + return 90000 + } + } module.exports = App; \ No newline at end of file