-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1107 from CruGlobal/1247023-remove-pii
[HS-1247023] Remove email from tracking URL
- Loading branch information
Showing
2 changed files
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,7 @@ describe('checkout', function () { | |
it('should watch the url and update the state', () => { | ||
jest.spyOn(self.controller, 'initStepParam').mockImplementation(() => {}) | ||
jest.spyOn(self.controller.cartService, 'get').mockReturnValue(Observable.of('cartData')) | ||
jest.spyOn(self.controller.analyticsFactory, 'checkoutStepEvent').mockImplementation(() => {}) | ||
jest.spyOn(self.controller.analyticsFactory, 'checkoutStepEvent').mockImplementation(() => {}) | ||
self.controller.listenForLocationChange() | ||
self.controller.$location.search('step', 'review') | ||
self.controller.$rootScope.$digest() | ||
|
@@ -197,21 +197,16 @@ describe('checkout', function () { | |
const searchObject = { | ||
one: '1', | ||
two: '2', | ||
step: 'review' | ||
step: 'review', | ||
e: '[email protected]' | ||
} | ||
mockSearch(searchObject) | ||
self.controller.changeStep('thankYou') | ||
expect(self.controller.$window.location.href).toEqual('/thank-you.html?one=1&two=2') | ||
}) | ||
|
||
const mockSearch = (searchObject) => { | ||
jest.spyOn(self.controller.$location, 'search').mockImplementation((key) => { | ||
if (key === 'step') { | ||
delete searchObject.step | ||
} else if (!key) { | ||
return searchObject | ||
} | ||
}) | ||
jest.spyOn(self.controller.$location, 'search').mockReturnValue(searchObject) | ||
} | ||
}) | ||
|
||
|