mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
Electron-93 Spectron test for always on top feature
This commit is contained in:
parent
a4b79ac998
commit
0e46833b32
54
spectron/tests/alwaysOnTop-test.js
Normal file
54
spectron/tests/alwaysOnTop-test.js
Normal file
@ -0,0 +1,54 @@
|
||||
const Application = require('../app');
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
|
||||
describe('Tests for Activity Detection', () => {
|
||||
let app;
|
||||
|
||||
before(() => {
|
||||
app = new Application({});
|
||||
});
|
||||
|
||||
after(() => {
|
||||
if (app && app.isRunning()) {
|
||||
return app.stop();
|
||||
}
|
||||
});
|
||||
|
||||
it('should launch the app', () => {
|
||||
return app.startApplication().then((startedApp) => {
|
||||
app = startedApp;
|
||||
app.client.waitUntilWindowLoaded().getWindowCount()
|
||||
.should.eventually.equal(1);
|
||||
});
|
||||
});
|
||||
|
||||
it('should check window count', () => {
|
||||
return app.client.windowHandles().then(function (response) {
|
||||
assert.equal(response.value.length, 1)
|
||||
});
|
||||
});
|
||||
|
||||
it('should check browser window visibility', () => {
|
||||
return app.browserWindow.isVisible().then(function (visible) {
|
||||
assert.equal(visible, true);
|
||||
});
|
||||
});
|
||||
|
||||
it('should check is always on top', () => {
|
||||
return app.browserWindow.isAlwaysOnTop().then(function (isAlwaysOnTop) {
|
||||
assert.equal(isAlwaysOnTop, false);
|
||||
});
|
||||
});
|
||||
|
||||
it('should change the always on top property', () => {
|
||||
return app.browserWindow.setAlwaysOnTop(true);
|
||||
});
|
||||
|
||||
it('should check is always on top to be true', () => {
|
||||
return app.browserWindow.isAlwaysOnTop().then(function (isAlwaysOnTop) {
|
||||
assert.equal(isAlwaysOnTop, true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user