diff options
author | Samantha Ming <sming@gitlab.com> | 2019-09-12 10:41:19 +0300 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-12 10:41:19 +0300 |
commit | 589c8d5625f64edf4dfaf9ddf1f9f4b2fe7efb32 (patch) | |
tree | 45bf0e41e0b754f378b654b59820f23702e8df56 /spec/frontend | |
parent | 42b8e6838e8d63dcad7641a6164d178e9e09262a (diff) |
Hide resolve thread button from guest
- Show if user can_resolve all of the notes
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/notes/components/discussion_actions_spec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index 0a52c81571e..f582729d773 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -65,6 +65,15 @@ describe('DiscussionActions', () => { expect(wrapper.find(JumpToNextDiscussionButton).exists()).toBe(false); }); + + it('does not renders discussion button for non-member', () => { + const discussion = JSON.parse(JSON.stringify(discussionMock)); + discussion.notes[1].current_user.can_resolve = false; + createComponent({ discussion }); + + expect(wrapper.find(ResolveDiscussionButton).exists()).toBe(false); + expect(wrapper.find(ResolveWithIssueButton).exists()).toBe(false); + }); }); describe('events handling', () => { |