From 7031238279694243fe3f5f12656d77d875c33cb2 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Tue, 18 Jul 2017 12:19:03 +0530 Subject: [PATCH 1/2] Electron-90 - Fixed notification position test issue --- tests/notificationPosition.test.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/notificationPosition.test.js b/tests/notificationPosition.test.js index b196700d..8ebe2456 100644 --- a/tests/notificationPosition.test.js +++ b/tests/notificationPosition.test.js @@ -1,5 +1,6 @@ const Application = require('./spectron/spectronSetup'); const path = require('path'); +const {isMac} = require('../js/utils/misc'); let app = new Application({}); describe('Tests for Notification position', () => { @@ -77,7 +78,11 @@ describe('Tests for Notification position', () => { it('should check notification position', () => { return app.browserWindow.getBounds().then((bounds) => { expect(bounds.x === 0).toBeTruthy(); - expect(bounds.y > 0).toBeTruthy(); + if (isMac) { + expect(bounds.y > 0).toBeTruthy(); + } else { + expect(bounds.y === 0).toBeTruthy(); + } }).catch((err) => { expect(err).toBeNull(); }); @@ -157,7 +162,11 @@ describe('Tests for Notification position', () => { 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(); + if (isMac) { + expect(bounds.y > 0).toBeTruthy(); + } else { + expect(bounds.y === 0).toBeTruthy(); + } }).catch((err) => { expect(err).toBeNull(); }); From d869496b7e8c2f61089bda8259a5eeab2a7b3ce6 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Tue, 18 Jul 2017 17:43:40 +0530 Subject: [PATCH 2/2] Electron-90 - throws error if rebuild fails --- tests/activityDetection.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/activityDetection.test.js b/tests/activityDetection.test.js index f9f77263..7f38a11a 100644 --- a/tests/activityDetection.test.js +++ b/tests/activityDetection.test.js @@ -22,6 +22,9 @@ describe('Tests for Activity Detection', function() { afterAll(function (done) { childProcess.exec('npm run rebuild', function (err, stdout) { + if (err){ + throw(err); + } jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; done(); });