Electron-90 - Fixed notification position test issue

This commit is contained in:
Kiran Niranjan 2017-07-18 12:19:03 +05:30 committed by Kiran Niranjan
parent c6f84adc44
commit 7031238279

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();
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();
if (isMac) {
expect(bounds.y > 0).toBeTruthy();
} else {
expect(bounds.y === 0).toBeTruthy();
}
}).catch((err) => {
expect(err).toBeNull();
});