Commit b53c9a0a authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Felipe Artur

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

Restore pagination to admin abuse reports

Closes #28059

See merge request !9233
parent 8f142a7a
......@@ -12,6 +12,7 @@
%th.wide Message
%th Action
= render @abuse_reports
= paginate @abuse_reports, theme: 'gitlab'
- else
.empty-state
.text-center
......
---
title: Restore pagination to admin abuse reports
merge_request:
author:
......@@ -30,5 +30,24 @@ describe "Admin::AbuseReports", feature: true, js: true do
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
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