2015-11-14 01:50:57 +08:00
|
|
|
import {Application} from 'spectron';
|
|
|
|
|
|
|
|
describe('Nylas', ()=> {
|
2015-11-19 10:00:51 +08:00
|
|
|
beforeAll((done)=>{
|
2015-11-14 01:50:57 +08:00
|
|
|
this.app = new Application({
|
|
|
|
path: jasmine.APP_PATH,
|
2015-11-19 10:00:51 +08:00
|
|
|
args: jasmine.APP_ARGS,
|
2015-11-14 01:50:57 +08:00
|
|
|
});
|
2015-11-19 10:00:51 +08:00
|
|
|
this.app.start().then(()=> setTimeout(done, jasmine.BOOT_WAIT));
|
2015-11-14 01:50:57 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
afterEach((done)=> {
|
|
|
|
if (this.app && this.app.isRunning()) {
|
|
|
|
this.app.stop().then(done);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-11-19 10:00:51 +08:00
|
|
|
it('boots 4 windows on launch', (done)=> {
|
2015-11-14 01:50:57 +08:00
|
|
|
this.app.client.getWindowCount().then((count)=> {
|
2015-11-19 10:00:51 +08:00
|
|
|
expect(count).toEqual(4);
|
|
|
|
done();
|
2015-11-14 01:50:57 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|