Sha256: 95d229845c8815817f51c0e91a25e99a7964b123a0311ef6f70eb19e76cd1bb4

Contents?: true

Size: 1.57 KB

Versions: 24

Compression:

Stored size: 1.57 KB

Contents

describe 'Catalog', type: :feature do
  let(:exhibit) { FactoryBot.create(:exhibit) }

  describe 'admin' do
    let(:curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }

    before do
      login_as curator
      d = SolrDocument.new(id: 'dq287tq6352')
      d.make_private! exhibit
      d.reindex
      Blacklight.default_index.connection.commit
    end

    after do
      d = SolrDocument.new(id: 'dq287tq6352')
      d.make_public! exhibit
      d.reindex
      Blacklight.default_index.connection.commit
    end

    it "has a 'Item Visiblity' facet" do
      visit spotlight.search_exhibit_catalog_path(exhibit)
      expect(page).to have_selector '.panel-title', text: 'Item Visibility'
    end
  end

  it 'has breadcrumbs' do
    visit spotlight.search_exhibit_catalog_path(exhibit, q: 'xyz')
    expect(page).to have_breadcrumbs 'Home', 'Search Results'
  end

  describe 'Non-spotlight #show' do
    it 'is able to render without exhibit context' do
      visit solr_document_path('dq287tq6352')
      expect(page).to have_css 'h1', text: "L'AMERIQUE"
    end
  end

  describe 'viewing the page' do
    let(:exhibit) { FactoryBot.create(:exhibit) }
    it 'has <meta> tags' do
      TopHat.current['twitter_card'] = nil
      TopHat.current['opengraph'] = nil

      visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')

      expect(page).to have_css "meta[name='twitter:title']", visible: false
      expect(page).to have_css "meta[property='og:site_name']", visible: false
      expect(page).to have_css "meta[property='og:title']", visible: false
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/features/catalog_spec.rb
blacklight-spotlight-2.4.0 spec/features/catalog_spec.rb
blacklight-spotlight-2.3.3 spec/features/catalog_spec.rb
blacklight-spotlight-2.3.2 spec/features/catalog_spec.rb
blacklight-spotlight-2.3.1 spec/features/catalog_spec.rb
blacklight-spotlight-2.3.0 spec/features/catalog_spec.rb
blacklight-spotlight-2.2.1 spec/features/catalog_spec.rb
blacklight-spotlight-2.2.0 spec/features/catalog_spec.rb
blacklight-spotlight-2.1.0 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.2 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.1 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/features/catalog_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/features/catalog_spec.rb
blacklight-spotlight-1.5.1 spec/features/catalog_spec.rb
blacklight-spotlight-1.4.1 spec/features/catalog_spec.rb