Mailspring/spec_integration/helpers/shared-assertions.es6
Juan Tejada 5a8ca1ef51 add(integration-test): Adds test for onboarding flow with Exchange
Summary:
- Make sure user can log in using exchange
- Adds some test helpers for the test
- Updates eslint.json and cleans up lint errors

Test Plan: - Integration Tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2346
2015-12-14 15:14:58 -08:00

34 lines
911 B
JavaScript

export function assertBasicWindow() {
it('has main window visible', (done)=> {
this.app.client.isWindowVisible()
.then((result)=> expect(result).toBe(true))
.finally(done);
});
it('has main window focused', (done)=> {
this.app.client.isWindowFocused()
.then((result)=> expect(result).toBe(true))
.finally(done);
});
it('is not minimized', (done)=> {
this.app.client.isWindowMinimized()
.then((result)=> expect(result).toBe(false))
.finally(done);
});
it('doesn not have the dev tools open', (done)=> {
this.app.client.isWindowDevToolsOpened()
.then((result)=> expect(result).toBe(false))
.finally(done);
});
}
export function assertNoErrorsInLogs(client) {
return client.log('browser').then((log)=> {
expect(
log.value.filter((logEntry)=> logEntry.level === 'SEVERE').length
).toEqual(0);
return Promise.resolve();
});
}