blacklight-spotlight 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@ feature 'Search Configuration Administration', js: true do
14
14
  end
15
15
  click_link 'Search'
16
16
 
17
+ expect(page).to have_css 'input#enable_feature', visible: true
17
18
  uncheck 'Display search box'
18
19
 
19
20
  click_button 'Save changes'
@@ -140,6 +140,14 @@ describe Spotlight::BlacklightConfiguration, type: :model do
140
140
  expect(subject.blacklight_config.index_fields['c'].list).to be_truthy
141
141
  end
142
142
 
143
+ it 'honors field specfic display settings set in the field configuration' do
144
+ blacklight_config.add_index_field 'a'
145
+ blacklight_config.add_index_field 'b', list: false
146
+
147
+ expect(subject.blacklight_config.index_fields['a'].list).to be_truthy
148
+ expect(subject.blacklight_config.index_fields['b'].list).to be_falsey
149
+ end
150
+
143
151
  it 'filters upstream fields that are always disabled' do
144
152
  blacklight_config.add_index_field 'a', if: false
145
153
  expect(subject.blacklight_config.index_fields).not_to have_key 'a'
@@ -35,6 +35,11 @@ describe Spotlight::SolrDocumentBuilder do
35
35
  expect(result).to include "spotlight_exhibit_slug_#{resource_alt.exhibit.slug}_bsi"
36
36
  end
37
37
 
38
+ it 'has a field with both exhibit slugs listed' do
39
+ result = resource.document_builder.documents_to_index.first
40
+ expect(result).to include 'spotlight_exhibit_slugs_ssim' => match_array([resource.exhibit.slug, resource_alt.exhibit.slug])
41
+ end
42
+
38
43
  it 'creates a sidecar resource for the document' do
39
44
  resource.document_builder.documents_to_index.first
40
45
 
@@ -87,8 +87,8 @@ class CatalogController < ApplicationController
87
87
  config.add_show_field 'corporate_name_ssm', label: 'Corporate Names'
88
88
 
89
89
  config.add_search_field 'all_fields', label: 'Everything'
90
- config.add_search_field 'title', label: 'Title', solr_local_parameters: { qf: 'full_title_tesim', pf: 'full_title_tesim' }
91
- config.add_search_field 'author', label: 'Author', solr_local_parameters: { qf: '$qf_author', pf: '$pf_author' }
90
+ config.add_search_field 'title', label: 'Title', solr_parameters: { qf: 'full_title_tesim', pf: 'full_title_tesim' }
91
+ config.add_search_field 'author', label: 'Author', solr_parameters: { qf: '${qf_author}', pf: '${pf_author}' }
92
92
 
93
93
  config.add_sort_field 'relevance', sort: 'score desc, sort_title_ssi asc', label: 'Relevance'
94
94
  config.add_sort_field 'title', sort: 'sort_title_ssi asc', label: 'Title'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-12-12 00:00:00.000000000 Z
14
+ date: 2018-01-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails