diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-06-07 21:33:50 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-06-07 21:33:50 +0300 |
commit | 32cac597275706930b221b19fb20b29ccebc7130 (patch) | |
tree | eff1772526935597f6539eec340d0c29f0049fc7 /features/steps | |
parent | 8bd232d43bb2c0c8d5b5b4e92609adcfbda9a008 (diff) |
Added more actions and report as abuse to all notes
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/merge_requests.rb | 6 | ||||
-rw-r--r-- | features/steps/shared/note.rb | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 7f1e9e693af..ce6d1a6b8d0 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -297,6 +297,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I change the comment "Line is wrong" to "Typo, please fix" on diff' do page.within('.diff-file:nth-of-type(5) .note') do + find('.more-actions').click + find('.more-actions .dropdown-menu li', match: :first) + find('.js-note-edit').click page.within('.current-note-edit-form', visible: true) do @@ -322,6 +325,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I delete the comment "Line is wrong" on diff' do page.within('.diff-file:nth-of-type(5) .note') do + find('.more-actions').click + find('.more-actions .dropdown-menu li', match: :first) + find('.js-note-delete').click end end diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb index 44eb8f321dd..80187b83fee 100644 --- a/features/steps/shared/note.rb +++ b/features/steps/shared/note.rb @@ -8,7 +8,12 @@ module SharedNote step 'I delete a comment' do page.within('.main-notes-list') do - find('.note').hover + note = find('.note') + note.hover + + note.find('.more-actions').click + note.find('.more-actions .dropdown-menu li', match: :first) + find(".js-note-delete").click end end @@ -139,8 +144,13 @@ module SharedNote step 'I edit the last comment with a +1' do page.within(".main-notes-list") do - find(".note").hover - find('.js-note-edit').click + note = find('.note') + note.hover + + note.find('.more-actions').click + note.find('.more-actions .dropdown-menu li', match: :first) + + note.find('.js-note-edit').click end page.within(".current-note-edit-form") do |