Commit 416b94f2 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch '28059-add-pagination-to-admin-abuse-reports' into 'master'

Restore pagination to admin abuse reports

Closes #28059

See merge request !9233
parents cee957f5 ae69e876
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
%th.wide Message %th.wide Message
%th Action %th Action
= render @abuse_reports = render @abuse_reports
= paginate @abuse_reports, theme: 'gitlab'
- else - else
.empty-state .empty-state
.text-center .text-center
......
---
title: Restore pagination to admin abuse reports
merge_request:
author:
...@@ -30,5 +30,24 @@ describe "Admin::AbuseReports", feature: true, js: true do ...@@ -30,5 +30,24 @@ describe "Admin::AbuseReports", feature: true, js: true do
end end
end end
end end
describe 'if a many users have been reported for abuse' do
let(:report_count) { AbuseReport.default_per_page + 3 }
before do
report_count.times do
create(:abuse_report, user: create(:user))
end
end
describe 'in the abuse report view' do
it 'presents information about abuse report' do
visit admin_abuse_reports_path
expect(page).to have_selector('.pagination')
expect(page).to have_selector('.pagination .page', count: (report_count.to_f / AbuseReport.default_per_page).ceil)
end
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment