aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-02-14 13:42:06 +0000
committerPeter Bacon Darwin2014-02-16 19:03:43 +0000
commit7c7477ce4561c8664a2270c19fd85b7bf9b04f29 (patch)
tree877dc869772d2f45ff868f8d91db64e2ea86d71c /src/ng/directive
parent6f0503514fd42e5ef950972946e0bf04044c0d13 (diff)
downloadangular.js-7c7477ce4561c8664a2270c19fd85b7bf9b04f29.tar.bz2
docs(ngHref): fix example that navigates away from the page
Diffstat (limited to 'src/ng/directive')
-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 955b382d..10a98d15 100644
--- a/src/ng/directive/booleanAttrs.js
+++ b/src/ng/directive/booleanAttrs.js
@@ -87,7 +87,14 @@
expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
element(by.id('link-6')).click();
- expect(browser.getCurrentUrl()).toMatch(/\/6$/);
+
+ // 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(/\/6$/);
+ });
+ }, 1000, 'page should navigate to /6');
});
</file>
</example>