diff options
author | Valery Sizov <valery@gitlab.com> | 2015-08-07 10:33:30 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-08-07 10:33:30 +0300 |
commit | 8e067b6ab4c136a208065d05216b4828d26368ab (patch) | |
tree | bb7ba309dcdcbb7622f359e000ca576da06f3c5f /features/steps | |
parent | 55011aac4702d54a9907a3f7f4d0a21d9ff94b8a (diff) | |
parent | ec19c6a9e7b9e74b834802a5948e288c53f355a8 (diff) |
Merge branch 'update_7-13-stable' into '7-13-stable'
Update 7-13-stable with 7.13.4
See merge request !1113
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/abuse_reports.rb | 28 | ||||
-rw-r--r-- | features/steps/admin/abuse_reports.rb | 15 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 4 |
3 files changed, 47 insertions, 0 deletions
diff --git a/features/steps/abuse_reports.rb b/features/steps/abuse_reports.rb new file mode 100644 index 00000000000..8f9ddb2899f --- /dev/null +++ b/features/steps/abuse_reports.rb @@ -0,0 +1,28 @@ +class Spinach::Features::AbuseReports < Spinach::FeatureSteps + include SharedAuthentication + + step 'I visit "Mike" user page' do + visit user_path(user_mike) + end + + step 'I click "Report abuse" button' do + click_link 'Report abuse' + end + + step 'I fill and submit abuse form' do + fill_in 'abuse_report_message', with: 'This user send spam' + click_button 'Send report' + end + + step 'I should see success message' do + page.should have_content 'Thank you for your report' + end + + step 'user "Mike" exists' do + user_mike + end + + def user_mike + @user_mike ||= create(:user, name: 'Mike') + end +end diff --git a/features/steps/admin/abuse_reports.rb b/features/steps/admin/abuse_reports.rb new file mode 100644 index 00000000000..0149416c919 --- /dev/null +++ b/features/steps/admin/abuse_reports.rb @@ -0,0 +1,15 @@ +class Spinach::Features::AdminAbuseReports < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + + step 'I should see list of abuse reports' do + page.should have_content("Abuse Reports") + page.should have_content AbuseReport.first.message + page.should have_link("Remove user") + end + + step 'abuse reports exist' do + create(:abuse_report) + end +end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 88a98a37807..bb0cd9ac105 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -139,6 +139,10 @@ module SharedPaths visit admin_root_path end + step 'I visit abuse reports page' do + visit admin_abuse_reports_path + end + step 'I visit admin projects page' do visit admin_namespaces_projects_path end |