fix(benchmarks): add waits for naive scrolling benchmark to ensure loading

Also, simplify selectors.

Closes #1706.
This commit is contained in:
Julie Ralph 2015-06-22 09:24:09 -07:00
parent 92ffc465d6
commit d8929c1d73
2 changed files with 4 additions and 5 deletions

View File

@ -12,12 +12,11 @@ describe('ng2 naive infinite scroll benchmark', function() {
url: URL, url: URL,
id: 'ng2.naive_infinite_scroll', id: 'ng2.naive_infinite_scroll',
work: function() { work: function() {
browser.wait(protractor.until.elementLocated(protractor.By.css('body /deep/ #scrollDiv')),
5000);
$('#reset-btn').click(); $('#reset-btn').click();
$('#run-btn').click(); $('#run-btn').click();
browser.wait(() => { browser.wait(protractor.until.elementLocated(protractor.By.css('#done')), 10000);
return $('#done').getText().then(function() { return true; },
function() { return false; });
}, 10000);
}, },
params: [ params: [
{name: 'appSize', value: appSize}, {name: 'appSize', value: appSize},

View File

@ -83,5 +83,5 @@ export class App {
_locateFinishedMarker() { return DOM.querySelector(document.body, '#done'); } _locateFinishedMarker() { return DOM.querySelector(document.body, '#done'); }
_getScrollDiv() { return DOM.query('body /deep/ #testArea /deep/ #scrollDiv'); } _getScrollDiv() { return DOM.query('body /deep/ #scrollDiv'); }
} }