aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulie2014-02-06 12:45:43 -0800
committerJulie2014-02-06 17:03:39 -0800
commit16301bed2838276b1d5f315bde621edb32f82c6c (patch)
tree1c3f8198e5920b70e003c1318cf9dbe034091b58
parent95be253fe55d35336d425d3d600a36158fc3519d (diff)
downloadangular.js-16301bed2838276b1d5f315bde621edb32f82c6c.tar.bz2
chore(testing): de-flake a ngHref test for navigating away from the Angular page
-rw-r--r--src/ng/directive/booleanAttrs.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js
index 79199925..6762ab2d 100644
--- a/src/ng/directive/booleanAttrs.js
+++ b/src/ng/directive/booleanAttrs.js
@@ -59,7 +59,14 @@
element(by.id('link-3')).click();
- expect(browser.driver.getCurrentUrl()).toMatch(/\/123$/);
+ // At this point, we navigate away from an Angular page, so we need
+ // to use browser.driver to get the base webdriver.
+
+ browser.wait(function() {
+ return browser.driver.getCurrentUrl().then(function(url) {
+ return url.match(/\/123$/);
+ });
+ }, 1000, 'page should navigate to /123');
});
it('should execute ng-click but not reload when href empty string and name specified', function() {