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:
authorRémy Coutable <remy@rymai.me>2015-09-28 17:00:53 +0300
committerrymai <remy@rymai.me>2015-09-29 22:11:51 +0300
commit5f95a5e070c76c582a2b394377b0f350f4b1cff9 (patch)
tree94ae75916155f0337b8981cab1d04e563c8e24af /features
parent10c036fcf59297663fd1121f7b48d1a289a2e312 (diff)
Disable the "Report abuse" button if a user has already been reported
Diffstat (limited to 'features')
-rw-r--r--features/abuse_report.feature7
-rw-r--r--features/steps/abuse_reports.rb5
2 files changed, 12 insertions, 0 deletions
diff --git a/features/abuse_report.feature b/features/abuse_report.feature
index 3e1cb455b77..fc80f0aa399 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 not see the "Remove abuse" dropdown / button
diff --git a/features/steps/abuse_reports.rb b/features/steps/abuse_reports.rb
index 8f9ddb2899f..623807dac82 100644
--- a/features/steps/abuse_reports.rb
+++ b/features/steps/abuse_reports.rb
@@ -22,6 +22,11 @@ class Spinach::Features::AbuseReports < Spinach::FeatureSteps
user_mike
end
+ step 'I should not see the "Remove abuse" dropdown / button' do
+ expect(find(:css, '#report_abuse')).not_to have_selector(:css, 'ul.dropdown-menu')
+ expect(find(:css, '#report_abuse')).to have_selector(:css, '.btn-close')
+ end
+
def user_mike
@user_mike ||= create(:user, name: 'Mike')
end