fix(build): make e2e tests faster

Closes #3822
This commit is contained in:
Marc Laval 2015-08-24 19:13:47 +02:00
parent 9cc1cd29ed
commit c2279dd651
3 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@
<button id="run-btn">Run</button> <button id="run-btn">Run</button>
<button id="reset-btn">Reset</button> <button id="reset-btn">Reset</button>
</div> </div>
<scroll-app></scroll-app> <scroll-app>Loading...</scroll-app>
$SCRIPTS$ $SCRIPTS$
</body> </body>

View File

@ -9,6 +9,7 @@ describe('message bus', function() {
it('should receive a response from the worker', function() { it('should receive a response from the worker', function() {
browser.get(URL); browser.get(URL);
browser.sleep(5000);
var VALUE = "hi there"; var VALUE = "hi there";
var input = element.all(by.css("#echo_input")).first(); var input = element.all(by.css("#echo_input")).first();

View File

@ -192,7 +192,7 @@ function patchProtractorWait(browser) {
var sleepInterval = process.env.TRAVIS || process.env.JENKINS_URL ? 14000 : 8000; var sleepInterval = process.env.TRAVIS || process.env.JENKINS_URL ? 14000 : 8000;
browser.get = function() { browser.get = function() {
var result = _get.apply(this, arguments); var result = _get.apply(this, arguments);
browser.sleep(sleepInterval); browser.driver.wait(protractor.until.elementLocated(By.js('var cs = document.body.children; var isLoading = false; for (var i = 0; i < cs.length; i++) {if (cs[i].textContent.indexOf("Loading...") > -1) isLoading = true; } return !isLoading ? document.body.children : null')), sleepInterval);
return result; return result;
} }
} }