mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-01-15 19:22:13 -06:00
Electron-87 1. Spectron test for Bring to front feature
This commit is contained in:
parent
a4b79ac998
commit
d0e37c0ea3
45
spectron/tests/bringToFront-test.js
Normal file
45
spectron/tests/bringToFront-test.js
Normal file
@ -0,0 +1,45 @@
|
||||
const Application = require('../app');
|
||||
const assert = require('assert');
|
||||
|
||||
describe('Tests for Bring to front', () => {
|
||||
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 quit the app', () => {
|
||||
return app.browserWindow.minimize();
|
||||
});
|
||||
|
||||
it('should not be focused', () => {
|
||||
return app.browserWindow.isFocused().then((isFocused) => {
|
||||
assert.equal(isFocused, false);
|
||||
});
|
||||
});
|
||||
|
||||
it('should maximize browser window', () => {
|
||||
return app.browserWindow.restore();
|
||||
});
|
||||
|
||||
it('should be focused', () => {
|
||||
return app.browserWindow.isFocused().then((isFocused) => {
|
||||
assert.equal(isFocused, true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user