Skip to content

Commit 8b28e99

Browse files
committed
fix(benchpress): explicitly require navigation to finish before continuing
1 parent 923d90b commit 8b28e99

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

modules/angular2/src/test_lib/perf_util.es6

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ function runBenchmark(config) {
3232
});
3333
}
3434
var url = encodeURI(config.url + '?' + urlParams.join('&'));
35-
browser.get(url);
36-
return benchpressRunner.sample({
37-
id: config.id,
38-
execute: config.work,
39-
prepare: config.prepare,
40-
microMetrics: config.microMetrics,
41-
bindings: [
42-
benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description)
43-
]
35+
return browser.get(url).then(function() {
36+
benchpressRunner.sample({
37+
id: config.id,
38+
execute: config.work,
39+
prepare: config.prepare,
40+
microMetrics: config.microMetrics,
41+
bindings: [
42+
benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description)
43+
]
44+
});
4445
});
4546
});
4647
}

0 commit comments

Comments
 (0)