Sha256: dc99e3f793265151221a79623b96bc384a7ae86863beb6b25b50f5a8a651951a

Contents?: true

Size: 1.1 KB

Versions: 59

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'

feature 'Catalog index page' do
  let!(:work) { create(:public_generic_work, title: ['My Work']) }
  let!(:coll) { create(:collection, :public, title: ['My Collection']) }

  scenario 'Browse the catalog using filter tabs' do
    visit search_catalog_path

    # Filter on Works
    within '#type-tabs' do
      click_on 'Works'
    end

    expect(page).to have_selector('#documents .document', count: 1)
    within '#documents' do
      expect(page).to have_link 'My Work'
      expect(page).to_not have_link 'My Collection'
    end

    # Filter on Collections
    within '#type-tabs' do
      click_on 'Collections'
    end

    expect(page).to have_selector('#documents .document', count: 1)
    within '#documents' do
      expect(page).to_not have_link 'My Work'
      expect(page).to have_link 'My Collection'
    end

    # Filter on All
    within '#type-tabs' do
      click_on 'All'
    end

    expect(page).to have_selector('#documents .document', count: 2)
    within '#documents' do
      expect(page).to have_link 'My Work'
      expect(page).to have_link 'My Collection'
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
curation_concerns-0.14.0.pre3 spec/features/catalog_search_spec.rb
curation_concerns-0.14.0.pre2 spec/features/catalog_search_spec.rb
curation_concerns-0.14.0.pre1 spec/features/catalog_search_spec.rb
curation_concerns-0.13.1 spec/features/catalog_search_spec.rb
curation_concerns-0.13.0 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre9 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre8 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre7 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre6 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre5 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre4 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre3 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre2 spec/features/catalog_search_spec.rb
curation_concerns-0.12.0.pre1 spec/features/catalog_search_spec.rb
curation_concerns-0.11.0 spec/features/catalog_search_spec.rb
curation_concerns-0.11.0.rc1 spec/features/catalog_search_spec.rb
curation_concerns-0.10.0 spec/features/catalog_search_spec.rb
curation_concerns-0.9.0 spec/features/catalog_search_spec.rb