From 8b28e99373d3032eef89cad97a87d7d594037a10 Mon Sep 17 00:00:00 2001 From: Julie Ralph Date: Thu, 16 Apr 2015 09:43:22 -0700 Subject: [PATCH] fix(benchpress): explicitly require navigation to finish before continuing --- modules/angular2/src/test_lib/perf_util.es6 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/angular2/src/test_lib/perf_util.es6 b/modules/angular2/src/test_lib/perf_util.es6 index 53bef87a71..241b35eb92 100644 --- a/modules/angular2/src/test_lib/perf_util.es6 +++ b/modules/angular2/src/test_lib/perf_util.es6 @@ -32,15 +32,16 @@ function runBenchmark(config) { }); } var url = encodeURI(config.url + '?' + urlParams.join('&')); - browser.get(url); - return benchpressRunner.sample({ - id: config.id, - execute: config.work, - prepare: config.prepare, - microMetrics: config.microMetrics, - bindings: [ - benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description) - ] + return browser.get(url).then(function() { + benchpressRunner.sample({ + id: config.id, + execute: config.work, + prepare: config.prepare, + microMetrics: config.microMetrics, + bindings: [ + benchpress.bind(benchpress.Options.SAMPLE_DESCRIPTION).toValue(description) + ] + }); }); }); }