Sha256: 6dd3ee1e691306318d0dfd93a478e6db38abcda74779446c6ac0b90dc3e2284c

Contents?: true

Size: 1.27 KB

Versions: 11

Compression:

Stored size: 1.27 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
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-5.9.4 spec/features/facets_spec.rb
blacklight-5.9.3 spec/features/facets_spec.rb
blacklight-5.9.2 spec/features/facets_spec.rb
blacklight-5.9.1 spec/features/facets_spec.rb
blacklight-5.9.0 spec/features/facets_spec.rb
blacklight-5.8.2 spec/features/facets_spec.rb
blacklight-5.8.1 spec/features/facets_spec.rb
blacklight-5.8.0 spec/features/facets_spec.rb
blacklight-5.7.2 spec/features/facets_spec.rb
blacklight-5.7.1 spec/features/facets_spec.rb
blacklight-5.7.0 spec/features/facets_spec.rb