X Tutup
Skip to content

Commit 7c7477c

Browse files
docs(ngHref): fix example that navigates away from the page
1 parent 6f05035 commit 7c7477c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ng/directive/booleanAttrs.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@
8787
expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
8888
8989
element(by.id('link-6')).click();
90-
expect(browser.getCurrentUrl()).toMatch(/\/6$/);
90+
91+
// At this point, we navigate away from an Angular page, so we need
92+
// to use browser.driver to get the base webdriver.
93+
browser.wait(function() {
94+
return browser.driver.getCurrentUrl().then(function(url) {
95+
return url.match(/\/6$/);
96+
});
97+
}, 1000, 'page should navigate to /6');
9198
});
9299
</file>
93100
</example>

0 commit comments

Comments
 (0)
X Tutup