Sha256: 2c6ff9d7e5563e14deed0698c2a9435e461d45b98545c539ba4d4559d13ad106

Contents?: true

Size: 1.32 KB

Versions: 14

Compression:

Stored size: 1.32 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

  pending 'allows a curator to select from existing browse categories' do
    pending('Prefetched autocomplete does not work the same way as solr-backed autocompletes')
    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

14 entries across 14 versions & 1 rubygems

Version Path
blacklight-spotlight-1.0.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.34.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.34.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.33.3 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.33.2 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.33.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.33.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.32.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.31.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.30.0 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.29.1 spec/features/javascript/blocks/search_result_block_spec.rb
blacklight-spotlight-0.29.0 spec/features/javascript/blocks/search_result_block_spec.rb