diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/notes/components/discussion_actions_spec.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/notes/components/discussion_actions_spec.js')
-rw-r--r-- | spec/frontend/notes/components/discussion_actions_spec.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index 44dc148933c..3e1e43d0c6a 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -21,7 +21,7 @@ const createUnallowedNote = () => describe('DiscussionActions', () => { let wrapper; - const createComponentFactory = (shallow = true) => props => { + const createComponentFactory = (shallow = true) => (props, options) => { const store = createStore(); const mountFn = shallow ? shallowMount : mount; @@ -35,6 +35,11 @@ describe('DiscussionActions', () => { shouldShowJumpToNextDiscussion: true, ...props, }, + provide: { + glFeatures: { + hideJumpToNextUnresolvedInThreads: options?.hideJumpToNextUnresolvedInThreads, + }, + }, }); }; @@ -96,6 +101,13 @@ describe('DiscussionActions', () => { }); }); + it('does not render jump to next discussion button if feature flag is enabled', () => { + const createComponent = createComponentFactory(); + createComponent({}, { hideJumpToNextUnresolvedInThreads: true }); + + expect(wrapper.find(JumpToNextDiscussionButton).exists()).toBe(false); + }); + describe('events handling', () => { const createComponent = createComponentFactory(false); |