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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 21:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 21:09:05 +0300
commit883d5720994852248f18cb3053dc9f053f28d6f9 (patch)
tree409c976ddc659f34afaae3b2e97f1d0325f6455c /spec/features/abuse_report_spec.rb
parent5e97da08cba997aefba6f6d13850f95536a80477 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/abuse_report_spec.rb')
-rw-r--r--spec/features/abuse_report_spec.rb36
1 files changed, 31 insertions, 5 deletions
diff --git a/spec/features/abuse_report_spec.rb b/spec/features/abuse_report_spec.rb
index fdd11b59938..87236530046 100644
--- a/spec/features/abuse_report_spec.rb
+++ b/spec/features/abuse_report_spec.rb
@@ -2,17 +2,43 @@
require 'spec_helper'
-RSpec.describe 'Abuse reports', feature_category: :not_owned do
- let(:another_user) { create(:user) }
+RSpec.describe 'Abuse reports', feature_category: :insider_threat do
+ let_it_be(:another_user) { create(:user) }
+
+ let_it_be(:project) { create(:project, :public) }
+ let_it_be(:issue) { create(:issue, project: project, author: another_user) }
before do
sign_in(create(:user))
end
- it 'report abuse' do
+ it 'report abuse from an issue', :js do
+ visit project_issue_path(project, issue)
+
+ click_button 'Issue actions'
+ click_link 'Report abuse to administrator'
+
+ wait_for_requests
+
+ fill_in 'abuse_report_message', with: 'This user sends spam'
+ click_button 'Send report'
+
+ expect(page).to have_content 'Thank you for your report'
+
visit user_path(another_user)
- click_link 'Report abuse'
+ expect(page).to have_button('Already reported for abuse')
+ end
+
+ it 'report abuse from profile', :js do
+ visit user_path(another_user)
+
+ click_button 'Report abuse to administrator'
+
+ choose "They're posting spam."
+ click_button 'Next'
+
+ wait_for_requests
fill_in 'abuse_report_message', with: 'This user sends spam'
click_button 'Send report'
@@ -21,6 +47,6 @@ RSpec.describe 'Abuse reports', feature_category: :not_owned do
visit user_path(another_user)
- expect(page).to have_button("Already reported for abuse")
+ expect(page).to have_button('Already reported for abuse')
end
end