Sha256: 5ecf5e1439097836253398669bfcf732fe872a83a5a37f066e3f536af4d63ef1
Contents?: true
Size: 1.3 KB
Versions: 8
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe Geoblacklight::HomepageFeatureFacetComponent, type: :component do subject(:rendered) do render_inline_to_capybara_node(described_class.new(**kargs)) end # Build a search let(:context) { { whatever: :value } } let(:service) { Blacklight::SearchService.new(config: blacklight_config, user_params: user_params, **context) } let(:repository) { Blacklight::Solr::Repository.new(blacklight_config) } let(:user_params) { {} } let(:blacklight_config) { Blacklight::Configuration.new } let(:copy_of_catalog_config) { ::CatalogController.blacklight_config.deep_copy } let(:blacklight_solr) { RSolr.connect(Blacklight.connection_config.except(:adapter)) } describe 'homepage' do before do (@response, @document_list) = service.search_results end let(:kargs) do { icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVIDER, response: @response } end it 'includes facet links' do expect(rendered).to have_selector('div.category-block') expect(rendered).to have_selector('div.category-icon') expect(rendered).to have_selector('a.home-facet-link') expect(rendered).to have_selector('a.more_facets_link') end end end
Version data entries
8 entries across 8 versions & 1 rubygems