spec/features/alternate_controller_spec.rb in blacklight-4.7.0 vs spec/features/alternate_controller_spec.rb in blacklight-4.8.0
- old
+ new
@@ -1,34 +1,36 @@
require 'spec_helper'
describe "Alternate Controller Behaviors" do
it "should have the correct per-page form" do
visit alternate_index_path
- page.should have_selector("form[action='#{alternate_index_path}']")
+ expect(page).to have_selector("form[action='#{alternate_index_path}']")
fill_in "q", :with=>"history"
click_button 'search'
expect(current_path).to match /#{alternate_index_path}/
- click_on '10 per page'
+ within ("#per_page-dropdown") do
+ click_link '20 per page'
+ end
expect(current_path).to match /#{alternate_index_path}/
end
it "should have the correct search field form" do
visit alternate_index_path
- page.should have_selector("form[action='#{alternate_index_path}']")
+ expect(page).to have_selector("form[action='#{alternate_index_path}']")
fill_in "q", :with=>"history"
click_button 'search'
expect(current_path).to match /#{alternate_index_path}/
click_on 'relevance'
expect(current_path).to match /#{alternate_index_path}/
end
it "should display document thumbnails" do
visit alternate_index_path
- page.should have_selector("form[action='#{alternate_index_path}']")
+ expect(page).to have_selector("form[action='#{alternate_index_path}']")
fill_in "q", :with=>"history"
click_button 'search'
expect(page).to have_selector ".document-thumbnail"
expect(page).to have_selector ".document-thumbnail a[data-counter]"
expect(page).to have_selector ".document-thumbnail a img"
end
-end
\ No newline at end of file
+end