From 77be5c50b0384368876cef5a20efc59b4a4b15ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Thu, 15 Jun 2017 01:09:56 +0200 Subject: [PATCH 1/2] test(e2e): replace browser.getLocationAbsUrl() deprecated function with browser.getCurrentUrl() According to https://github.com/angular/protractor/pull/3969, browser.getLocationAbsUrl() is now deprecated and it recommends using browser.getCurrentUrl instead --- test/e2e/tests/base-tag.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/base-tag.spec.js b/test/e2e/tests/base-tag.spec.js index 4fdca58ffcf6..5bddf040c11e 100644 --- a/test/e2e/tests/base-tag.spec.js +++ b/test/e2e/tests/base-tag.spec.js @@ -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() { From 2ff0512ea4e43ac1ecdfffe4cd0dddbcb6bc60b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Thu, 15 Jun 2017 01:13:31 +0200 Subject: [PATCH 2/2] docs(tutorial): replace browser.getLocationAbsUrl() with browser.getCurrentUrl() According to https://github.com/angular/protractor/pull/3969, browser.getLocationAbsUrl() is now deprecated and it recommends using browser.getCurrentUrl instead --- docs/content/tutorial/step_08.ngdoc | 2 +- docs/content/tutorial/step_09.ngdoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/tutorial/step_08.ngdoc b/docs/content/tutorial/step_08.ngdoc index a55461d0cc21..72ab1787d141 100644 --- a/docs/content/tutorial/step_08.ngdoc +++ b/docs/content/tutorial/step_08.ngdoc @@ -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'); }); ... diff --git a/docs/content/tutorial/step_09.ngdoc b/docs/content/tutorial/step_09.ngdoc index 99683ccfeb44..970c834dea5a 100644 --- a/docs/content/tutorial/step_09.ngdoc +++ b/docs/content/tutorial/step_09.ngdoc @@ -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'); }); ...