mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
5a8ca1ef51
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
34 lines
911 B
JavaScript
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();
|
|
});
|
|
}
|