Replace data-test=page with .js-pagination-page

This commit is contained in:
Clement Ho 2018-05-24 15:18:18 -05:00
parent 33b787ee81
commit e512ea96ae
3 changed files with 3 additions and 3 deletions

View file

@ -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?)], data: { test: 'page' } }
%li.page-item.js-pagination-page{ class: [active_when(page.current?), ('sibling' if page.next? || page.prev?)] }
= link_to page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil, class: 'page-link' }

View file

@ -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 [data-test=page]', count: (report_count.to_f / AbuseReport.default_per_page).ceil)
expect(page).to have_selector('.pagination.js-pagination-page', count: (report_count.to_f / AbuseReport.default_per_page).ceil)
end
end
end

View file

@ -246,7 +246,7 @@ feature 'Dashboard Todos' do
it 'is has the right number of pages' do
visit dashboard_todos_path
expect(page).to have_selector('.gl-pagination [data-test=page]', count: 2)
expect(page).to have_selector('.gl-pagination.js-pagination-page', count: 2)
end
describe 'mark all as done', :js do