diff options
author | Samantha Ming <sming@gitlab.com> | 2019-06-27 10:42:18 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-27 10:42:18 +0300 |
commit | 0e701c1304c8ebe1b7f382713c4f7c022560019c (patch) | |
tree | d898d698ccd7ee6e0518df3516fa5ba2c09e736c /spec | |
parent | ec5137f65a558d2a8e3884729ee46f9b91f627a9 (diff) |
Fix incorrect reaction placement in commit diff discussion
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/discussion_comments/commit_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/discussion_comments/commit_spec.rb b/spec/features/discussion_comments/commit_spec.rb index 7a3b1d7ed47..ea720cee74e 100644 --- a/spec/features/discussion_comments/commit_spec.rb +++ b/spec/features/discussion_comments/commit_spec.rb @@ -6,6 +6,8 @@ describe 'Discussion Comments Commit', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } + let!(:commit_discussion_note1) { create(:discussion_note_on_commit, project: project) } + let!(:commit_discussion_note2) { create(:discussion_note_on_commit, in_reply_to: commit_discussion_note1) } before do project.add_maintainer(user) @@ -15,4 +17,18 @@ describe 'Discussion Comments Commit', :js do end it_behaves_like 'discussion comments', 'commit' + + it 'has class .js-note-emoji' do + expect(page).to have_css('.js-note-emoji') + end + + it 'adds award to the correct note' do + find("#note_#{commit_discussion_note2.id} .js-note-emoji").click + first('.emoji-menu .js-emoji-btn').click + + wait_for_requests + + expect(find("#note_#{commit_discussion_note1.id}")).not_to have_css('.js-awards-block') + expect(find("#note_#{commit_discussion_note2.id}")).to have_css('.js-awards-block') + end end |