Sha256: 4f2aa79a8d71588add02078229326bd7d0646c9ddd428b26ceaa5a5430ed05ee

Contents?: true

Size: 1.51 KB

Versions: 26

Compression:

Stored size: 1.51 KB

Contents

# -*- encoding : utf-8 -*-
require 'spec_helper'

describe "Facets" do
  it "should show a single facet's values" do
    visit catalog_facet_path("language_facet")
    expect(page).to have_selector(".modal-title", :text => "Language")
    expect(page).to have_selector(".facet_select", :text => "Tibetan")
  end
  
  it "should paginate through a facet's values" do
    visit catalog_facet_path("subject_topic_facet")
    expect(page).to have_selector '.facet-values li:first', text: "Japanese drama"
    expect(page).to have_link "A-Z Sort"
    expect(page).to have_selector '.sort_options .active', text: "Numerical Sort"
    within ".modal-footer" do
      click_on "Next »"
    end
    expect(page).to have_selector '.facet-values li:first', text: "Jewish law"
    expect(page).to have_link "« Previous"
  end
  
  it "should be able to change the facet sort" do
    visit catalog_facet_path("subject_topic_facet")
    expect(page).to have_selector '.facet-values li:first', text: "Japanese drama"
    within ".modal-footer" do
      click_on "A-Z Sort"
    end
    expect(page).to have_selector '.facet-values li:first', text: "Accident insurance"
    expect(page).to have_link "Numerical Sort"
    expect(page).to have_selector '.sort_options .active', text: "A-Z Sort"
    
    
  end
  describe '"More" links' do
    it 'has default more link with sr-only text' do
      visit root_path
      within '#facet-language_facet' do
        expect(page).to have_css 'li.more_facets_link', text: 'more Language'
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
blacklight-5.19.2 spec/features/facets_spec.rb
blacklight-5.19.1 spec/features/facets_spec.rb
blacklight-5.19.0 spec/features/facets_spec.rb
blacklight-5.18.0 spec/features/facets_spec.rb
blacklight-5.17.2 spec/features/facets_spec.rb
blacklight-5.17.1 spec/features/facets_spec.rb
blacklight-5.17.0 spec/features/facets_spec.rb
blacklight-5.16.4 spec/features/facets_spec.rb
blacklight-5.16.3 spec/features/facets_spec.rb
blacklight-5.16.2 spec/features/facets_spec.rb
blacklight-5.16.1 spec/features/facets_spec.rb
blacklight-5.16.0 spec/features/facets_spec.rb
blacklight-5.15.0 spec/features/facets_spec.rb
blacklight-5.14.0 spec/features/facets_spec.rb
blacklight-5.13.1 spec/features/facets_spec.rb
blacklight-5.13.0 spec/features/facets_spec.rb
blacklight-5.11.3 spec/features/facets_spec.rb
blacklight-5.12.1 spec/features/facets_spec.rb
blacklight-5.12.0 spec/features/facets_spec.rb
blacklight-5.10.3 spec/features/facets_spec.rb