Animate NewTeamModal close

This commit is contained in:
Jonas Schwabe
2017-02-03 18:49:35 +01:00
parent 77472369c1
commit 63fe562349
4 changed files with 81 additions and 74 deletions

View File

@@ -261,6 +261,7 @@ describe('browser/settings.html', function desc() {
it('should close the window after clicking cancel', () => {
return this.app.client.
click('#cancelNewServerModal').
pause(1000). // Animation
isExisting('#newServerModal').should.eventually.equal(false);
});
@@ -334,15 +335,16 @@ describe('browser/settings.html', function desc() {
it('should add the team to the config file', (done) => {
this.app.client.
click('#saveNewServerModal').
click('#btnSave');
this.app.client.pause(1000).then(() => {
const savedConfig = JSON.parse(fs.readFileSync(env.configFilePath, 'utf8'));
savedConfig.teams.should.contain({
name: 'TestTeam',
url: 'http://example.org'
pause(1000). // Animation
click('#btnSave').
pause(1000).then(() => {
const savedConfig = JSON.parse(fs.readFileSync(env.configFilePath, 'utf8'));
savedConfig.teams.should.contain({
name: 'TestTeam',
url: 'http://example.org'
});
return done();
});
return done();
});
});
});
});