summaryrefslogtreecommitdiff
path: root/spec/frontend/notes/mixins
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/frontend/notes/mixins
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-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.js12
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),
);
});