diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-24 14:07:28 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-24 14:07:28 -0500 |
commit | 35ea254c92de7fa315474bfc36c3e4a788dd8b41 (patch) | |
tree | 08b33fd8bd2fdeca2793df90fce5dc53c13bc7e2 | |
parent | 5049cbdbd208fe01e466349fb2b4d3c9292071b2 (diff) | |
download | gitlab-ce-35ea254c92de7fa315474bfc36c3e4a788dd8b41.tar.gz |
Add data-test=page for testing pagination pages in admin abuse reports spec
-rw-r--r-- | app/views/kaminari/gitlab/_page.html.haml | 2 | ||||
-rw-r--r-- | spec/features/admin/admin_abuse_reports_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/kaminari/gitlab/_page.html.haml b/app/views/kaminari/gitlab/_page.html.haml index 8edf26295e1..b3ed43df1be 100644 --- a/app/views/kaminari/gitlab/_page.html.haml +++ b/app/views/kaminari/gitlab/_page.html.haml @@ -6,5 +6,5 @@ -# total_pages: total number of pages -# per_page: number of items to fetch per page -# remote: data-remote -%li.page-item{ class: [active_when(page.current?), ('sibling' if page.next? || page.prev?)] } +%li.page-item{ class: [active_when(page.current?), ('sibling' if page.next? || page.prev?)], data: { test: 'page' } } = link_to page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil, class: 'page-link' } diff --git a/spec/features/admin/admin_abuse_reports_spec.rb b/spec/features/admin/admin_abuse_reports_spec.rb index 766cd4b0090..657d556cb30 100644 --- a/spec/features/admin/admin_abuse_reports_spec.rb +++ b/spec/features/admin/admin_abuse_reports_spec.rb @@ -45,7 +45,7 @@ describe "Admin::AbuseReports", :js 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) + expect(page).to have_selector('.pagination [data-test=page]', count: (report_count.to_f / AbuseReport.default_per_page).ceil) end end end |