Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-01 16:17:18 +0300
committerDouwe Maan <douwe@gitlab.com>2015-10-01 16:17:18 +0300
commit96c2e22549917a32bae03c3c1e850a3225049239 (patch)
tree869c8d9fb86beb3306a9cad7fa1fdc0345dd934c /features
parent114853063b3a1747acfe96fa8c8159f4779e291c (diff)
parentea72d53ec083676ee1171e97c0869132f360d0c9 (diff)
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: ![report-abuse-button-disabled](https://gitlab.com/rymai/gitlab-ce/uploads/420d51906eac1c40c50701a0a340474f/report-abuse-button-disabled.png) I hope that's an acceptable solution. cc @DouweM See merge request !1456
Diffstat (limited to 'features')
-rw-r--r--features/abuse_report.feature7
-rw-r--r--features/steps/abuse_reports.rb4
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