Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): make e2e tests faster #3822

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/benchmarks/src/naive_infinite_scroll/index.html
Expand Up @@ -13,7 +13,7 @@
<button id="run-btn">Run</button>
<button id="reset-btn">Reset</button>
</div>
<scroll-app></scroll-app>
<scroll-app>Loading...</scroll-app>

$SCRIPTS$
</body>
Expand Down
Expand Up @@ -9,6 +9,7 @@ describe('message bus', function() {

it('should receive a response from the worker', function() {
browser.get(URL);
browser.sleep(5000);

var VALUE = "hi there";
var input = element.all(by.css("#echo_input")).first();
Expand Down
2 changes: 1 addition & 1 deletion protractor-shared.js
Expand Up @@ -192,7 +192,7 @@ function patchProtractorWait(browser) {
var sleepInterval = process.env.TRAVIS || process.env.JENKINS_URL ? 14000 : 8000;
browser.get = function() {
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL you can also pass in a function rather than a string

return result;
}
}
Expand Down