blacklight 8.12.2 → 8.13.0

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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.github/matrix.json +43 -26
  3. data/.github/workflows/test.yml +1 -2
  4. data/.rubocop.yml +151 -8
  5. data/.rubocop_todo.yml +65 -53
  6. data/VERSION +1 -1
  7. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
  8. data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
  9. data/app/components/blacklight/advanced_search_form_component.rb +2 -2
  10. data/app/components/blacklight/constraints_component.rb +2 -2
  11. data/app/components/blacklight/document/bookmark_component.rb +2 -2
  12. data/app/components/blacklight/document/more_like_this_component.rb +2 -2
  13. data/app/components/blacklight/icons/legacy_icon_component.rb +1 -1
  14. data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +2 -2
  15. data/app/controllers/concerns/blacklight/bookmarks.rb +5 -5
  16. data/app/controllers/concerns/blacklight/search_context.rb +1 -1
  17. data/app/controllers/concerns/blacklight/search_history.rb +1 -1
  18. data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -2
  19. data/app/helpers/blacklight/icon_helper_behavior.rb +3 -3
  20. data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
  21. data/app/models/blacklight/icon.rb +3 -2
  22. data/app/models/concerns/blacklight/user.rb +1 -0
  23. data/app/presenters/blacklight/facet_field_presenter.rb +2 -2
  24. data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
  25. data/app/presenters/blacklight/rendering/join.rb +2 -2
  26. data/app/presenters/blacklight/rendering/microdata.rb +1 -0
  27. data/app/values/blacklight/types.rb +2 -2
  28. data/app/views/catalog/_email_form.html.erb +2 -2
  29. data/app/views/catalog/_sms_form.html.erb +2 -2
  30. data/blacklight.gemspec +1 -1
  31. data/lib/blacklight/abstract_repository.rb +2 -2
  32. data/lib/blacklight/component.rb +2 -0
  33. data/lib/blacklight/configuration/context.rb +3 -3
  34. data/lib/blacklight/configuration/display_field.rb +1 -1
  35. data/lib/blacklight/configuration/field.rb +10 -10
  36. data/lib/blacklight/configuration/fields.rb +3 -3
  37. data/lib/blacklight/configuration/sort_field.rb +2 -2
  38. data/lib/blacklight/configuration/view_config.rb +2 -2
  39. data/lib/blacklight/configuration.rb +1 -1
  40. data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
  41. data/lib/blacklight/open_struct_with_hash_access.rb +5 -5
  42. data/lib/blacklight/parameters.rb +1 -1
  43. data/lib/blacklight/search_builder.rb +4 -4
  44. data/lib/blacklight/search_state/filter_field.rb +2 -2
  45. data/lib/blacklight/search_state/pivot_filter_field.rb +1 -1
  46. data/lib/blacklight/solr/request.rb +1 -1
  47. data/lib/blacklight/solr/response/facets.rb +2 -2
  48. data/lib/blacklight/solr/response/group_response.rb +2 -2
  49. data/lib/blacklight/solr/response.rb +4 -1
  50. data/lib/blacklight.rb +1 -1
  51. data/lib/generators/blacklight/assets/importmap_generator.rb +28 -3
  52. data/lib/generators/blacklight/search_builder_generator.rb +1 -1
  53. data/lib/generators/blacklight/templates/solr/conf/schema.xml +264 -178
  54. data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +6 -18
  55. data/package.json +1 -1
  56. data/spec/components/blacklight/document/action_component_spec.rb +1 -1
  57. data/spec/components/blacklight/document/group_component_spec.rb +1 -1
  58. data/spec/components/blacklight/document_component_spec.rb +9 -9
  59. data/spec/components/blacklight/facet_component_spec.rb +2 -2
  60. data/spec/components/blacklight/facet_field_list_component_spec.rb +1 -1
  61. data/spec/controllers/catalog_controller_spec.rb +2 -2
  62. data/spec/features/advanced_search_spec.rb +12 -12
  63. data/spec/features/bookmarks_spec.rb +12 -12
  64. data/spec/features/did_you_mean_spec.rb +17 -17
  65. data/spec/features/facet_missing_spec.rb +3 -3
  66. data/spec/features/modal_spec.rb +1 -1
  67. data/spec/features/record_view_spec.rb +14 -14
  68. data/spec/features/search_context_spec.rb +7 -7
  69. data/spec/features/search_filters_spec.rb +12 -12
  70. data/spec/features/search_formats_spec.rb +2 -2
  71. data/spec/features/search_history_spec.rb +11 -11
  72. data/spec/features/search_pagination_spec.rb +9 -9
  73. data/spec/features/search_results_spec.rb +3 -3
  74. data/spec/features/search_sort_spec.rb +4 -4
  75. data/spec/features/search_spec.rb +15 -15
  76. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +14 -14
  77. data/spec/helpers/blacklight_helper_spec.rb +6 -0
  78. data/spec/helpers/catalog_helper_spec.rb +6 -6
  79. data/spec/lib/blacklight/open_struct_with_hash_access_spec.rb +7 -0
  80. data/spec/lib/blacklight/search_state/pivot_filter_field_spec.rb +1 -1
  81. data/spec/models/record_mailer_spec.rb +5 -5
  82. data/spec/models/solr_document_spec.rb +5 -1
  83. data/spec/presenters/blacklight/index_presenter_spec.rb +1 -0
  84. data/spec/presenters/blacklight/rendering/pipeline_spec.rb +1 -0
  85. data/spec/presenters/blacklight/show_presenter_spec.rb +1 -0
  86. data/spec/presenters/blacklight/thumbnail_presenter_spec.rb +1 -0
  87. data/spec/views/catalog/_document.html.erb_spec.rb +4 -4
  88. data/spec/views/catalog/_search_header.erb_spec.rb +2 -2
  89. data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +5 -5
  90. data/spec/views/catalog/facet.html.erb_spec.rb +1 -1
  91. data/spec/views/catalog/index.html.erb_spec.rb +2 -2
  92. data/spec/views/catalog/show.html.erb_spec.rb +3 -3
  93. metadata +7 -10
@@ -4,11 +4,9 @@
4
4
  from this file. Please refer to http://wiki.apache.org/solr/SolrConfigXml,
5
5
  as well as the default solrconfig file included with Solr -->
6
6
 
7
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
7
+ <luceneMatchVersion>9.0.0</luceneMatchVersion>
8
8
 
9
- <luceneMatchVersion>6.1.0</luceneMatchVersion>
10
-
11
- <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
9
+ <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}" />
12
10
 
13
11
  <updateHandler class="solr.DirectUpdateHandler2">
14
12
  <updateLog>
@@ -16,17 +14,11 @@
16
14
  </updateLog>
17
15
  </updateHandler>
18
16
 
19
- <!-- solr lib dirs, which are needed for Solr 8 compatibility but ignored in solr 9.8 and above -->
20
17
  <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
21
- <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
22
- <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
23
18
 
24
19
  <dataDir>${solr.data.dir:}</dataDir>
25
20
 
26
- <requestHandler name="search" class="solr.SearchHandler" default="true">
27
- <!-- default values for query parameters can be specified, these
28
- will be overridden by parameters in the request
29
- -->
21
+ <requestHandler name="/select" class="solr.SearchHandler">
30
22
  <lst name="defaults">
31
23
  <str name="defType">edismax</str>
32
24
  <str name="echoParams">explicit</str>
@@ -47,7 +39,6 @@
47
39
  full_title_tsim
48
40
  short_title_tsim
49
41
  alternative_title_tsim
50
- active_fedora_model_ssi
51
42
  title_tsim
52
43
  author_tsim
53
44
  subject_tsim
@@ -84,7 +75,6 @@
84
75
  <str name="facet">true</str>
85
76
  <str name="facet.mincount">1</str>
86
77
  <str name="facet.limit">10</str>
87
- <str name="facet.field">active_fedora_model_ssi</str>
88
78
  <str name="facet.field">subject_ssim</str>
89
79
 
90
80
  <str name="spellcheck">true</str>
@@ -116,7 +106,6 @@
116
106
  full_title_tsim
117
107
  short_title_tsim
118
108
  alternative_title_tsim
119
- active_fedora_model_ssi
120
109
  title_tsim
121
110
  author_tsim
122
111
  subject_tsim
@@ -153,7 +142,6 @@
153
142
  <str name="facet">true</str>
154
143
  <str name="facet.mincount">1</str>
155
144
  <str name="facet.limit">10</str>
156
- <str name="facet.field">active_fedora_model_ssi</str>
157
145
  <str name="facet.field">subject_ssim</str>
158
146
 
159
147
  <str name="spellcheck">true</str>
@@ -169,7 +157,7 @@
169
157
  </arr>
170
158
  </requestHandler>
171
159
 
172
- <requestHandler name="permissions" class="solr.SearchHandler" >
160
+ <requestHandler name="permissions" class="solr.SearchHandler">
173
161
  <lst name="defaults">
174
162
  <str name="facet">off</str>
175
163
  <str name="echoParams">all</str>
@@ -257,8 +245,8 @@
257
245
 
258
246
  <requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
259
247
 
260
- <requestDispatcher handleSelect="true" >
261
- <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
248
+ <requestDispatcher>
249
+ <requestParsers multipartUploadLimitInKB="2048" />
262
250
  </requestDispatcher>
263
251
 
264
252
  <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-frontend",
3
- "version": "8.12.2",
3
+ "version": "8.13.0",
4
4
  "description": "The frontend code and styles for Blacklight",
5
5
  "main": "app/assets/javascripts/blacklight",
6
6
  "type": "module",
@@ -38,7 +38,7 @@ RSpec.describe Blacklight::Document::ActionComponent, type: :component do
38
38
  it 'render the partial' do
39
39
  allow(view_context).to receive(:render).with(hash_including(partial: '/some/tool'), {}).and_return('tool')
40
40
 
41
- expect(rendered).to have_content 'tool'
41
+ expect(rendered).to have_text 'tool'
42
42
  end
43
43
  end
44
44
  end
@@ -32,7 +32,7 @@ RSpec.describe Blacklight::Document::GroupComponent, type: :component do
32
32
  end
33
33
 
34
34
  it 'renders the group documents' do
35
- expect(rendered).to have_content 'results'
35
+ expect(rendered).to have_text 'results'
36
36
  end
37
37
 
38
38
  context 'with a limit applied' do
@@ -48,11 +48,11 @@ RSpec.describe Blacklight::DocumentComponent, type: :component do
48
48
  component.with_actions { 'Actions' }
49
49
  render_inline component
50
50
 
51
- expect(rendered).to have_content 'Title'
52
- expect(rendered).to have_content 'Embed'
53
- expect(rendered).to have_content 'Metadata'
54
- expect(rendered).to have_content 'Thumbnail'
55
- expect(rendered).to have_content 'Actions'
51
+ expect(rendered).to have_text 'Title'
52
+ expect(rendered).to have_text 'Embed'
53
+ expect(rendered).to have_text 'Metadata'
54
+ expect(rendered).to have_text 'Thumbnail'
55
+ expect(rendered).to have_text 'Actions'
56
56
  end
57
57
 
58
58
  it 'has schema.org properties' do
@@ -68,7 +68,7 @@ RSpec.describe Blacklight::DocumentComponent, type: :component do
68
68
  component.with_body { 'Body content' }
69
69
  render_inline component
70
70
 
71
- expect(rendered).to have_content 'Body content'
71
+ expect(rendered).to have_text 'Body content'
72
72
  expect(rendered).to have_no_css 'header'
73
73
  expect(rendered).to have_no_css 'dl'
74
74
  end
@@ -160,7 +160,7 @@ RSpec.describe Blacklight::DocumentComponent, type: :component do
160
160
  end)
161
161
 
162
162
  blacklight_config.show.embed_component = StubComponent
163
- expect(rendered).to have_content 'embed'
163
+ expect(rendered).to have_text 'embed'
164
164
  end
165
165
 
166
166
  context 'show view with custom translation' do
@@ -226,7 +226,7 @@ RSpec.describe Blacklight::DocumentComponent, type: :component do
226
226
 
227
227
  it 'renders partials' do
228
228
  component.with_partial { 'Partials' }
229
- expect(rendered).to have_content 'Partials'
229
+ expect(rendered).to have_text 'Partials'
230
230
  end
231
231
 
232
232
  it 'has no partials by default' do
@@ -245,7 +245,7 @@ RSpec.describe Blacklight::DocumentComponent, type: :component do
245
245
  end
246
246
 
247
247
  it 'shows the prefix' do
248
- expect(rendered).to have_content "Prefix!"
248
+ expect(rendered).to have_text "Prefix!"
249
249
  end
250
250
  end
251
251
  end
@@ -36,7 +36,7 @@ RSpec.describe Blacklight::FacetComponent, type: :component do
36
36
  end
37
37
 
38
38
  it 'renders the provided component' do
39
- expect(rendered).to have_content 'Custom facet rendering'
39
+ expect(rendered).to have_text 'Custom facet rendering'
40
40
  end
41
41
  end
42
42
 
@@ -60,7 +60,7 @@ RSpec.describe Blacklight::FacetComponent, type: :component do
60
60
  end
61
61
 
62
62
  it 'renders the partial' do
63
- expect(rendered).to have_content 'facet partial'
63
+ expect(rendered).to have_text 'facet partial'
64
64
  end
65
65
  end
66
66
 
@@ -133,7 +133,7 @@ RSpec.describe Blacklight::FacetFieldListComponent, type: :component do
133
133
  let(:params) { { f_inclusive: { field: %w[a b c] } } }
134
134
 
135
135
  it 'displays the constraint above the list' do
136
- expect(rendered).to have_content 'Any of:'
136
+ expect(rendered).to have_text 'Any of:'
137
137
  expect(rendered).to have_css '.inclusive_or .facet-label', text: 'a'
138
138
  expect(rendered).to have_link '[remove]', href: 'http://test.host/catalog?f_inclusive%5Bfield%5D%5B%5D=b&f_inclusive%5Bfield%5D%5B%5D=c'
139
139
  expect(rendered).to have_css '.inclusive_or .facet-label', text: 'b'
@@ -440,7 +440,7 @@ RSpec.describe CatalogController, :api do
440
440
  it "responds to an extension-registered format properly" do
441
441
  get :show, params: { id: doc_id, format: 'mock' }
442
442
  expect(response).to be_successful
443
- expect(response.body).to match /mock_export/
443
+ expect(response.body).to include('mock_export')
444
444
  end
445
445
  end # dynamic export formats
446
446
  end # describe show action
@@ -595,7 +595,7 @@ RSpec.describe CatalogController, :api do
595
595
 
596
596
  it "does not show user util links" do
597
597
  get :index
598
- expect(response.body).not_to match /Login/
598
+ expect(response.body).not_to include('Login')
599
599
  end
600
600
  end
601
601
 
@@ -53,7 +53,7 @@ RSpec.describe "Blacklight Advanced Search Form" do
53
53
  expect(page).to have_css('.blacklight-language_ssim')
54
54
 
55
55
  within('.blacklight-language_ssim') do
56
- expect(page).to have_content 'Language'
56
+ expect(page).to have_text 'Language'
57
57
  end
58
58
  end
59
59
  end
@@ -61,8 +61,8 @@ RSpec.describe "Blacklight Advanced Search Form" do
61
61
  it 'scopes searches to fields' do
62
62
  fill_in 'Title', with: 'Medicine'
63
63
  click_on 'advanced-search-submit'
64
- expect(page).to have_content 'Remove constraint Title: Medicine'
65
- expect(page).to have_content 'Strong Medicine speaks'
64
+ expect(page).to have_text 'Remove constraint Title: Medicine'
65
+ expect(page).to have_text 'Strong Medicine speaks'
66
66
  expect(page).to have_css('article.document', count: 1)
67
67
  end
68
68
 
@@ -71,16 +71,16 @@ RSpec.describe "Blacklight Advanced Search Form" do
71
71
  click_on 'Language'
72
72
  check 'Urdu 3'
73
73
  click_on 'advanced-search-submit'
74
- expect(page).to have_content 'Pākistānī ʻaurat dorāhe par'
75
- expect(page).to have_no_content 'Ajikto kŭrŏk chŏrŏk sasimnikka : and 아직도 그럭 저럭 사십니까'
74
+ expect(page).to have_text 'Pākistānī ʻaurat dorāhe par'
75
+ expect(page).to have_no_text 'Ajikto kŭrŏk chŏrŏk sasimnikka : and 아직도 그럭 저럭 사십니까'
76
76
  expect(page).to have_css('article.document', count: 1)
77
77
  end
78
78
 
79
79
  it 'handles boolean queries' do
80
80
  fill_in 'All Fields', with: 'history NOT strong'
81
81
  click_on 'advanced-search-submit'
82
- expect(page).to have_content('Ci an zhou bian')
83
- expect(page).to have_no_content('Strong Medicine speaks')
82
+ expect(page).to have_text('Ci an zhou bian')
83
+ expect(page).to have_no_text('Strong Medicine speaks')
84
84
  expect(page).to have_css('article.document', count: 10)
85
85
  end
86
86
 
@@ -88,7 +88,7 @@ RSpec.describe "Blacklight Advanced Search Form" do
88
88
  fill_in 'All Fields', with: 'history'
89
89
  fill_in 'Author', with: 'hearth'
90
90
  click_on 'advanced-search-submit'
91
- expect(page).to have_content('Strong Medicine speaks')
91
+ expect(page).to have_text('Strong Medicine speaks')
92
92
  expect(page).to have_css('article.document', count: 1)
93
93
  end
94
94
 
@@ -97,8 +97,8 @@ RSpec.describe "Blacklight Advanced Search Form" do
97
97
  fill_in 'All Fields', with: 'history'
98
98
  fill_in 'Subject', with: 'women'
99
99
  click_on 'advanced-search-submit'
100
- expect(page).to have_content('Ci an zhou bian')
101
- expect(page).to have_content('Pākistānī ʻaurat dorāhe par')
100
+ expect(page).to have_text('Ci an zhou bian')
101
+ expect(page).to have_text('Pākistānī ʻaurat dorāhe par')
102
102
  expect(page).to have_css('article.document', count: 10)
103
103
  end
104
104
  end
@@ -127,8 +127,8 @@ RSpec.describe "Blacklight Advanced Search Form" do
127
127
  it "does not have multiple parameters for a search field" do
128
128
  fill_in 'Title', with: 'bread'
129
129
  click_on 'advanced-search-submit'
130
- expect(page.current_url).to match(/bread/)
131
- expect(page.current_url).not_to match(/medicine/)
130
+ expect(page.current_url).to include('bread')
131
+ expect(page.current_url).not_to include('medicine')
132
132
  end
133
133
 
134
134
  it "clears the prepopulated fields when the Start Over button is pressed" do
@@ -6,7 +6,7 @@ RSpec.describe "Bookmarks" do
6
6
  sign_in 'user1'
7
7
  visit root_path
8
8
  click_on 'Bookmarks'
9
- expect(page).to have_content 'You have no bookmarks'
9
+ expect(page).to have_text 'You have no bookmarks'
10
10
  end
11
11
  end
12
12
 
@@ -15,8 +15,8 @@ RSpec.describe "Bookmarks" do
15
15
  click_on 'Bookmark'
16
16
  click_on 'Bookmarks'
17
17
  click_on 'Clear Bookmarks'
18
- expect(page).to have_content 'Cleared your bookmarks.'
19
- expect(page).to have_content 'You have no bookmarks'
18
+ expect(page).to have_text 'Cleared your bookmarks.'
19
+ expect(page).to have_text 'You have no bookmarks'
20
20
  end
21
21
 
22
22
  it "add and remove bookmarks from search results" do
@@ -25,11 +25,11 @@ RSpec.describe "Bookmarks" do
25
25
  fill_in "q", with: 'Sumadhvavijayaḥ'
26
26
  click_on 'search'
27
27
  click_on 'Bookmark'
28
- expect(page).to have_content 'Successfully added bookmark.'
28
+ expect(page).to have_text 'Successfully added bookmark.'
29
29
  fill_in "q", with: 'Sumadhvavijayaḥ'
30
30
  click_on 'search'
31
31
  click_on 'Remove bookmark'
32
- expect(page).to have_content 'Successfully removed bookmark.'
32
+ expect(page).to have_text 'Successfully removed bookmark.'
33
33
  end
34
34
 
35
35
  it "adds and delete bookmarks from the show page" do
@@ -37,7 +37,7 @@ RSpec.describe "Bookmarks" do
37
37
  visit solr_document_path('2007020969')
38
38
  click_on 'Bookmark'
39
39
  click_on 'Remove bookmark'
40
- expect(page).to have_content 'Successfully removed bookmark.'
40
+ expect(page).to have_text 'Successfully removed bookmark.'
41
41
  end
42
42
 
43
43
  it 'shows bookmarks as checkboxes', :js do
@@ -55,7 +55,7 @@ RSpec.describe "Bookmarks" do
55
55
  sign_in 'user1'
56
56
  visit bookmarks_path
57
57
  expect(page).to have_button("Remove bookmark")
58
- expect(page).to have_content("Strong Medicine speaks")
58
+ expect(page).to have_text("Strong Medicine speaks")
59
59
  end
60
60
 
61
61
  it "cites items in bookmarks" do
@@ -63,7 +63,7 @@ RSpec.describe "Bookmarks" do
63
63
  click_on 'Bookmark'
64
64
  click_on 'Bookmarks'
65
65
  click_on 'Cite'
66
- expect(page).to have_content 'Strong Medicine speaks'
66
+ expect(page).to have_text 'Strong Medicine speaks'
67
67
  end
68
68
 
69
69
  it "cites all items in current bookmarks" do
@@ -74,12 +74,12 @@ RSpec.describe "Bookmarks" do
74
74
  click_on 'Bookmark'
75
75
 
76
76
  visit "/bookmarks?per_page=1"
77
- expect(page).to have_content 'Strong Medicine speaks'
78
- expect(page).to have_no_content 'Ci an zhou bian'
77
+ expect(page).to have_text 'Strong Medicine speaks'
78
+ expect(page).to have_no_text 'Ci an zhou bian'
79
79
 
80
80
  click_on 'Cite'
81
- expect(page).to have_content 'Strong Medicine speaks'
82
- expect(page).to have_content 'Ci an zhou bian'
81
+ expect(page).to have_text 'Strong Medicine speaks'
82
+ expect(page).to have_text 'Ci an zhou bian'
83
83
  end
84
84
 
85
85
  context "has bookmark icon" do
@@ -8,10 +8,10 @@ RSpec.describe "Did You Mean" do
8
8
  fill_in "q", with: 'politica'
9
9
  click_on 'search'
10
10
 
11
- expect(page).to have_content("Did you mean")
11
+ expect(page).to have_text("Did you mean")
12
12
  click_on 'policy'
13
13
  within ("#sortAndPerPage") do
14
- expect(page).to have_content "1 - 2 of 2"
14
+ expect(page).to have_text "1 - 2 of 2"
15
15
  end
16
16
  end
17
17
  end
@@ -24,10 +24,10 @@ RSpec.describe "Did You Mean" do
24
24
  fill_in "q", with: 'yehudiyam'
25
25
  click_on 'search'
26
26
 
27
- expect(page).to have_content("Did you mean")
27
+ expect(page).to have_text("Did you mean")
28
28
  click_on 'yehudiyim'
29
29
  within ("#sortAndPerPage") do
30
- expect(page).to have_content "1 entry found"
30
+ expect(page).to have_text "1 entry found"
31
31
  end
32
32
  within ("select#search_field") do
33
33
  expect(page).to have_css("option[selected]", text: "Title")
@@ -43,10 +43,10 @@ RSpec.describe "Did You Mean" do
43
43
  fill_in "q", with: 'shirma'
44
44
  click_on 'search'
45
45
 
46
- expect(page).to have_content("Did you mean")
46
+ expect(page).to have_text("Did you mean")
47
47
  click_on 'sharma'
48
48
  within ("#sortAndPerPage") do
49
- expect(page).to have_content "1 entry found"
49
+ expect(page).to have_text "1 entry found"
50
50
  end
51
51
  within ("select#search_field") do
52
52
  expect(page).to have_css("option[selected]", text: "Author")
@@ -62,10 +62,10 @@ RSpec.describe "Did You Mean" do
62
62
  fill_in "q", with: 'wome'
63
63
  click_on 'search'
64
64
 
65
- expect(page).to have_content("Did you mean")
65
+ expect(page).to have_text("Did you mean")
66
66
  click_on 'women'
67
67
  within ("#sortAndPerPage") do
68
- expect(page).to have_content "1 - 3 of 3"
68
+ expect(page).to have_text "1 - 3 of 3"
69
69
  end
70
70
  within ("select#search_field") do
71
71
  expect(page).to have_css("option[selected]", text: "Subject")
@@ -78,7 +78,7 @@ RSpec.describe "Did You Mean" do
78
78
  fill_in "q", with: 'ooofda ooofda'
79
79
  click_on 'search'
80
80
 
81
- expect(page).to have_no_content("Did you mean")
81
+ expect(page).to have_no_text("Did you mean")
82
82
  end
83
83
 
84
84
  it "has separate suggestions" do
@@ -86,7 +86,7 @@ RSpec.describe "Did You Mean" do
86
86
  click_on 'search'
87
87
 
88
88
  within(".suggest") do
89
- expect(page).to have_content("Did you mean")
89
+ expect(page).to have_text("Did you mean")
90
90
  expect(page).to have_link('policy')
91
91
  expect(page).to have_link('bon')
92
92
  expect(page).to have_no_link('policy bon')
@@ -94,7 +94,7 @@ RSpec.describe "Did You Mean" do
94
94
 
95
95
  click_on 'bon'
96
96
  within ("#sortAndPerPage") do
97
- expect(page).to have_content "1 entry found"
97
+ expect(page).to have_text "1 entry found"
98
98
  end
99
99
  end
100
100
 
@@ -103,7 +103,7 @@ RSpec.describe "Did You Mean" do
103
103
  click_on 'search'
104
104
 
105
105
  within(".suggest") do
106
- expect(page).to have_content("Did you mean")
106
+ expect(page).to have_text("Did you mean")
107
107
  expect(page).to have_link('bon', count: 1)
108
108
  expect(page).to have_no_link('bon bon')
109
109
  end
@@ -114,10 +114,10 @@ RSpec.describe "Did You Mean" do
114
114
  fill_in "q", with: 'ayaz'
115
115
  click_on 'search'
116
116
 
117
- expect(page).to have_content("Did you mean")
117
+ expect(page).to have_text("Did you mean")
118
118
  click_on 'bya'
119
119
  within ("#sortAndPerPage") do
120
- expect(page).to have_content "1 - 3 of 3"
120
+ expect(page).to have_text "1 - 3 of 3"
121
121
  end
122
122
  end
123
123
 
@@ -125,7 +125,7 @@ RSpec.describe "Did You Mean" do
125
125
  # polit gives 5 results in 30 record demo index - 5 is default cutoff
126
126
  fill_in "q", with: 'polit'
127
127
  click_on 'search'
128
- expect(page).to have_content("Did you mean")
128
+ expect(page).to have_text("Did you mean")
129
129
  end
130
130
 
131
131
  context 'spellcheck collations are enabled' do
@@ -141,10 +141,10 @@ RSpec.describe "Did You Mean" do
141
141
  fill_in "q", with: 'Yoshido Hajime'
142
142
  click_on 'search'
143
143
 
144
- expect(page).to have_content("Did you mean")
144
+ expect(page).to have_text("Did you mean")
145
145
  click_on 'yoshida Hajime'
146
146
  within ("#sortAndPerPage") do
147
- expect(page).to have_content "1 - 2 of 2"
147
+ expect(page).to have_text "1 - 2 of 2"
148
148
  end
149
149
  end
150
150
  end
@@ -23,7 +23,7 @@ RSpec.describe "Facet missing" do
23
23
  end
24
24
 
25
25
  within "#sortAndPerPage" do
26
- expect(page).to have_content "1 - 10 of 13"
26
+ expect(page).to have_text "1 - 10 of 13"
27
27
  end
28
28
 
29
29
  expect(page).to have_css(".constraint-value", text: "Region")
@@ -44,7 +44,7 @@ RSpec.describe "Facet missing" do
44
44
  end
45
45
 
46
46
  expect(page).to have_no_link "remove"
47
- expect(page).to have_content("Welcome!")
47
+ expect(page).to have_text("Welcome!")
48
48
  end
49
49
  end
50
50
 
@@ -61,7 +61,7 @@ RSpec.describe "Facet missing" do
61
61
  end
62
62
 
63
63
  expect(page).to have_no_link "remove"
64
- expect(page).to have_content("Welcome!")
64
+ expect(page).to have_text("Welcome!")
65
65
  end
66
66
  end
67
67
  end
@@ -3,7 +3,7 @@
3
3
  RSpec.describe 'Modal' do
4
4
  it 'can open and dismiss the email modal', :js do
5
5
  visit solr_document_path('2007020969')
6
- expect(page).to have_no_selector 'dialog#blacklight-modal'
6
+ expect(page).to have_no_css 'dialog#blacklight-modal'
7
7
  click_on 'Email'
8
8
  expect(page).to have_css 'dialog#blacklight-modal'
9
9
  click_on '×'
@@ -3,16 +3,16 @@
3
3
  RSpec.describe "Record View" do
4
4
  it "displays a normal record" do
5
5
  visit solr_document_path('2007020969')
6
- expect(page).to have_content "Title:"
7
- expect(page).to have_content "Strong Medicine speaks"
8
- expect(page).to have_content "Subtitle:"
9
- expect(page).to have_content "a Native American elder has her say : an oral history"
10
- expect(page).to have_content "Author:"
11
- expect(page).to have_content "Hearth, Amy Hill, 1958-"
12
- expect(page).to have_content "Format:"
13
- expect(page).to have_content "Book"
14
- expect(page).to have_content "Call number:"
15
- expect(page).to have_content "E99.D2 H437 2008"
6
+ expect(page).to have_text "Title:"
7
+ expect(page).to have_text "Strong Medicine speaks"
8
+ expect(page).to have_text "Subtitle:"
9
+ expect(page).to have_text "a Native American elder has her say : an oral history"
10
+ expect(page).to have_text "Author:"
11
+ expect(page).to have_text "Hearth, Amy Hill, 1958-"
12
+ expect(page).to have_text "Format:"
13
+ expect(page).to have_text "Book"
14
+ expect(page).to have_text "Call number:"
15
+ expect(page).to have_text "E99.D2 H437 2008"
16
16
  tmp_value = Capybara.ignore_hidden_elements
17
17
  Capybara.ignore_hidden_elements = false
18
18
  expect(page).to have_css("link[rel=alternate]")
@@ -21,13 +21,13 @@ RSpec.describe "Record View" do
21
21
 
22
22
  it "does not display blank titles" do
23
23
  visit solr_document_path('2008305903')
24
- expect(page).to have_no_content "More Information:"
24
+ expect(page).to have_no_text "More Information:"
25
25
  end
26
26
 
27
27
  it "does not display vernacular records" do
28
28
  visit solr_document_path('2009373513')
29
- expect(page).to have_content "次按驟變"
30
- expect(page).to have_content "林行止"
31
- expect(page).to have_content "臺北縣板橋市"
29
+ expect(page).to have_text "次按驟變"
30
+ expect(page).to have_text "林行止"
31
+ expect(page).to have_text "臺北縣板橋市"
32
32
  end
33
33
  end
@@ -5,12 +5,12 @@ RSpec.describe "Search Results context" do
5
5
  search_for ''
6
6
  click_on 'Pluvial nectar of blessings'
7
7
  search_id = Search.last.id.to_s
8
- expect(page).to have_content "« Previous | 10 of 30 | Next »"
8
+ expect(page).to have_text "« Previous | 10 of 30 | Next »"
9
9
  prev = page.find(".pagination-search-widgets .previous")
10
10
  expect(prev['data-context-href']).to eq "/catalog/2003546302/track?counter=9&document_id=2003546302&search_id=#{search_id}"
11
11
 
12
12
  click_on "« Previous"
13
- expect(page).to have_content "U21.2 .W85 2003"
13
+ expect(page).to have_text "U21.2 .W85 2003"
14
14
 
15
15
  prev = page.find(".pagination-search-widgets .previous")
16
16
  expect(prev['data-context-href']).to eq "/catalog/2004310986/track?counter=8&document_id=2004310986&search_id=#{search_id}"
@@ -19,8 +19,8 @@ RSpec.describe "Search Results context" do
19
19
  it "redirects context urls to the original url", :js do
20
20
  search_for ''
21
21
  first('.index_title a').click
22
- expect(page).to have_content "« Previous | 1 of 30 | Next »"
23
- expect(page.current_url).to have_no_content "/track"
22
+ expect(page).to have_text "« Previous | 1 of 30 | Next »"
23
+ expect(page.current_url).to have_no_text "/track"
24
24
  end
25
25
 
26
26
  it 'shows "Back to Search" and "Start Over links"' do
@@ -39,20 +39,20 @@ RSpec.describe "Search Results context" do
39
39
  # Go to the number 9 result separately
40
40
  visit '/catalog/2003546302'
41
41
  expect(page).to have_no_css '.page-links'
42
- expect(page).to have_no_content "« Previous | 10 of 30 | Next »"
42
+ expect(page).to have_no_text "« Previous | 10 of 30 | Next »"
43
43
  end
44
44
 
45
45
  context "navigating between search results using context pagination" do
46
46
  it "updates the back to search link with the current search pagination context", :js do
47
47
  search_for ''
48
- expect(page).to have_content "1 - 10"
48
+ expect(page).to have_text "1 - 10"
49
49
  find_all('.index_title a').last.click
50
50
  expect(page).to have_css "h1", text: "Pluvial nectar"
51
51
  click_on "Next »"
52
52
 
53
53
  expect(page).to have_css "h1", text: "Naqdī barā-yi tamām-i"
54
54
  click_on "Back to Search"
55
- expect(page).to have_content "11 - 20"
55
+ expect(page).to have_text "11 - 20"
56
56
  end
57
57
  end
58
58
  end