diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-01 13:17:18 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-01 13:17:18 +0000 |
commit | 96c2e22549917a32bae03c3c1e850a3225049239 (patch) | |
tree | 869c8d9fb86beb3306a9cad7fa1fdc0345dd934c /features | |
parent | 114853063b3a1747acfe96fa8c8159f4779e291c (diff) | |
parent | ea72d53ec083676ee1171e97c0869132f360d0c9 (diff) | |
download | gitlab-ce-96c2e22549917a32bae03c3c1e850a3225049239.tar.gz |
Merge branch 'disable-report-button-if-already-reported' into 'master'
Disable the "Report abuse" button if a user has already been reported
Hello,
I've implemented the feature request #2330. Here is what it looks like:

I hope that's an acceptable solution.
cc @DouweM
See merge request !1456
Diffstat (limited to 'features')
-rw-r--r-- | features/abuse_report.feature | 7 | ||||
-rw-r--r-- | features/steps/abuse_reports.rb | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/features/abuse_report.feature b/features/abuse_report.feature index 3e1cb455b77..212972a762a 100644 --- a/features/abuse_report.feature +++ b/features/abuse_report.feature @@ -8,3 +8,10 @@ Feature: Abuse reports And I click "Report abuse" button When I fill and submit abuse form Then I should see success message + + Scenario: Report abuse available only once + Given I visit "Mike" user page + And I click "Report abuse" button + When I fill and submit abuse form + And I visit "Mike" user page + Then I should see a red "Report abuse" button diff --git a/features/steps/abuse_reports.rb b/features/steps/abuse_reports.rb index 8f9ddb2899f..56652ff6f05 100644 --- a/features/steps/abuse_reports.rb +++ b/features/steps/abuse_reports.rb @@ -22,6 +22,10 @@ class Spinach::Features::AbuseReports < Spinach::FeatureSteps user_mike end + step 'I should see a red "Report abuse" button' do + expect(find(:css, '.report_abuse')).to have_selector(:css, 'span.btn-close') + end + def user_mike @user_mike ||= create(:user, name: 'Mike') end |