Merge pull request #163 from KiranNiranjan/ELECTRON-90

Electron 90 (Catch error)
This commit is contained in:
Vikas Shashidhar 2017-07-18 20:37:25 +05:30 committed by GitHub
commit 3cbfac6f20
2 changed files with 14 additions and 2 deletions

View File

@ -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();
});

View File

@ -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();
});