Sleep instead of wait
This commit is contained in:
@@ -40,6 +40,7 @@ function checkConsoleErrors () {
|
|||||||
errors.push(log);
|
errors.push(log);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(errors).to.be.empty;
|
expect(errors).to.be.empty;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
@@ -55,17 +56,11 @@ describe('basics', function (done) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have "Swagger UI" in title', function (done) {
|
it('should have "Swagger UI" in title', function (done) {
|
||||||
driver.wait(function() {
|
driver.sleep(200);
|
||||||
return driver.getTitle().then(function(title) {
|
driver.getTitle().then(function(title) {
|
||||||
var hasTitle = title.indexOf('Swagger UI') > -1;
|
|
||||||
|
|
||||||
if (hasTitle) {
|
|
||||||
expect(title).to.contain('Swagger UI');
|
expect(title).to.contain('Swagger UI');
|
||||||
done();
|
done();
|
||||||
}
|
|
||||||
return hasTitle;
|
|
||||||
});
|
});
|
||||||
}, 1000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
checkConsoleErrors();
|
checkConsoleErrors();
|
||||||
|
|||||||
Reference in New Issue
Block a user