diff options
author | Phil Hughes <me@iamphill.com> | 2019-06-14 14:01:24 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-14 14:01:24 +0100 |
commit | d2fd6bd51036be836c2c793e2bd7a503c7ad9030 (patch) | |
tree | fe86f4b3dca7f33ec37be2c75ea061afafcdb4fe /spec/features/merge_request | |
parent | 577832598f1b35187efafc426068ef7ac36ae09f (diff) | |
download | gitlab-ce-d2fd6bd51036be836c2c793e2bd7a503c7ad9030.tar.gz |
Added diff suggestion popover
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56523
Diffstat (limited to 'spec/features/merge_request')
-rw-r--r-- | spec/features/merge_request/user_posts_notes_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/merge_request/user_suggests_changes_on_diff_spec.rb | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/spec/features/merge_request/user_posts_notes_spec.rb b/spec/features/merge_request/user_posts_notes_spec.rb index e5770905dbd..8ff24449b39 100644 --- a/spec/features/merge_request/user_posts_notes_spec.rb +++ b/spec/features/merge_request/user_posts_notes_spec.rb @@ -141,7 +141,7 @@ describe 'Merge request > User posts notes', :js do page.within('.current-note-edit-form') do expect(find('#note_note').value).to eq('This is the new content') - find('.js-md:first-child').click + first('.js-md').click expect(find('#note_note').value).to eq('This is the new content****') end end diff --git a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb index 780de76d2c5..e8b4fc8f160 100644 --- a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb +++ b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb @@ -28,6 +28,18 @@ describe 'User comments on a diff', :js do end context 'single suggestion note' do + it 'hides suggestion popover' do + click_diff_line(find("[id='#{sample_compare.changes[1][:line_code]}']")) + + expect(page).to have_selector('.diff-suggest-popover') + + page.within('.diff-suggest-popover') do + click_button 'Got it' + end + + expect(page).not_to have_selector('.diff-suggest-popover') + end + it 'suggestion is presented' do click_diff_line(find("[id='#{sample_compare.changes[1][:line_code]}']")) |