fix(benchmarks): add waits for naive scrolling benchmark to ensure loading
Also, simplify selectors. Closes #1706.
This commit is contained in:
parent
92ffc465d6
commit
d8929c1d73
|
@ -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},
|
||||||
|
|
|
@ -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'); }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue