diff options
author | Paul Gascou-Vaillancourt <pgascouvaillancourt@gitlab.com> | 2019-05-01 10:04:07 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-01 10:04:07 +0000 |
commit | 911701ae473f28eebf5d1d3cf4d4eef5130f384e (patch) | |
tree | 2ddbe440f6e221769b9b3d7bc693d0cc20675df3 /app/assets/javascripts/notes/components/notes_app.vue | |
parent | 9de3130e0c1f5c6906bdc1d96d96b761cff5a3b4 (diff) | |
download | gitlab-ce-911701ae473f28eebf5d1d3cf4d4eef5130f384e.tar.gz |
Extract discussion notes into new component
- Moved discussion notes out of `NoteableDiscussion` component into a
new `DiscussionNotes` component
- Wrote Jest tests for the new `DiscussionNotes` component
- Updated Jest config for emojis fixtures
- Updated Karma tests `NoteableDiscussion` to match its new structure
- Convert `DiffDiscussions` tests to use Vue test utils
Diffstat (limited to 'app/assets/javascripts/notes/components/notes_app.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/notes_app.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue index e2bd59f7631..0f1976db37d 100644 --- a/app/assets/javascripts/notes/components/notes_app.vue +++ b/app/assets/javascripts/notes/components/notes_app.vue @@ -67,6 +67,7 @@ export default { 'isLoading', 'commentsDisabled', 'getNoteableData', + 'userCanReply', ]), noteableType() { return this.noteableData.noteableType; @@ -83,7 +84,7 @@ export default { return this.discussions; }, canReply() { - return this.getNoteableData.current_user.can_create_note && !this.commentsDisabled; + return this.userCanReply && !this.commentsDisabled; }, }, watch: { |