spec/features/search_pagination_spec.rb in blacklight-4.7.0 vs spec/features/search_pagination_spec.rb in blacklight-4.8.0

- old
+ new

@@ -14,16 +14,18 @@ expect(page).to have_link('50') expect(page).to have_link('100') end end - click_link "Next »" - within ("#sortAndPerPage") do + within '#sortAndPerPage' do + click_link "Next »" + end + within "#sortAndPerPage" do expect(page).to have_content "11 - 20 of " + click_link "« Previous" end - click_link "« Previous" - within ("#sortAndPerPage") do + within "#sortAndPerPage" do expect(page).to have_content "1 - 10 of " end end it "should be able to change the number of items per page" do @@ -75,17 +77,19 @@ it "should reset the page offset to 1 when changing per page" do visit root_path fill_in "q", with: '' click_button 'search' - click_link "Next »" - within ("#sortAndPerPage") do + within "#sortAndPerPage" do + click_link "Next »" + end + within "#sortAndPerPage" do expect(page).to have_content "11 - 20 of " end within ("#per_page-dropdown") do click_link '20' end - within ("#sortAndPerPage") do + within "#sortAndPerPage" do expect(page).to have_content "1 - 20 of " end end end