diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/frontend/notes/mixins | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/frontend/notes/mixins')
-rw-r--r-- | spec/frontend/notes/mixins/discussion_navigation_spec.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/frontend/notes/mixins/discussion_navigation_spec.js b/spec/frontend/notes/mixins/discussion_navigation_spec.js index 120de023099..ae30a36fc81 100644 --- a/spec/frontend/notes/mixins/discussion_navigation_spec.js +++ b/spec/frontend/notes/mixins/discussion_navigation_spec.js @@ -41,7 +41,7 @@ describe('Discussion navigation mixin', () => { .join(''), ); - jest.spyOn(utils, 'scrollToElement'); + jest.spyOn(utils, 'scrollToElementWithContext'); expandDiscussion = jest.fn(); const { actions, ...notesRest } = notesModule(); @@ -102,7 +102,7 @@ describe('Discussion navigation mixin', () => { }); it('scrolls to element', () => { - expect(utils.scrollToElement).toHaveBeenCalledWith( + expect(utils.scrollToElementWithContext).toHaveBeenCalledWith( findDiscussion('div.discussion', expected), ); }); @@ -123,11 +123,13 @@ describe('Discussion navigation mixin', () => { }); it('scrolls when scrollToDiscussion is emitted', () => { - expect(utils.scrollToElement).not.toHaveBeenCalled(); + expect(utils.scrollToElementWithContext).not.toHaveBeenCalled(); eventHub.$emit('scrollToDiscussion'); - expect(utils.scrollToElement).toHaveBeenCalledWith(findDiscussion('ul.notes', expected)); + expect(utils.scrollToElementWithContext).toHaveBeenCalledWith( + findDiscussion('ul.notes', expected), + ); }); }); @@ -167,7 +169,7 @@ describe('Discussion navigation mixin', () => { }); it('scrolls to discussion', () => { - expect(utils.scrollToElement).toHaveBeenCalledWith( + expect(utils.scrollToElementWithContext).toHaveBeenCalledWith( findDiscussion('div.discussion', expected), ); }); |