spec/features/search_pagination_spec.rb in blacklight-7.0.0.rc1 vs spec/features/search_pagination_spec.rb in blacklight-7.0.0.rc2
- old
+ new
@@ -11,11 +11,10 @@
expect(page).to have_link('10')
expect(page).to have_link('20')
expect(page).to have_link('50')
expect(page).to have_link('100')
end
-
end
within '#sortAndPerPage' do
click_link "Next ยป"
end
within "#sortAndPerPage" do
@@ -44,17 +43,20 @@
end
describe "when the application is configured for other per page values" do
let!(:original_per_page) { CatalogController.blacklight_config[:per_page] }
let!(:original_rows) { CatalogController.blacklight_config[:default_solr_params][:rows] }
+
before do
CatalogController.blacklight_config[:per_page] = [15, 30]
CatalogController.blacklight_config[:default_solr_params][:rows] = 15
end
+
after do
CatalogController.blacklight_config[:per_page] = original_per_page
CatalogController.blacklight_config[:default_solr_params][:rows] = original_rows
end
+
it "uses the configured values" do
visit root_path
fill_in "q", with: ''
click_button 'search'
within ("#sortAndPerPage") do