Sha256: 9e95265bb7f21c9c5138b22adffebb5a3de9ae21826d493632457e4ad7e67f64

Contents?: true

Size: 1.25 KB

Versions: 88

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

RSpec.describe "Alternate Controller Behaviors" do
  it "has the correct per-page form" do
    visit search_alternate_path
    expect(page).to have_selector("form[action='#{search_alternate_url}']")
    fill_in "q", with: "history"
    click_button 'search'
    expect(current_path).to match /#{search_alternate_path}/
    within "#per_page-dropdown .dropdown-menu" do
      click_on '10 per page'
    end
    expect(current_path).to match /#{search_alternate_path}/
  end

  it "has the correct search field form" do
    visit search_alternate_path
    expect(page).to have_selector("form[action='#{search_alternate_url}']")
    fill_in "q", with: "history"
    click_button 'search'
    expect(current_path).to match /#{search_alternate_path}/
    click_on 'relevance'
    expect(current_path).to match /#{search_alternate_path}/
  end

  it "displays document thumbnails" do
    visit search_alternate_path
    expect(page).to have_selector("form[action='#{search_alternate_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

88 entries across 88 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/features/alternate_controller_spec.rb
blacklight-7.39.0 spec/features/alternate_controller_spec.rb
blacklight-7.38.0 spec/features/alternate_controller_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/features/alternate_controller_spec.rb
blacklight-8.2.2 spec/features/alternate_controller_spec.rb
blacklight-8.2.1 spec/features/alternate_controller_spec.rb
blacklight-8.2.0 spec/features/alternate_controller_spec.rb
blacklight-7.37.0 spec/features/alternate_controller_spec.rb
blacklight-7.36.2 spec/features/alternate_controller_spec.rb
blacklight-7.36.1 spec/features/alternate_controller_spec.rb
blacklight-7.36.0 spec/features/alternate_controller_spec.rb
blacklight-7.35.0 spec/features/alternate_controller_spec.rb
blacklight-8.1.0 spec/features/alternate_controller_spec.rb
blacklight-7.34.0 spec/features/alternate_controller_spec.rb
blacklight-8.0.1 spec/features/alternate_controller_spec.rb
blacklight-8.0.0 spec/features/alternate_controller_spec.rb
blacklight-8.0.0.beta8 spec/features/alternate_controller_spec.rb
blacklight-8.0.0.beta7 spec/features/alternate_controller_spec.rb
blacklight-8.0.0.beta6 spec/features/alternate_controller_spec.rb
blacklight-8.0.0.beta5 spec/features/alternate_controller_spec.rb