Fix tests with proper promise chain
This commit is contained in:
@@ -24,9 +24,15 @@ describe('application', function desc() {
|
||||
return this.app.start().then(() => {
|
||||
return this.app.client.
|
||||
waitUntilWindowLoaded().
|
||||
getWindowCount().then((count) => count.should.equal(1)).
|
||||
browserWindow.isDevToolsOpened().then((opened) => opened.should.be.false).
|
||||
browserWindow.isVisible().then((visible) => visible.should.be.true);
|
||||
getWindowCount().then((count) => {
|
||||
count.should.equal(1);
|
||||
}).
|
||||
browserWindow.isDevToolsOpened().then((opened) => {
|
||||
opened.should.be.false;
|
||||
}).
|
||||
browserWindow.isVisible().then((visible) => {
|
||||
visible.should.be.true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -66,8 +72,12 @@ describe('application', function desc() {
|
||||
return this.app.start().then(() => {
|
||||
return this.app.client.
|
||||
waitUntilWindowLoaded().
|
||||
getUrl().then((url) => url.should.match(/\/settings.html$/)).
|
||||
isExisting('#newServerModal').then((existing) => existing.should.equal(true));
|
||||
getUrl().then((url) => {
|
||||
url.should.match(/\/settings.html$/);
|
||||
}).
|
||||
isExisting('#newServerModal').then((existing) => {
|
||||
existing.should.equal(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -78,7 +88,9 @@ describe('application', function desc() {
|
||||
return this.app.start().then(() => {
|
||||
return this.app.client.
|
||||
waitUntilWindowLoaded().
|
||||
getUrl().then((url) => url.should.match(/\/index.html$/));
|
||||
getUrl().then((url) => {
|
||||
url.should.match(/\/index.html$/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -90,7 +102,9 @@ describe('application', function desc() {
|
||||
return this.app.start().then(() => {
|
||||
return this.app.client.
|
||||
waitUntilWindowLoaded().
|
||||
getUrl().then((url) => url.should.match(/\/index.html$/));
|
||||
getUrl().then((url) => {
|
||||
url.should.match(/\/index.html$/);
|
||||
});
|
||||
}).then(() => {
|
||||
var str = fs.readFileSync(env.configFilePath, 'utf8');
|
||||
var config = JSON.parse(str);
|
||||
|
Reference in New Issue
Block a user