Sha256: a92606d55f4ed21e669c85e869364cca643da914aec2966470dea6bac90dd667
Contents?: true
Size: 1.1 KB
Versions: 4
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 catalog_index_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
4 entries across 4 versions & 1 rubygems