Add pause() to stabilize tests

This commit is contained in:
Yuya Ochiai 2017-03-03 00:49:07 +09:00
parent b72af87bf0
commit 8376ffe4cc
2 changed files with 5 additions and 1 deletions

View file

@ -106,7 +106,7 @@ describe('browser/index.html', function desc() {
}]
}));
return this.app.restart().then(() => {
return this.app.client.waitUntilWindowLoaded().pause(1000);
return this.app.client.waitUntilWindowLoaded().pause(1500);
}).then(() => {
return this.app.browserWindow.getTitle().should.eventually.equal('Mattermost Desktop testing html');
});
@ -176,6 +176,7 @@ describe('browser/index.html', function desc() {
// See settings_test for specs that cover the actual prompt
return this.app.client.waitUntilWindowLoaded().
click('#tabBarAddNewTeam').
pause(500).
isExisting('#newServerModal').should.eventually.be.true;
});
});

View file

@ -299,12 +299,14 @@ describe('browser/settings.html', function desc() {
it('should not be valid if no team name has been set', () => {
return this.app.client.
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamNameInput').should.eventually.equal(true);
});
it('should not be valid if no server address has been set', () => {
return this.app.client.
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamUrlInput').should.eventually.equal(true);
});
@ -348,6 +350,7 @@ describe('browser/settings.html', function desc() {
return this.app.client.
setValue('#teamUrlInput', 'superInvalid url').
click('#saveNewServerModal').
pause(500).
isExisting('.has-error #teamUrlInput').should.eventually.equal(true);
});