Sha256: 2f3e451cf53d24cd21992d4a63b00a3be2c03a233a0652d7160446b95cadcf80

Contents?: true

Size: 1.25 KB

Versions: 23

Compression:

Stored size: 1.25 KB

Contents

require 'spec_helper'

describe 'Search Result Block', type: :feature, js: true do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  let(:exhibit_curator) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) }

  let!(:feature_page) { FactoryGirl.create(:feature_page, exhibit: exhibit) }
  let!(:alt_search) { FactoryGirl.create(:search, title: 'Alt. Search', exhibit: exhibit) }

  before do
    login_as exhibit_curator

    exhibit.searches.each { |x| x.update published: true }

    visit spotlight.edit_exhibit_feature_page_path(exhibit, feature_page)
    add_widget 'search_results'
  end

  it 'allows a curator to select from existing browse categories' do
    fill_in_typeahead_field with: 'All Exhibit Items'

    check 'Gallery'
    check 'Slideshow'

    save_page

    expect(page).not_to have_content 'per page'
    expect(page).not_to have_content 'Sort by'

    # The two configured view types should be
    # present and the one not selected should not be
    within('.view-type-group') do
      expect(page).not_to have_css('.view-type-list')
      expect(page).to have_css('.view-type-gallery')
      expect(page).to have_css('.view-type-slideshow')
    end

    # Documents should exist
    expect(page).to have_css('.documents .document')
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-spotlight-0.19.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.18.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.17.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.17.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.16.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.15.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.14.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.14.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.14.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.13.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.12.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.12.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.11.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.10.3 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.10.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.10.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.10.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.9.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.9.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.9.0 spec/features/javascript/blocks/search_result_block_spec.rb