Sha256: 68fe2ba39eacccbc256bcad467fdacf4f8daf712fb9cd3364f8a8c43bfdc9ac2

Contents?: true

Size: 1.25 KB

Versions: 34

Compression:

Stored size: 1.25 KB

Contents

require 'spec_helper'

describe "Alternate Controller Behaviors" do
  it "should have the correct per-page form" do
    visit alternate_index_path
    expect(page).to have_selector("form[action='#{alternate_index_url}']")
    fill_in "q", :with=>"history"
    click_button 'search'
    expect(current_path).to match /#{alternate_index_path}/
    within "#per_page-dropdown .dropdown-menu" do
      click_on '10 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
    expect(page).to have_selector("form[action='#{alternate_index_url}']")
    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
    expect(page).to have_selector("form[action='#{alternate_index_url}']")
    fill_in "q", :with=>"history"
    click_button 'search'
    expect(page).to have_selector ".document-thumbnail"
    expect(page).to have_selector ".document-thumbnail a[data-context-href]"
    expect(page).to have_selector ".document-thumbnail a img"
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
blacklight-5.19.2 spec/features/alternate_controller_spec.rb
blacklight-5.19.1 spec/features/alternate_controller_spec.rb
blacklight-5.19.0 spec/features/alternate_controller_spec.rb
blacklight-5.18.0 spec/features/alternate_controller_spec.rb
blacklight-5.17.2 spec/features/alternate_controller_spec.rb
blacklight-5.17.1 spec/features/alternate_controller_spec.rb
blacklight-5.17.0 spec/features/alternate_controller_spec.rb
blacklight-5.16.4 spec/features/alternate_controller_spec.rb
blacklight-5.16.3 spec/features/alternate_controller_spec.rb
blacklight-5.16.2 spec/features/alternate_controller_spec.rb
blacklight-5.16.1 spec/features/alternate_controller_spec.rb
blacklight-5.16.0 spec/features/alternate_controller_spec.rb
blacklight-5.15.0 spec/features/alternate_controller_spec.rb
blacklight-5.14.0 spec/features/alternate_controller_spec.rb
blacklight-5.13.1 spec/features/alternate_controller_spec.rb
blacklight-5.13.0 spec/features/alternate_controller_spec.rb
blacklight-5.11.3 spec/features/alternate_controller_spec.rb
blacklight-5.12.1 spec/features/alternate_controller_spec.rb
blacklight-5.12.0 spec/features/alternate_controller_spec.rb
blacklight-5.10.3 spec/features/alternate_controller_spec.rb