Sha256: 52639d085cf04beaeb9d7e58ef5cfef6630bbbd470f1424f7e20974ce628059e

Contents?: true

Size: 1.18 KB

Versions: 11

Compression:

Stored size: 1.18 KB

Contents

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}']")
    fill_in "q", :with=>"history"
    click_button 'search'
    expect(current_path).to match /#{alternate_index_path}/
    click_on '10 per page'
    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}']")
    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}']")
    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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-4.7.0 spec/features/alternate_controller_spec.rb
blacklight-4.7.0.pre1 spec/features/alternate_controller_spec.rb
blacklight-4.6.3 spec/features/alternate_controller_spec.rb
blacklight-4.6.2 spec/features/alternate_controller_spec.rb
blacklight-4.6.1 spec/features/alternate_controller_spec.rb
blacklight-4.6.0 spec/features/alternate_controller_spec.rb
blacklight-4.5.0 spec/features/alternate_controller_spec.rb
blacklight-4.5.0.rc1 spec/features/alternate_controller_spec.rb
blacklight-4.4.2 spec/features/alternate_controller_spec.rb
blacklight-4.4.1 spec/features/alternate_controller_spec.rb
blacklight-4.4.0 spec/features/alternate_controller_spec.rb