mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-31 19:27:00 -06:00
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
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 check whether the app is running', async (done) => {
|
|
await app.stop();
|
|
let isRun = await app.isRunning();
|
|
await expect(isRun).toBe(false);
|
|
await done();
|
|
});
|
|
|
|
});
|