test(spectron): add connectionRetryCount

This commit is contained in:
George Lima 2019-04-09 17:58:42 -03:00
parent c131b05741
commit 5951301fe6
3 changed files with 8 additions and 7 deletions

View File

@ -5,15 +5,15 @@ import { getApp } from '../setup/utils';
const app = getApp();
beforeEach(async () => {
await app.start().then(() => console.log('Started App'));
await app.start();
await app.client.waitUntilWindowLoaded();
await app.client.waitUntilTextExists('#sidebar', 'Send');
await app.client.element('#sidebar a:nth-child(2)').click();
});
afterEach(() => {
afterEach(async () => {
if (app.isRunning()) {
app.stop();
await app.stop();
}
});

View File

@ -5,5 +5,5 @@ import '@babel/polyfill';
require('jest-extended');
// $FlowFixMe
jest.DEFAULT_TIMEOUT_INTERVAL = 20000;
jest.setTimeout(20000);
jest.DEFAULT_TIMEOUT_INTERVAL = 60000;
jest.setTimeout(60000);

View File

@ -8,8 +8,9 @@ export const getApp = () => new Application({
path: electron,
args: ['.'],
startTimeout: 20000,
waitTimeout: 5000,
quitTimeout: 5000,
waitTimeout: 10000,
quitTimeout: 10000,
connectionRetryCount: 30,
env: {
NODE_ENV: 'test',
},