Sleep instead of wait

This commit is contained in:
Mohsen Azimi
2015-01-30 15:39:11 -08:00
parent ce532ed81b
commit 21262ddb8e

View File

@@ -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();