blacklight 8.11.0 → 9.0.0.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +3 -3
- data/.github/matrix.json +11 -42
- data/.github/pull_request_template.md +7 -0
- data/.github/workflows/main.yml +0 -2
- data/.github/workflows/release_7_x_scheduled.yml +39 -0
- data/.github/workflows/release_8_x_scheduled.yml +39 -0
- data/.github/workflows/test.yml +0 -5
- data/.rubocop.yml +71 -3
- data/.rubocop_todo.yml +43 -76
- data/.solr_wrapper.yml +2 -0
- data/README.md +30 -8
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +452 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +6 -76
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +6 -76
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -25
- data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- data/app/assets/stylesheets/blacklight/_facets.scss +17 -84
- data/app/assets/stylesheets/blacklight/_group.scss +2 -5
- data/app/assets/stylesheets/blacklight/_header.scss +8 -11
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- data/app/assets/stylesheets/blacklight/_modal.scss +1 -1
- data/app/assets/stylesheets/blacklight/_pagination.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -8
- data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -14
- data/app/assets/stylesheets/blacklight/build.scss +4 -0
- data/app/components/blacklight/advanced_search_form_component.rb +3 -3
- data/app/components/blacklight/constraint_component.rb +1 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.rb +3 -3
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/bookmark_component.rb +2 -2
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/more_like_this_component.rb +2 -2
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document/sidebar_component.rb +5 -5
- data/app/components/blacklight/document/thumbnail_component.html.erb +3 -7
- data/app/components/blacklight/document/thumbnail_component.rb +7 -6
- data/app/components/blacklight/document_component.rb +12 -16
- data/app/components/blacklight/document_title_component.rb +5 -11
- data/app/components/blacklight/facet_field_checkboxes_component.rb +2 -20
- data/app/components/blacklight/facet_field_component.rb +2 -17
- data/app/components/blacklight/facet_field_filter_component.rb +2 -21
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +4 -25
- data/app/components/blacklight/facet_field_list_component.rb +2 -50
- data/app/components/blacklight/facet_field_no_layout_component.rb +2 -10
- data/app/components/blacklight/facet_item_component.rb +2 -74
- data/app/components/blacklight/facet_item_pivot_component.rb +3 -3
- data/app/components/blacklight/facets/checkboxes_component.rb +26 -0
- data/app/components/blacklight/facets/count_component.rb +23 -0
- data/app/components/blacklight/{facet_field_component.html.erb → facets/field_component.html.erb} +4 -4
- data/app/components/blacklight/facets/field_component.rb +23 -0
- data/app/components/blacklight/facets/filters_component.html.erb +4 -0
- data/app/components/blacklight/facets/filters_component.rb +27 -0
- data/app/components/blacklight/{facet_field_inclusive_constraint_component.html.erb → facets/inclusive_constraint_component.html.erb} +1 -1
- data/app/components/blacklight/facets/inclusive_constraint_component.rb +31 -0
- data/app/components/blacklight/{facet_field_filter_component.html.erb → facets/index_navigation_component.html.erb} +1 -1
- data/app/components/blacklight/facets/index_navigation_component.rb +32 -0
- data/app/components/blacklight/facets/item_component.rb +73 -0
- data/app/components/blacklight/facets/list_component.html.erb +11 -0
- data/app/components/blacklight/facets/list_component.rb +38 -0
- data/app/components/blacklight/facets/no_layout_component.rb +16 -0
- data/app/components/blacklight/facets/selected_value_component.rb +29 -0
- data/app/components/blacklight/facets/suggest_component.html.erb +12 -0
- data/app/components/blacklight/facets/suggest_component.rb +22 -0
- data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
- data/app/components/blacklight/response/facet_group_component.rb +11 -23
- data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
- data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
- data/app/components/blacklight/response/pagination_component.html.erb +1 -1
- data/app/components/blacklight/response/pagination_component.rb +2 -1
- data/app/components/blacklight/response/sort_component.rb +1 -0
- data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
- data/app/components/blacklight/response/view_type_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.rb +1 -0
- data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
- data/app/components/blacklight/search/sidebar_component.rb +1 -1
- data/app/components/blacklight/search_bar_component.html.erb +3 -3
- data/app/components/blacklight/search_bar_component.rb +2 -2
- data/app/components/blacklight/search_button_component.rb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
- data/app/components/blacklight/skip_link_component.html.erb +1 -1
- data/app/components/blacklight/skip_link_component.rb +2 -1
- data/app/components/blacklight/top_navbar_component.html.erb +2 -2
- data/app/controllers/concerns/blacklight/bookmarks.rb +3 -3
- data/app/controllers/concerns/blacklight/catalog.rb +9 -23
- data/app/controllers/concerns/blacklight/controller.rb +1 -1
- data/app/controllers/concerns/blacklight/facetable.rb +34 -0
- data/app/controllers/concerns/blacklight/search_context.rb +0 -12
- data/app/controllers/concerns/blacklight/searchable.rb +1 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
- data/app/helpers/blacklight/catalog_helper_behavior.rb +0 -10
- data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -14
- data/app/helpers/blacklight/document_helper_behavior.rb +3 -27
- data/app/helpers/blacklight/facets_helper_behavior.rb +9 -0
- data/app/helpers/blacklight/icon_helper_behavior.rb +3 -11
- data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
- data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +3 -0
- data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- data/app/javascript/{blacklight → blacklight-frontend}/facet_suggest.js +1 -3
- data/app/javascript/blacklight-frontend/index.js +16 -0
- data/app/javascript/{blacklight → blacklight-frontend}/modal.js +1 -5
- data/app/models/concerns/blacklight/document.rb +0 -11
- data/app/models/concerns/blacklight/user.rb +1 -1
- data/app/models/facet_search_builder.rb +5 -0
- data/app/presenters/blacklight/facet_field_presenter.rb +3 -3
- data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
- data/app/presenters/blacklight/rendering/join.rb +2 -2
- data/app/services/blacklight/facet_search_service.rb +44 -0
- data/app/services/blacklight/field_retriever.rb +1 -1
- data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
- data/app/services/blacklight/search_service.rb +6 -6
- data/app/values/blacklight/types.rb +2 -2
- data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_facet_pivot.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_results_pagination.html.erb +2 -5
- data/app/views/catalog/_search_results.html.erb +3 -3
- data/app/views/catalog/_search_results_header.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -0
- data/app/views/catalog/facet.html.erb +4 -6
- data/app/views/catalog/show.html.erb +2 -3
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
- data/app/views/layouts/blacklight/base.html.erb +3 -7
- data/app/views/search_history/index.html.erb +0 -2
- data/blacklight.gemspec +4 -4
- data/config/importmap.rb +1 -1
- data/config/locales/blacklight.ar.yml +2 -2
- data/config/locales/blacklight.ca.yml +124 -124
- data/config/locales/blacklight.de.yml +2 -2
- data/config/locales/blacklight.en.yml +14 -14
- data/config/locales/blacklight.es.yml +2 -2
- data/config/locales/blacklight.fr.yml +2 -2
- data/config/locales/blacklight.hu.yml +2 -2
- data/config/locales/blacklight.it.yml +1 -1
- data/config/locales/blacklight.nl.yml +2 -2
- data/config/locales/blacklight.pt-BR.yml +1 -1
- data/config/locales/blacklight.sq.yml +2 -2
- data/config/locales/blacklight.zh.yml +2 -2
- data/lib/blacklight/abstract_repository.rb +2 -2
- data/lib/blacklight/abstract_search_builder.rb +154 -0
- data/lib/blacklight/configuration/context.rb +3 -3
- data/lib/blacklight/configuration/display_field.rb +1 -1
- data/lib/blacklight/configuration/facet_field.rb +6 -6
- data/lib/blacklight/configuration/field.rb +4 -4
- data/lib/blacklight/configuration/fields.rb +3 -4
- data/lib/blacklight/configuration/search_field.rb +1 -1
- data/lib/blacklight/configuration/view_config.rb +2 -4
- data/lib/blacklight/configuration.rb +11 -18
- data/lib/blacklight/engine.rb +0 -6
- data/lib/blacklight/facet_search_builder.rb +18 -0
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
- data/lib/blacklight/open_struct_with_hash_access.rb +5 -5
- data/lib/blacklight/search_builder.rb +1 -159
- data/lib/blacklight/search_state/filter_field.rb +2 -2
- data/lib/blacklight/search_state/pivot_filter_field.rb +4 -4
- data/lib/blacklight/solr/abstract_filter_query_builder.rb +77 -0
- data/lib/blacklight/solr/default_filter_query_builder.rb +20 -0
- data/lib/blacklight/solr/facet_search_builder_behavior.rb +62 -0
- data/lib/blacklight/solr/repository.rb +8 -9
- data/lib/blacklight/solr/request.rb +1 -7
- data/lib/blacklight/solr/response/facets.rb +2 -2
- data/lib/blacklight/solr/response/group_response.rb +2 -2
- data/lib/blacklight/solr/response/params.rb +0 -4
- data/lib/blacklight/solr/response.rb +5 -1
- data/lib/blacklight/solr/search_builder_behavior.rb +17 -132
- data/lib/blacklight.rb +2 -2
- data/lib/generators/blacklight/assets/importmap_generator.rb +6 -24
- data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
- data/lib/generators/blacklight/assets_generator.rb +3 -3
- data/lib/generators/blacklight/controller_generator.rb +3 -3
- data/lib/generators/blacklight/search_builder_generator.rb +1 -1
- data/lib/generators/blacklight/templates/.solr_wrapper.yml +2 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +3 -1
- data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +0 -4
- data/lib/generators/blacklight/user_generator.rb +9 -10
- data/package.json +15 -5
- data/rollup.config.js +1 -1
- data/spec/components/blacklight/advanced_search_form_component_spec.rb +18 -22
- data/spec/components/blacklight/constraint_layout_component_spec.rb +8 -8
- data/spec/components/blacklight/constraints_component_spec.rb +11 -11
- data/spec/components/blacklight/document/action_component_spec.rb +21 -17
- data/spec/components/blacklight/document/group_component_spec.rb +10 -15
- data/spec/components/blacklight/document/page_header_component_spec.rb +35 -28
- data/spec/components/blacklight/document/sidebar_component_spec.rb +9 -30
- data/spec/components/blacklight/document_component_spec.rb +98 -65
- data/spec/components/blacklight/facet_component_spec.rb +12 -8
- data/spec/components/blacklight/facet_item_pivot_component_spec.rb +12 -12
- data/spec/components/blacklight/{facet_field_checkboxes_component_spec.rb → facets/checkboxes_component_spec.rb} +14 -14
- data/spec/components/blacklight/facets/filters_component_spec.rb +36 -0
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +40 -0
- data/spec/components/blacklight/{facet_item_component_spec.rb → facets/item_component_spec.rb} +10 -10
- data/spec/components/blacklight/{facet_field_list_component_spec.rb → facets/list_component_spec.rb} +24 -24
- data/spec/components/blacklight/facets/suggest_component_spec.rb +68 -0
- data/spec/components/blacklight/header_component_spec.rb +2 -4
- data/spec/components/blacklight/hidden_search_state_component_spec.rb +7 -7
- data/spec/components/blacklight/metadata_field_component_spec.rb +17 -15
- data/spec/components/blacklight/response/facet_group_component_spec.rb +37 -0
- data/spec/components/blacklight/response/pagination_component_spec.rb +1 -1
- data/spec/components/blacklight/response/spellcheck_component_spec.rb +1 -1
- data/spec/components/blacklight/search_bar_component_spec.rb +5 -5
- data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +2 -2
- data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +3 -5
- data/spec/components/blacklight/skip_link_component_spec.rb +8 -11
- data/spec/components/blacklight/start_over_button_component_spec.rb +4 -4
- data/spec/components/blacklight/system/flash_message_component_spec.rb +7 -11
- data/spec/controllers/catalog_controller_spec.rb +11 -19
- data/spec/features/axe_spec.rb +6 -11
- data/spec/features/bookmarks_spec.rb +48 -11
- data/spec/features/facets_spec.rb +58 -63
- data/spec/features/search_context_spec.rb +1 -2
- data/spec/features/search_filters_spec.rb +6 -6
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +10 -0
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
- data/spec/lib/blacklight/configuration/facet_field_spec.rb +2 -2
- data/spec/models/blacklight/configuration_spec.rb +32 -28
- data/spec/models/blacklight/facet_search_builder_spec.rb +19 -0
- data/spec/models/blacklight/search_builder_spec.rb +1 -11
- data/spec/models/blacklight/solr/default_filter_query_builder_spec.rb +72 -0
- data/spec/models/blacklight/solr/document_spec.rb +0 -4
- data/spec/models/blacklight/solr/facet_search_builder_behavior_spec.rb +929 -0
- data/spec/models/blacklight/solr/repository_spec.rb +31 -29
- data/spec/models/blacklight/solr/request_spec.rb +7 -0
- data/spec/models/blacklight/solr/response/facets_spec.rb +86 -40
- data/spec/models/blacklight/solr/response/group_response_spec.rb +8 -5
- data/spec/models/blacklight/solr/response/group_spec.rb +9 -5
- data/spec/models/blacklight/solr/response_spec.rb +96 -64
- data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +2 -227
- data/spec/models/solr_document_spec.rb +5 -1
- data/spec/services/blacklight/search_service_spec.rb +5 -26
- data/spec/spec_helper.rb +0 -1
- data/spec/support/view_component_test_helpers.rb +0 -18
- data/spec/views/catalog/facet.html.erb_spec.rb +10 -11
- data/spec/views/catalog/index.atom.builder_spec.rb +6 -3
- data/spec/views/catalog/index.html.erb_spec.rb +8 -3
- data/spec/views/catalog/show.html.erb_spec.rb +1 -0
- data/tasks/blacklight.rake +8 -5
- metadata +76 -81
- data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- data/app/components/blacklight/facet_field_list_component.html.erb +0 -19
- data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
- data/app/components/blacklight/search/facet_suggest_input.html.erb +0 -12
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -20
- data/app/javascript/blacklight/index.js +0 -18
- data/app/javascript/blacklight/modalForm.js +0 -60
- data/app/views/catalog/_constraints.html.erb +0 -1
- data/app/views/catalog/_facet_index_navigation.html.erb +0 -1
- data/app/views/catalog/_facet_layout.html.erb +0 -8
- data/app/views/catalog/_facet_pagination.html.erb +0 -1
- data/app/views/catalog/_facets.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -7
- data/app/views/catalog/_search_header.html.erb +0 -1
- data/app/views/catalog/_show_sidebar.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -2
- data/app/views/catalog/_start_over.html.erb +0 -1
- data/app/views/shared/_header_navbar.html.erb +0 -1
- data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
- data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +0 -57
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +0 -41
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
- /data/app/components/blacklight/{facet_field_checkboxes_component.html.erb → facets/checkboxes_component.html.erb} +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
@@ -7,7 +7,7 @@ RSpec.describe Blacklight::SearchContext::ServerAppliedParamsComponent, type: :c
|
|
7
7
|
|
8
8
|
let(:instance) { described_class.new }
|
9
9
|
let(:current_search_session) { nil }
|
10
|
-
let(:view_context) {
|
10
|
+
let(:view_context) { vc_test_controller.view_context }
|
11
11
|
|
12
12
|
before do
|
13
13
|
# Not sure why we need to re-implement rspec's stub_template, but
|
@@ -16,7 +16,7 @@ RSpec.describe Blacklight::SearchContext::ServerAppliedParamsComponent, type: :c
|
|
16
16
|
# https://github.com/rspec/rspec-rails/issues/2696
|
17
17
|
replace_hash = { 'application/_start_over.html.erb' => 'start over' }
|
18
18
|
if Rails.version.to_f >= 7.1
|
19
|
-
|
19
|
+
vc_test_controller.prepend_view_path(RSpec::Rails::ViewExampleGroup::StubResolverCache.resolver_for(replace_hash))
|
20
20
|
else
|
21
21
|
view_context.view_paths.unshift(RSpec::Rails::ViewExampleGroup::StubResolverCache.resolver_for(replace_hash))
|
22
22
|
end
|
@@ -11,8 +11,8 @@ RSpec.describe Blacklight::SearchContext::ServerItemPaginationComponent, type: :
|
|
11
11
|
let(:instance) { described_class.new(search_context: search_context, search_session: search_session, current_document: current_document) }
|
12
12
|
|
13
13
|
before do
|
14
|
-
allow(
|
15
|
-
|
14
|
+
allow(vc_test_controller).to receive(:current_search_session).and_return(double(id: current_document_id))
|
15
|
+
vc_test_controller.class.helper_method :current_search_session
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'when there is no next or previous' do
|
@@ -40,9 +40,7 @@ RSpec.describe Blacklight::SearchContext::ServerItemPaginationComponent, type: :
|
|
40
40
|
let(:next_doc) { SolrDocument.new(id: '888') }
|
41
41
|
|
42
42
|
before do
|
43
|
-
|
44
|
-
|
45
|
-
allow(controller).to receive_messages(controller_name: 'catalog', link_to_previous_document: '', link_to_next_document: '')
|
43
|
+
allow(vc_test_controller).to receive_messages(controller_name: 'catalog', link_to_previous_document: '', link_to_next_document: '')
|
46
44
|
end
|
47
45
|
|
48
46
|
it "renders content" do
|
@@ -3,12 +3,9 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe Blacklight::SkipLinkComponent, type: :component do
|
6
|
-
subject(:rendered) do
|
7
|
-
render_inline_to_capybara_node(described_class.new)
|
8
|
-
end
|
9
|
-
|
10
6
|
before do
|
11
|
-
allow(
|
7
|
+
allow(vc_test_controller).to receive(:blacklight_config).and_return(blacklight_config)
|
8
|
+
render_inline(described_class.new)
|
12
9
|
end
|
13
10
|
|
14
11
|
context 'with no search fields' do
|
@@ -19,8 +16,8 @@ RSpec.describe Blacklight::SkipLinkComponent, type: :component do
|
|
19
16
|
end
|
20
17
|
|
21
18
|
it 'renders skip links with correct link to search' do
|
22
|
-
expect(
|
23
|
-
expect(
|
19
|
+
expect(page).to have_link("Skip to main content", href: '#main-container')
|
20
|
+
expect(page).to have_link("Skip to search", href: "#q")
|
24
21
|
end
|
25
22
|
end
|
26
23
|
|
@@ -32,8 +29,8 @@ RSpec.describe Blacklight::SkipLinkComponent, type: :component do
|
|
32
29
|
end
|
33
30
|
|
34
31
|
it 'renders skip links with correct link to search' do
|
35
|
-
expect(
|
36
|
-
expect(
|
32
|
+
expect(page).to have_link("Skip to main content", href: "#main-container")
|
33
|
+
expect(page).to have_link("Skip to search", href: "#q")
|
37
34
|
end
|
38
35
|
end
|
39
36
|
|
@@ -45,8 +42,8 @@ RSpec.describe Blacklight::SkipLinkComponent, type: :component do
|
|
45
42
|
end
|
46
43
|
|
47
44
|
it 'renders skip links with correct link to search' do
|
48
|
-
expect(
|
49
|
-
expect(
|
45
|
+
expect(page).to have_link("Skip to main content", href: "#main-container")
|
46
|
+
expect(page).to have_link("Skip to search", href: "#search_field")
|
50
47
|
end
|
51
48
|
end
|
52
49
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe Blacklight::StartOverButtonComponent, type: :component do
|
6
|
-
subject(:render) { render_inline
|
6
|
+
subject(:render) { render_inline instance }
|
7
7
|
|
8
8
|
let(:instance) { described_class.new }
|
9
9
|
let(:blacklight_config) do
|
@@ -13,12 +13,12 @@ RSpec.describe Blacklight::StartOverButtonComponent, type: :component do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
before do
|
16
|
-
allow(
|
16
|
+
allow(vc_test_controller).to receive(:blacklight_config).and_return(blacklight_config)
|
17
17
|
end
|
18
18
|
|
19
19
|
context 'with the current view type' do
|
20
20
|
before do
|
21
|
-
|
21
|
+
vc_test_controller.params[:view] = 'abc'
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'is the catalog path' do
|
@@ -28,7 +28,7 @@ RSpec.describe Blacklight::StartOverButtonComponent, type: :component do
|
|
28
28
|
|
29
29
|
context 'when the current view type is the default' do
|
30
30
|
before do
|
31
|
-
|
31
|
+
vc_test_controller.params[:view] = 'list'
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'does not include the current view type' do
|
@@ -5,26 +5,22 @@ require 'spec_helper'
|
|
5
5
|
RSpec.describe Blacklight::System::FlashMessageComponent, type: :component do
|
6
6
|
subject(:component) { described_class.new(message: message, type: type) }
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
component.render_in(view_context)
|
8
|
+
before do
|
9
|
+
render_inline(component)
|
11
10
|
end
|
12
11
|
|
13
|
-
let(:rendered) do
|
14
|
-
Capybara::Node::Simple.new(render)
|
15
|
-
end
|
16
12
|
let(:message) { 'This is an important message' }
|
17
13
|
let(:type) { 'whatever' }
|
18
14
|
|
19
15
|
it 'renders a message inside an alert' do
|
20
|
-
expect(
|
16
|
+
expect(page).to have_css 'div.alert.alert-whatever', text: message
|
21
17
|
end
|
22
18
|
|
23
19
|
context 'with a success message' do
|
24
20
|
let(:type) { 'success' }
|
25
21
|
|
26
22
|
it 'adds some styling' do
|
27
|
-
expect(
|
23
|
+
expect(page).to have_css 'div.alert-success'
|
28
24
|
end
|
29
25
|
end
|
30
26
|
|
@@ -32,7 +28,7 @@ RSpec.describe Blacklight::System::FlashMessageComponent, type: :component do
|
|
32
28
|
let(:type) { 'notice' }
|
33
29
|
|
34
30
|
it 'adds some styling' do
|
35
|
-
expect(
|
31
|
+
expect(page).to have_css 'div.alert-info'
|
36
32
|
end
|
37
33
|
end
|
38
34
|
|
@@ -40,7 +36,7 @@ RSpec.describe Blacklight::System::FlashMessageComponent, type: :component do
|
|
40
36
|
let(:type) { 'alert' }
|
41
37
|
|
42
38
|
it 'adds some styling' do
|
43
|
-
expect(
|
39
|
+
expect(page).to have_css 'div.alert-warning'
|
44
40
|
end
|
45
41
|
end
|
46
42
|
|
@@ -48,7 +44,7 @@ RSpec.describe Blacklight::System::FlashMessageComponent, type: :component do
|
|
48
44
|
let(:type) { 'error' }
|
49
45
|
|
50
46
|
it 'adds some styling' do
|
51
|
-
expect(
|
47
|
+
expect(page).to have_css 'div.alert-danger'
|
52
48
|
end
|
53
49
|
end
|
54
50
|
end
|
@@ -499,13 +499,14 @@ RSpec.describe CatalogController, :api do
|
|
499
499
|
expect(request.flash[:error]).to be_nil
|
500
500
|
end
|
501
501
|
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
502
|
+
context 'when message is provided' do
|
503
|
+
it "sends email and redirects back to the record" do
|
504
|
+
expect do
|
505
|
+
post :email, params: { id: doc_id, to: 'test_email@projectblacklight.org', message: 'xyz' }
|
506
|
+
end.to send_email(to: 'test_email@projectblacklight.org')
|
507
|
+
expect(request.flash[:error]).to be_nil
|
508
|
+
expect(request).to redirect_to(solr_document_path(doc_id))
|
509
|
+
end
|
509
510
|
end
|
510
511
|
|
511
512
|
it "renders email_success for XHR requests" do
|
@@ -549,11 +550,9 @@ RSpec.describe CatalogController, :api do
|
|
549
550
|
end
|
550
551
|
|
551
552
|
it "sends to the appropriate carrier email address" do
|
552
|
-
expect
|
553
|
-
|
554
|
-
|
555
|
-
.and_return double(deliver: nil)
|
556
|
-
post :sms, params: { id: doc_id, to: '5555555555', carrier: 'txt.att.net' }
|
553
|
+
expect do
|
554
|
+
post :sms, params: { id: doc_id, to: '5555555555', carrier: 'txt.att.net' }
|
555
|
+
end.to send_email(to: '5555555555@txt.att.net')
|
557
556
|
end
|
558
557
|
|
559
558
|
it "redirects back to the record upon success" do
|
@@ -786,13 +785,6 @@ RSpec.describe CatalogController, :api do
|
|
786
785
|
end
|
787
786
|
end
|
788
787
|
|
789
|
-
describe "search_facet_path" do
|
790
|
-
it "is the same as the catalog path" do
|
791
|
-
get :index, params: { page: 1 }
|
792
|
-
expect(controller.send(:search_facet_path, id: "some_facet", page: 5)).to eq facet_catalog_path(id: "some_facet")
|
793
|
-
end
|
794
|
-
end
|
795
|
-
|
796
788
|
describe "page_links" do
|
797
789
|
it "has prev/next docs and result set data for non-empty result sets", :integration do
|
798
790
|
get :page_links, params: { f: { "format" => 'Book' }, counter: 2 }
|
data/spec/features/axe_spec.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
RSpec.describe 'Accessibility testing', :js, api: false do
|
4
4
|
it 'validates the home page' do
|
5
5
|
visit root_path
|
6
|
-
expect(page).to
|
6
|
+
expect(page).to be_axe_clean
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'validates the catalog page' do
|
@@ -11,28 +11,23 @@ RSpec.describe 'Accessibility testing', :js, api: false do
|
|
11
11
|
fill_in "q", with: 'history'
|
12
12
|
click_on 'search'
|
13
13
|
|
14
|
-
expect(page).to
|
14
|
+
expect(page).to be_axe_clean
|
15
15
|
|
16
|
-
within '.
|
16
|
+
within '.accordion-item.blacklight-language_ssim' do
|
17
17
|
click_on 'Language'
|
18
18
|
click_on "Tibetan"
|
19
19
|
end
|
20
20
|
|
21
|
-
expect(page).to
|
21
|
+
expect(page).to be_axe_clean
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'validates the advanced search form' do
|
25
25
|
visit advanced_search_catalog_path
|
26
|
-
expect(page).to
|
26
|
+
expect(page).to be_axe_clean
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'validates the single results page' do
|
30
30
|
visit solr_document_path('2007020969')
|
31
|
-
expect(page).to
|
32
|
-
end
|
33
|
-
|
34
|
-
def be_accessible(skipping: [])
|
35
|
-
# typeahead does funny things with the search bar
|
36
|
-
be_axe_clean.excluding('.tt-hint').skipping(skipping + [('color-contrast' if defined?(Bootstrap) && Bootstrap::VERSION < '5')].compact)
|
31
|
+
expect(page).to be_axe_clean
|
37
32
|
end
|
38
33
|
end
|
@@ -1,6 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
RSpec.describe "Bookmarks" do
|
4
|
+
before do
|
5
|
+
# Prevent any existing bookmarks from interfering
|
6
|
+
Bookmark.delete_all
|
7
|
+
end
|
8
|
+
|
4
9
|
describe "navigating from the homepage" do
|
5
10
|
it "has a link to the history page" do
|
6
11
|
sign_in 'user1'
|
@@ -40,13 +45,25 @@ RSpec.describe "Bookmarks" do
|
|
40
45
|
expect(page).to have_content 'Successfully removed bookmark.'
|
41
46
|
end
|
42
47
|
|
43
|
-
|
44
|
-
|
45
|
-
check 'Bookmark'
|
48
|
+
context 'when bookmark_icon_component is set to nil' do
|
49
|
+
let!(:default_bookmark_icon_component) { CatalogController.blacklight_config.bookmark_icon_component }
|
46
50
|
|
47
|
-
|
48
|
-
|
49
|
-
|
51
|
+
before do
|
52
|
+
CatalogController.blacklight_config.bookmark_icon_component = nil
|
53
|
+
end
|
54
|
+
|
55
|
+
after do
|
56
|
+
CatalogController.blacklight_config.bookmark_icon_component = default_bookmark_icon_component
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'shows bookmarks as checkboxes', :js do
|
60
|
+
visit solr_document_path('2007020969')
|
61
|
+
check 'Bookmark'
|
62
|
+
|
63
|
+
visit solr_document_path('2007020969')
|
64
|
+
expect(page).to have_css('input[type="checkbox"][checked]')
|
65
|
+
uncheck 'In Bookmarks'
|
66
|
+
end
|
50
67
|
end
|
51
68
|
|
52
69
|
it "adds bookmarks after a user logs in" do
|
@@ -82,17 +99,37 @@ RSpec.describe "Bookmarks" do
|
|
82
99
|
expect(page).to have_content 'Ci an zhou bian'
|
83
100
|
end
|
84
101
|
|
85
|
-
context "
|
102
|
+
context "when the bookmark icon is configured (default)" do
|
103
|
+
it 'shows bookmark icon', :js do
|
104
|
+
visit solr_document_path('2007020969')
|
105
|
+
expect(page).to have_css('.blacklight-icons-bookmark')
|
106
|
+
find('.blacklight-icons-bookmark').click
|
107
|
+
|
108
|
+
expect(find('.toggle-bookmark-input', visible: false)).to be_checked
|
109
|
+
find('.blacklight-icons-bookmark').click
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
context "without bookmark navbar element" do
|
114
|
+
let!(:default_nav_partials) { CatalogController.blacklight_config.navbar.partials }
|
115
|
+
|
86
116
|
before do
|
87
|
-
CatalogController.blacklight_config.
|
117
|
+
CatalogController.blacklight_config.navbar.partials = CatalogController.blacklight_config.navbar.partials.except(:bookmark)
|
118
|
+
end
|
119
|
+
|
120
|
+
after do
|
121
|
+
CatalogController.blacklight_config.navbar.partials = default_nav_partials
|
88
122
|
end
|
89
123
|
|
90
|
-
it '
|
124
|
+
it 'adds and removes bookmarks', :js do
|
91
125
|
visit solr_document_path('2007020969')
|
92
|
-
expect(page).to
|
126
|
+
expect(page).to have_no_css('#bookmarks_nav')
|
93
127
|
find('.blacklight-icons-bookmark').click
|
94
128
|
|
95
|
-
expect(
|
129
|
+
expect(page).to have_content 'In Bookmarks'
|
130
|
+
|
131
|
+
visit solr_document_path('2007020969')
|
132
|
+
expect(find('.toggle-bookmark-input', visible: false)).to be_checked
|
96
133
|
find('.blacklight-icons-bookmark').click
|
97
134
|
end
|
98
135
|
end
|
@@ -100,91 +100,86 @@ RSpec.describe "Facets" do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
describe 'Facet modal content' do
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
end
|
103
|
+
it 'allows the user to filter a long list of facet values', :js do
|
104
|
+
visit '/catalog/facet/subject_ssim'
|
105
|
+
expect(page).to have_no_link 'Old age' # This is on the second page of facet values
|
106
|
+
expect(page).to have_css 'a.facet-select', count: 20
|
108
107
|
|
109
|
-
|
110
|
-
CatalogController.blacklight_config.facet_fields[:subject_ssim].delete(:suggest)
|
111
|
-
end
|
112
|
-
|
113
|
-
it 'allows the user to filter a long list of facet values', :js do
|
114
|
-
visit '/catalog/facet/subject_ssim'
|
115
|
-
expect(page).to have_no_link 'Old age' # This is on the second page of facet values
|
116
|
-
expect(page).to have_css 'a.facet-select', count: 20
|
108
|
+
fill_in 'facet_suggest_subject_ssim', with: "ag"
|
117
109
|
|
118
|
-
|
110
|
+
expect(page).to have_css '.facet-suggestions'
|
111
|
+
expect(page).to have_link 'Old age'
|
112
|
+
expect(page).to have_css 'a.facet-select', count: 2
|
113
|
+
end
|
119
114
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
end
|
115
|
+
it 'shows the user facet suggestions that are relevant to their q param', :js do
|
116
|
+
visit '/catalog/facet/subject_ssim?q=tibet&search_field=all_fields'
|
117
|
+
fill_in 'facet_suggest_subject_ssim', with: 'la'
|
124
118
|
|
125
|
-
|
126
|
-
|
127
|
-
|
119
|
+
expect(page).to have_css '.facet-suggestions'
|
120
|
+
expect(page).to have_link 'Tibetan language'
|
121
|
+
expect(page).to have_no_link 'Law'
|
122
|
+
expect(page).to have_css 'a.facet-select', count: 1
|
123
|
+
end
|
128
124
|
|
129
|
-
|
130
|
-
|
131
|
-
expect(page).to have_no_link 'Law'
|
132
|
-
expect(page).to have_css 'a.facet-select', count: 1
|
133
|
-
end
|
125
|
+
it 'allows the user to toggle the sort, then filter', :js do
|
126
|
+
visit '/catalog/facet/subject_ssim'
|
134
127
|
|
135
|
-
|
136
|
-
visit '/catalog/facet/subject_ssim'
|
128
|
+
fill_in 'facet_suggest_subject_ssim', with: 'po'
|
137
129
|
|
138
|
-
|
130
|
+
expect(page).to have_css '.facet-suggestions'
|
131
|
+
expect(page).to have_css('.facet-values li:nth-child(1)', text: 'Political plays, Japanese')
|
132
|
+
expect(page).to have_css('.facet-values li:nth-child(2)', text: 'Military weapons')
|
133
|
+
expect(page).to have_css('.facet-values li:nth-child(3)', text: 'Political science')
|
139
134
|
|
140
|
-
|
141
|
-
expect(page).to have_css('.facet-values li:nth-child(1)', text: 'Political plays, Japanese')
|
142
|
-
expect(page).to have_css('.facet-values li:nth-child(2)', text: 'Military weapons')
|
143
|
-
expect(page).to have_css('.facet-values li:nth-child(3)', text: 'Political science')
|
135
|
+
first(:link, 'A-Z Sort').click
|
144
136
|
|
145
|
-
|
137
|
+
expect(page).to have_css('.facet-suggest[data-facet-search-context*="facet.sort=index"]')
|
146
138
|
|
147
|
-
|
139
|
+
fill_in 'facet_suggest_subject_ssim', with: 'po'
|
148
140
|
|
149
|
-
|
141
|
+
expect(page).to have_css '.facet-suggestions'
|
142
|
+
expect(page).to have_css('.facet-values li:nth-child(1)', text: 'Military weapons')
|
143
|
+
expect(page).to have_css('.facet-values li:nth-child(2)', text: 'Political plays, Japanese')
|
144
|
+
expect(page).to have_css('.facet-values li:nth-child(3)', text: 'Political science')
|
145
|
+
end
|
150
146
|
|
151
|
-
|
152
|
-
|
153
|
-
expect(page).to have_css('.facet-values li:nth-child(2)', text: 'Political plays, Japanese')
|
154
|
-
expect(page).to have_css('.facet-values li:nth-child(3)', text: 'Political science')
|
155
|
-
end
|
147
|
+
it 'allows the user to choose a starting letter, then filter', :js do
|
148
|
+
visit '/catalog/facet/subject_ssim'
|
156
149
|
|
157
|
-
|
158
|
-
|
150
|
+
first(:link, 'A-Z Sort').click
|
151
|
+
expect(page).to have_css('.facet-suggest[data-facet-search-context*="facet.sort=index"]')
|
159
152
|
|
160
|
-
|
161
|
-
|
153
|
+
click_on 'M'
|
154
|
+
expect(page).to have_css('.facet-suggest[data-facet-search-context*="facet.prefix=M"]')
|
162
155
|
|
163
|
-
|
164
|
-
expect(page).to have_css('.facet-suggest[data-facet-search-context*="facet.prefix=M"]')
|
156
|
+
fill_in 'facet_suggest_subject_ssim', with: 'te'
|
165
157
|
|
166
|
-
|
158
|
+
expect(page).to have_css '.facet-suggestions'
|
159
|
+
expect(page).to have_link 'Maternity insurance'
|
160
|
+
expect(page).to have_no_link 'Teaching'
|
161
|
+
end
|
167
162
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
end
|
163
|
+
it 'hides previous/next links when filtering', :js do
|
164
|
+
visit '/catalog/facet/subject_ssim'
|
165
|
+
expect(page).to have_link 'Next »'
|
172
166
|
|
173
|
-
|
174
|
-
|
175
|
-
|
167
|
+
fill_in 'facet_suggest_subject_ssim', with: 'te'
|
168
|
+
expect(page).to have_css '.facet-suggestions'
|
169
|
+
expect(page).to have_no_link 'Next »'
|
176
170
|
|
177
|
-
|
178
|
-
|
179
|
-
|
171
|
+
fill_in 'facet_suggest_subject_ssim', with: ''
|
172
|
+
expect(page).to have_no_css '.facet-suggestions'
|
173
|
+
expect(page).to have_link 'Next »'
|
174
|
+
end
|
180
175
|
|
181
|
-
|
182
|
-
|
183
|
-
|
176
|
+
context 'when facet is configured with suggest: false' do
|
177
|
+
before do
|
178
|
+
enabled = CatalogController.blacklight_config.dup
|
179
|
+
enabled.facet_fields[:subject_ssim].merge!({ suggest: false })
|
180
|
+
allow(CatalogController).to receive(:blacklight_config).and_return enabled
|
184
181
|
end
|
185
|
-
end
|
186
182
|
|
187
|
-
context 'when facet is NOT configured with suggest: true' do
|
188
183
|
it 'does not offer the user a way to filter the list of facet values' do
|
189
184
|
visit '/catalog/facet/subject_ssim'
|
190
185
|
expect(page).to have_no_field 'facet_suggest_subject_ssim'
|
@@ -47,10 +47,9 @@ RSpec.describe "Search Results context" do
|
|
47
47
|
search_for ''
|
48
48
|
expect(page).to have_content "1 - 10"
|
49
49
|
find_all('.index_title a').last.click
|
50
|
-
expect(page).to have_css "h1", text: "Pluvial nectar"
|
51
50
|
click_on "Next »"
|
52
51
|
|
53
|
-
expect(page).to
|
52
|
+
expect(page).to have_content "Naqdī barā-yi tamām-i"
|
54
53
|
click_on "Back to Search"
|
55
54
|
expect(page).to have_content "11 - 20"
|
56
55
|
end
|
@@ -171,7 +171,7 @@ RSpec.describe "Facets" do
|
|
171
171
|
visit root_path
|
172
172
|
|
173
173
|
within(".blacklight-subject_ssim") do
|
174
|
-
expect(page).to have_no_css(".
|
174
|
+
expect(page).to have_no_css(".accordion-body", visible: true)
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
@@ -179,9 +179,9 @@ RSpec.describe "Facets" do
|
|
179
179
|
visit root_path
|
180
180
|
|
181
181
|
within(".blacklight-subject_ssim") do
|
182
|
-
expect(page).to have_no_css(".
|
182
|
+
expect(page).to have_no_css(".accordion-body", visible: true)
|
183
183
|
click_on 'Topic'
|
184
|
-
expect(page).to have_css(".
|
184
|
+
expect(page).to have_css(".accordion-body", visible: true)
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
@@ -189,9 +189,9 @@ RSpec.describe "Facets" do
|
|
189
189
|
visit root_path
|
190
190
|
|
191
191
|
within(".blacklight-subject_ssim") do
|
192
|
-
expect(page).to have_no_css(".
|
193
|
-
find(".
|
194
|
-
expect(page).to have_css(".
|
192
|
+
expect(page).to have_no_css(".accordion-body", visible: true)
|
193
|
+
find(".accordion-header").click
|
194
|
+
expect(page).to have_css(".accordion-body", visible: true)
|
195
195
|
end
|
196
196
|
end
|
197
197
|
|
@@ -93,15 +93,6 @@ RSpec.describe Blacklight::ConfigurationHelperBehavior do
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
describe "#per_page_options_for_select" do
|
97
|
-
it "is the per-page values formatted as options_for_select" do
|
98
|
-
allow(helper).to receive_messages(blacklight_config: double(per_page: [11, 22, 33]))
|
99
|
-
expect(helper.per_page_options_for_select).to include ["11<span class=\"sr-only visually-hidden\"> per page</span>", 11]
|
100
|
-
expect(helper.per_page_options_for_select).to include ["22<span class=\"sr-only visually-hidden\"> per page</span>", 22]
|
101
|
-
expect(helper.per_page_options_for_select).to include ["33<span class=\"sr-only visually-hidden\"> per page</span>", 33]
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
96
|
describe "#should_render_field?" do
|
106
97
|
let(:field_config) { double('field config', if: true, unless: false) }
|
107
98
|
|
@@ -26,4 +26,14 @@ RSpec.describe Blacklight::FacetsHelperBehavior do
|
|
26
26
|
expect(presenter).to be_a SomePresenter
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
describe "#search_facet_path" do
|
31
|
+
before do
|
32
|
+
params[:controller] = 'catalog'
|
33
|
+
end
|
34
|
+
|
35
|
+
it "is the same as the catalog path" do
|
36
|
+
expect(helper.search_facet_path(id: "some_facet", page: 5)).to eq facet_catalog_path(id: "some_facet")
|
37
|
+
end
|
38
|
+
end
|
29
39
|
end
|
@@ -23,7 +23,7 @@ RSpec.describe Blacklight::Configuration::FacetField do
|
|
23
23
|
subject.normalize!
|
24
24
|
|
25
25
|
expect(subject.presenter).to eq Blacklight::FacetFieldPresenter
|
26
|
-
expect(subject.component).to eq Blacklight::
|
26
|
+
expect(subject.component).to eq Blacklight::Facets::ListComponent
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'when component is set to true' do
|
@@ -34,7 +34,7 @@ RSpec.describe Blacklight::Configuration::FacetField do
|
|
34
34
|
it 'casts to the default component' do
|
35
35
|
subject.normalize!
|
36
36
|
|
37
|
-
expect(subject.component).to eq Blacklight::
|
37
|
+
expect(subject.component).to eq Blacklight::Facets::ListComponent
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|