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

test(e2e): replace browser.getLocationAbsUrl() deprecated function with browser.getCurrentUrl() #16053

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/tutorial/step_08.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ HTTP request to an invalid location.
query.sendKeys('nexus');

element.all(by.css('.phones li a')).first().click();
expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
expect(browser.getCurrentUrl()).toBe('/phones/nexus-s');
});

...
Expand Down
2 changes: 1 addition & 1 deletion docs/content/tutorial/step_09.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ various URLs and verifying that the correct view was rendered.

it('should redirect `index.html` to `index.html#!/phones', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toBe('/phones');
expect(browser.getCurrentUrl()).toBe('/phones');
});

...
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/base-tag.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('SCE URL policy when base tags are present', function() {


it('allows the page URL (location.href)', function() {
expectToBeTrusted(browser.getLocationAbsUrl(), true);
expectToBeTrusted(browser.getCurrentUrl(), true);
});

it('blocks off-origin URLs', function() {
Expand Down