Mailspring/spectron/app-spec.es6
Juan Tejada 53bd5ab2d0 ci(spectron): Add support to execute spectron/chrome-driver tests
Summary:
- Sets up spectron test suite inside its own directory and with its own
  dependencies (must run on a build of the app)
- Sets up dummy test
- Adds `run-spectron-specs` grunt task, and adds it to cibuild task
- Cleans up spec tasks code

Test Plan: - Run specs

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2256
2015-11-18 16:36:58 -08:00

23 lines
456 B
JavaScript

import {Application} from 'spectron';
describe('Nylas', ()=> {
beforeEach((done)=>{
this.app = new Application({
path: jasmine.APP_PATH,
});
this.app.start().then(done);
});
afterEach((done)=> {
if (this.app && this.app.isRunning()) {
this.app.stop().then(done);
}
});
it('shows an initial window', ()=> {
this.app.client.getWindowCount().then((count)=> {
expect(count).toEqual(1);
});
});
});