mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-01-05 21:54:05 -06:00
41 lines
1015 B
JavaScript
41 lines
1015 B
JavaScript
const Application = require('./spectronSetup');
|
|
|
|
let app = new Application({});
|
|
|
|
describe('Tests for Close', () => {
|
|
|
|
let originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = Application.getTimeOut();
|
|
|
|
beforeAll((done) => {
|
|
return app.startApplication().then((startedApp) => {
|
|
app = startedApp;
|
|
done();
|
|
}).catch((err) => {
|
|
done.fail(new Error(`Unable to start application error: ${err}`));
|
|
});
|
|
});
|
|
|
|
afterAll((done) => {
|
|
if (app && app.isRunning()) {
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
|
|
app.stop().then(() => {
|
|
done();
|
|
}).catch((err) => {
|
|
done();
|
|
});
|
|
} else {
|
|
done();
|
|
}
|
|
});
|
|
|
|
it('should close the app', () => {
|
|
return app.stop();
|
|
});
|
|
|
|
it('should check whether the app is running', () => {
|
|
expect(app.isRunning()).toBe(false);
|
|
});
|
|
|
|
});
|