diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-17 14:01:31 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-17 14:01:31 +0200 |
commit | 834f1b30d50dc3ad9d0f6ff81cef24dc6ebc375c (patch) | |
tree | e5f2e714e695d995649942111f29d4e857b33a67 /spec/support/features | |
parent | 6aeb99c98bee304c5010a1173c47777eff1e04a5 (diff) | |
parent | fe0ffcc78941bf9de98e3698e743c3cbb9846b6a (diff) | |
download | gitlab-ce-834f1b30d50dc3ad9d0f6ff81cef24dc6ebc375c.tar.gz |
Merge branch 'master' into issue-discussions-refactor
# Conflicts:
# package.json
# spec/support/features/reportable_note_shared_examples.rb
Diffstat (limited to 'spec/support/features')
-rw-r--r-- | spec/support/features/reportable_note_shared_examples.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/support/features/reportable_note_shared_examples.rb b/spec/support/features/reportable_note_shared_examples.rb index e2158b8ed34..4d7d23f0341 100644 --- a/spec/support/features/reportable_note_shared_examples.rb +++ b/spec/support/features/reportable_note_shared_examples.rb @@ -7,22 +7,25 @@ shared_examples 'reportable note' do |type| let(:more_actions_selector) { '.more-actions.dropdown' } let(:abuse_report_path) { new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) } + it 'has an edit button' do + expect(comment).to have_selector('.js-note-edit') + end + it 'has a `More actions` dropdown' do expect(comment).to have_selector(more_actions_selector) end - it 'dropdown has Edit, Report and Delete links' do + it 'dropdown has Report and Delete links' do dropdown = comment.find(more_actions_selector) open_dropdown(dropdown) + expect(dropdown).to have_link('Report as abuse', href: abuse_report_path) + if type == 'issue' expect(dropdown).to have_button('Delete comment') else - expect(dropdown).to have_link('Delete comment') + expect(dropdown).to have_link('Delete comment', href: note_url(note, project)) end - - expect(dropdown).to have_button('Edit comment') - expect(dropdown).to have_link('Report as abuse', href: abuse_report_path) end it 'Report button links to a report page' do |