Sha256: 20ff3d50d89e99f6e29d8e63cec5f4e687377a6f2891e5927c13e59a1f951bae

Contents?: true

Size: 1.22 KB

Versions: 18

Compression:

Stored size: 1.22 KB

Contents

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

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-0.28.3 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.28.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.28.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.28.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.27.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.26.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.26.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.25.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.24.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.23.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.22.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.21.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.20.3 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.20.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.20.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.20.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.19.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.19.1 spec/features/javascript/blocks/search_result_block_spec.rb