docs(aio): fix deprecated protractor API usage

`browser.getLocationAbsUrl()` is deprecated.
We should use `browser.getCurrentUrl()` instead.
This commit is contained in:
Peter Bacon Darwin 2017-07-20 21:31:20 +01:00 committed by Alex Rickabaugh
parent a085223331
commit 0f79223008
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ describe('PhoneCat Application', function() {
it('should redirect `index.html` to `index.html#!/phones', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toBe('/phones');
expect(browser.getCurrentUrl()).toMatch(/\/phones$/);
});
describe('View: Phone list', function() {
@ -65,7 +65,7 @@ describe('PhoneCat Application', function() {
element.all(by.css('.phones li a')).first().click();
browser.sleep(1000); // Not sure why this is needed but it is. The route change works fine.
expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
expect(browser.getCurrentUrl()).toMatch(/\/phones\/nexus-s$/);
});
});