mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Electron-90 - Fixed notification position test issue
This commit is contained in:
parent
c6f84adc44
commit
7031238279
@ -1,5 +1,6 @@
|
|||||||
const Application = require('./spectron/spectronSetup');
|
const Application = require('./spectron/spectronSetup');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const {isMac} = require('../js/utils/misc');
|
||||||
let app = new Application({});
|
let app = new Application({});
|
||||||
|
|
||||||
describe('Tests for Notification position', () => {
|
describe('Tests for Notification position', () => {
|
||||||
@ -77,7 +78,11 @@ describe('Tests for Notification position', () => {
|
|||||||
it('should check notification position', () => {
|
it('should check notification position', () => {
|
||||||
return app.browserWindow.getBounds().then((bounds) => {
|
return app.browserWindow.getBounds().then((bounds) => {
|
||||||
expect(bounds.x === 0).toBeTruthy();
|
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) => {
|
}).catch((err) => {
|
||||||
expect(err).toBeNull();
|
expect(err).toBeNull();
|
||||||
});
|
});
|
||||||
@ -157,7 +162,11 @@ describe('Tests for Notification position', () => {
|
|||||||
it('should check notification position and equal to upper-right', () => {
|
it('should check notification position and equal to upper-right', () => {
|
||||||
return app.browserWindow.getBounds().then((bounds) => {
|
return app.browserWindow.getBounds().then((bounds) => {
|
||||||
expect(bounds.x > 0).toBeTruthy();
|
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) => {
|
}).catch((err) => {
|
||||||
expect(err).toBeNull();
|
expect(err).toBeNull();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user