From e6f37120fe5bb10a46e6474dc0ba8e3282aa9c8c Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 20 Jul 2017 21:31:20 +0100 Subject: [PATCH] docs(aio): fix deprecated protractor API usage `browser.getLocationAbsUrl()` is deprecated. We should use `browser.getCurrentUrl()` instead. --- aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts index e2929fbbd3..c28fd38f8e 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts @@ -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$/); }); });