diff options
author | Alex Groleau <agroleau@gitlab.com> | 2019-08-27 12:41:39 -0400 |
---|---|---|
committer | Alex Groleau <agroleau@gitlab.com> | 2019-08-27 12:41:39 -0400 |
commit | aa01f092829facd1044ad02f334422b7dbdc8b0e (patch) | |
tree | a754bf2497820432df7da0f2108bb7527a8dd7b8 /spec/features/merge_request/user_posts_diff_notes_spec.rb | |
parent | a1d9c9994a9a4d79b824c3fd9322688303ac8b03 (diff) | |
parent | 6b10779053ff4233c7a64c5ab57754fce63f6710 (diff) | |
download | gitlab-ce-runner-metrics-extractor.tar.gz |
Merge branch 'master' of gitlab_gitlab:gitlab-org/gitlab-cerunner-metrics-extractor
Diffstat (limited to 'spec/features/merge_request/user_posts_diff_notes_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_posts_diff_notes_spec.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb index 19edce1b562..abae6ffbd71 100644 --- a/spec/features/merge_request/user_posts_diff_notes_spec.rb +++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' describe 'Merge request > User posts diff notes', :js do @@ -66,12 +68,12 @@ describe 'Merge request > User posts diff notes', :js do context 'with a match line' do it 'does not allow commenting on the left side' do line_holder = find('.match', match: :first).find(:xpath, '..') - should_not_allow_commenting(line_holder, 'left') + match_should_not_allow_commenting(line_holder) end it 'does not allow commenting on the right side' do line_holder = find('.match', match: :first).find(:xpath, '..') - should_not_allow_commenting(line_holder, 'right') + match_should_not_allow_commenting(line_holder) end end @@ -134,7 +136,7 @@ describe 'Merge request > User posts diff notes', :js do context 'with a match line' do it 'does not allow commenting' do - should_not_allow_commenting(find('.match', match: :first)) + match_should_not_allow_commenting(find('.match', match: :first)) end end @@ -220,7 +222,7 @@ describe 'Merge request > User posts diff notes', :js do context 'with a match line' do it 'does not allow commenting' do - should_not_allow_commenting(find('.match', match: :first)) + match_should_not_allow_commenting(find('.match', match: :first)) end end end @@ -249,6 +251,10 @@ describe 'Merge request > User posts diff notes', :js do expect(line[:num]).not_to have_css comment_button_class end + def match_should_not_allow_commenting(line_holder) + expect(line_holder).not_to have_css comment_button_class + end + def write_comment_on_line(line_holder, diff_side) click_diff_line(line_holder, diff_side) |