Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3e6f49a

Browse files
committed
docs(tutorial): replace getLocationAbsUrl() with getCurrentUrl()
Protractor's `browser.getLocationAbsUrl()` has been deprecated and `browser.getCurrentUrl()` is the recommended alternative. Related: angular/angular-phonecat#430
1 parent 795398f commit 3e6f49a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/content/tutorial/step_08.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ HTTP request to an invalid location.
8383
query.sendKeys('nexus');
8484

8585
element.all(by.css('.phones li a')).first().click();
86-
expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
86+
expect(browser.getCurrentUrl()).toContain('index.html#!/phones/nexus-s');
8787
});
8888

8989
...

docs/content/tutorial/step_09.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ various URLs and verifying that the correct view was rendered.
352352

353353
it('should redirect `index.html` to `index.html#!/phones', function() {
354354
browser.get('index.html');
355-
expect(browser.getLocationAbsUrl()).toBe('/phones');
355+
expect(browser.getCurrentUrl()).toContain('index.html#!/phones');
356356
});
357357

358358
...

0 commit comments

Comments
 (0)