geoblacklight 4.0.0.pre.rc1 → 4.0.0.pre.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +14 -58
  3. data/.solr_wrapper +1 -0
  4. data/app/models/concerns/geoblacklight/bbox_filter_field.rb +27 -8
  5. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +7 -2
  6. data/app/views/shared/_header_navbar.html.erb +13 -3
  7. data/config/locales/geoblacklight.en.yml +1 -0
  8. data/geoblacklight.gemspec +1 -1
  9. data/lib/generators/geoblacklight/templates/catalog_controller.rb +21 -10
  10. data/lib/generators/geoblacklight/templates/settings.yml +7 -2
  11. data/lib/geoblacklight/bounding_box.rb +1 -1
  12. data/lib/geoblacklight/version.rb +1 -1
  13. data/spec/config/initializers/rails_config_spec.rb +1 -1
  14. data/spec/controllers/wms_controller_spec.rb +1 -1
  15. data/spec/features/relations_spec.rb +11 -0
  16. data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +62 -0
  17. data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +64 -0
  18. data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +62 -0
  19. data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +62 -0
  20. data/spec/fixtures/solr_documents/b1g_wabash_parent.json +59 -0
  21. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +1 -1
  22. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +1 -1
  23. data/spec/lib/geoblacklight/references_spec.rb +5 -3
  24. data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -1
  25. data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +36 -17
  26. data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +6 -6
  27. data/spec/spec_helper.rb +2 -2
  28. data/vendor/assets/javascripts/leaflet-src.js.erb +10354 -10290
  29. data/vendor/assets/javascripts/leaflet-src.js.map +1 -1
  30. metadata +20 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e35f0dd973e0bd06a6e80c4b2c10df2603312a4b2a8e8a750a57e3a289929a82
4
- data.tar.gz: addf3e2ca5fc2f91d4a99f96181949c3f85bfa928b1574a3128e3fcbc0856a57
3
+ metadata.gz: 2e016f04146c4adb059ab8e46fc9ab057bc6f3fbaddc93db8bc08f1cbd4f9109
4
+ data.tar.gz: 32ce106b04443cbcf338542e6cf249fac74fd1d3631ec07f8bd91f71cef65b5d
5
5
  SHA512:
6
- metadata.gz: 994da847b15fd940b705e1abf1c68a339384533bc4fee4221fa9af5550a8f4034fa7204c0d43624221e7ef1e78dc19dd45770bf68d7f202b1a322658a3d4893f
7
- data.tar.gz: c1817f025bff6255c3ee0b9576864c3d97855bd3a4f6f7754962b8054a31d1066d114ed18edf53d7d2bd66b0c0f449022abe9b5a0634c5007c3878af5b114ddc
6
+ metadata.gz: 434df1f2da05c35bc5aa86c3209810f6cc6cba302153a42e005aea9997ea59e1049deba575d720da8b8324c16d2cc14774507a591fba76bb043b94e39c7ad0c4
7
+ data.tar.gz: 4150a0c44452e67547212301a17ee1ace802784034845b7832f5cbcb82f686c9dbab68f93d6b61dcef54f5405fc7ab35312d4b100055f00a276f14efa2db7cc1
@@ -24,93 +24,49 @@ jobs:
24
24
  runs-on: ubuntu-latest
25
25
  strategy:
26
26
  matrix:
27
- ruby: [2.7, '3.0']
28
- faraday_version: ['']
27
+ ruby_version: ['3.0', 2.7]
28
+ rails_version: [6.1]
29
+ bundler_version: [2.1.1]
30
+ faraday_version: ['>= 2', '~> 1.0']
29
31
  include:
30
- - ruby: 2.7
32
+ - ruby_version: 2.6
33
+ rails_version: 6.1
34
+ bundler_version: 2.1.1
31
35
  faraday_version: '~> 1.0'
36
+ name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / faraday ${{ matrix.faraday_version }}
32
37
  steps:
33
38
  - uses: actions/checkout@v2
34
-
35
39
  - name: Set up Ruby
36
40
  uses: ruby/setup-ruby@v1
37
41
  with:
38
- ruby-version: ${{ matrix.ruby }}
39
-
42
+ ruby-version: ${{ matrix.ruby_version }}
40
43
  - name: Create Solr container
41
44
  run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
42
-
43
45
  - name: Install bundler
44
- run: gem install bundler -v 2.1.1
45
-
46
+ run: gem install bundler -v ${{ matrix.bundler_version }}
46
47
  - name: Install dependencies
47
- run: bundle _2.1.1_ install
48
+ run: bundle _${{ matrix.bundler_version }}_ install
48
49
  env:
49
- rails_version: 7.0.1
50
+ RAILS_VERSION: ${{ matrix.rails_version }}
50
51
  FARADAY_VERSION: ${{ matrix.faraday_version }}
51
-
52
52
  - name: Setup Yarn
53
53
  run: exec "yarnpkg"
54
-
55
54
  - name: Load config into solr
56
55
  run: |
57
56
  cd solr/conf
58
57
  zip -1 -r solr_config.zip ./*
59
58
  curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
60
59
  curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
61
-
62
60
  - name: Run tests
63
61
  run: bundle exec rake ci
64
62
  env:
65
- rails_version: 7.0.1
63
+ RAILS_VERSION: ${{ matrix.rails_version }}
64
+ FARADAY_VERSION: ${{ matrix.faraday_version }}
66
65
  ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
67
66
  SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
68
- FARADAY_VERSION: ${{ matrix.faraday_version }}
69
-
70
67
  - name: Upload coverage artifacts
71
68
  uses: actions/upload-artifact@v2
72
69
  if: always()
73
70
  with:
74
71
  name: coverage
75
72
  path: coverage/
76
-
77
- test_rails6_1:
78
- runs-on: ubuntu-latest
79
- strategy:
80
- matrix:
81
- ruby: [2.6]
82
- steps:
83
- - uses: actions/checkout@v2
84
-
85
- - name: Set up Ruby
86
- uses: ruby/setup-ruby@v1
87
- with:
88
- ruby-version: ${{ matrix.ruby }}
89
-
90
- - name: Create Solr container
91
- run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
92
-
93
- - name: Install bundler
94
- run: gem install bundler -v 2.1.1
95
-
96
- - name: Install dependencies
97
- run: bundle _2.1.1_ install
98
- env:
99
- RAILS_VERSION: 6.1.4.4
100
-
101
- - name: Setup Yarn
102
- run: exec "yarnpkg"
103
-
104
- - name: Load config into solr
105
- run: |
106
- cd solr/conf
107
- zip -1 -r solr_config.zip ./*
108
- curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
109
- curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
110
-
111
- - name: Run tests
112
- run: bundle exec rake ci
113
- env:
114
- RAILS_VERSION: 6.1.4.4
115
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
116
- SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
data/.solr_wrapper CHANGED
@@ -1,3 +1,4 @@
1
+ url: https://archive.apache.org/dist/lucene/solr/8.11.1/solr-8.11.1.zip
1
2
  validate: false
2
3
  instance_dir: tmp/solr
3
4
  download_dir: tmp/solr
@@ -2,6 +2,14 @@
2
2
 
3
3
  module Geoblacklight
4
4
  class BboxFilterField < Blacklight::SearchState::FilterField
5
+ # this accessor is unnecessary after Blacklight 7.25.0
6
+ attr_accessor :filters_key
7
+
8
+ def initialize(*args)
9
+ super
10
+ @filters_key = :bbox
11
+ end
12
+
5
13
  # @param [String,#value] a filter item to add to the url
6
14
  # @return [Blacklight::SearchState] new state
7
15
  def add(item)
@@ -9,7 +17,7 @@ module Geoblacklight
9
17
  params = new_state.params
10
18
  value = as_url_parameter(item)
11
19
 
12
- params[:bbox] = value.to_param
20
+ params[filters_key] = value.to_param
13
21
 
14
22
  new_state.reset(params)
15
23
  end
@@ -20,26 +28,37 @@ module Geoblacklight
20
28
  new_state = search_state.reset_search
21
29
  params = new_state.params
22
30
 
23
- params.delete(:bbox)
31
+ params.delete(filters_key)
24
32
  new_state.reset(params)
25
33
  end
26
34
 
27
35
  # @return [Array] an array of applied filters
28
- def values
36
+ def values(except: [])
29
37
  params = search_state.params
30
- return super unless params[:bbox]
31
-
32
- bbox = Geoblacklight::BoundingBox.from_rectangle(params[:bbox])
38
+ return [] if except.include?(:filters) || params[filters_key].blank?
33
39
 
34
- super + [bbox]
40
+ [Geoblacklight::BoundingBox.from_rectangle(params[filters_key])]
35
41
  rescue Geoblacklight::Exceptions::WrongBoundingBoxFormat => e
36
42
  Rails.logger.warn(e)
37
43
 
38
- super
44
+ []
39
45
  end
40
46
 
41
47
  # @param [String,#value] a filter to remove from the url
42
48
  # @return [Boolean] whether the provided filter is currently applied/selected
43
49
  delegate :include?, to: :values
50
+
51
+ # @since Blacklight v7.25.0
52
+ # normal filter fields demangle when they encounter a hash, which they assume to be a number-indexed map
53
+ def needs_normalization?(value_params)
54
+ value_params.is_a?(Hash) && value_params.keys.map(&:to_s).all? { |k| k =~ /^\d+$/ }
55
+ end
56
+
57
+ # @since Blacklight v7.25.0
58
+ # value should be the first value from a mangled hash,
59
+ # otherwise return the value as-is
60
+ def normalize(value_params)
61
+ needs_normalization?(value_params) ? value_params.values : value_params
62
+ end
44
63
  end
45
64
  end
@@ -12,8 +12,13 @@ module Geoblacklight
12
12
  # @param [Blacklight::Solr::Request]
13
13
  # @return [Blacklight::Solr::Request]
14
14
  def hide_suppressed_records(solr_params)
15
- # Show child records if searching for a specific source parent
16
- return unless blacklight_params.fetch(:f, {})[Settings.FIELDS.SOURCE.to_sym].nil?
15
+ # Show suppressed records when searching relationships
16
+ return if blacklight_params.fetch(:f,
17
+ {}).keys.any? do |field|
18
+ Settings.RELATIONSHIPS_SHOWN.map do |_key, value|
19
+ value.field
20
+ end.include?(field)
21
+ end
17
22
 
18
23
  # Do not suppress action_documents method calls for individual documents
19
24
  # ex. CatalogController#web_services (exportable views)
@@ -10,11 +10,16 @@
10
10
  </div>
11
11
  </div>
12
12
  </nav>
13
-
13
+ <%- renderable_fields = blacklight_config.search_fields.values.collect { |field_def| [label_for_search_field(field_def.key), field_def.key] if should_render_field?(field_def)}.compact %>
14
14
  <% if controller_name == 'catalog' && (has_search_parameters? || params[:action] == 'show') %>
15
15
  <div class="navbar-search navbar navbar-light bg-faded" role="navigation">
16
16
  <div class="<%= container_classes %> stuff">
17
- <%= render_search_bar %>
17
+ <%= render((blacklight_config&.view_config(document_index_view_type)&.search_bar_component ||Blacklight::SearchBarComponent).new(
18
+ url: search_action_url,
19
+ advanced_search_url: search_action_url(action: 'advanced_search'),
20
+ search_fields: renderable_fields,
21
+ params: search_state.params_for_search.except(:qt),
22
+ autocomplete_path: search_action_path(action: :suggest))) %>
18
23
  </div>
19
24
  </div>
20
25
  <% else %>
@@ -28,7 +33,12 @@
28
33
  <div class='row justify-content-md-center'>
29
34
  <div class='col-md-6 col-sm-12'>
30
35
  <div class='navbar-search'>
31
- <%= render_search_bar %>
36
+ <%= render((blacklight_config&.view_config(document_index_view_type)&.search_bar_component ||Blacklight::SearchBarComponent).new(
37
+ url: search_action_url,
38
+ advanced_search_url: search_action_url(action: 'advanced_search'),
39
+ search_fields: renderable_fields,
40
+ params: search_state.params_for_search.except(:qt),
41
+ autocomplete_path: search_action_path(action: :suggest))) %>
32
42
  </div>
33
43
  </div>
34
44
  </div>
@@ -73,6 +73,7 @@ en:
73
73
  descendant: 'Derived Datasets'
74
74
  member_of: 'Belongs to collection...'
75
75
  part_of: 'Is part of...'
76
+ part_of_descendants: 'Has part...'
76
77
  relation: 'Related Records'
77
78
  replaces: 'Item replaces...'
78
79
  replaced_by: 'Item replaced by...'
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_rubygems_version = '>= 2.5.2'
21
21
 
22
- spec.add_dependency 'rails', '>= 5.2.4', '< 6.2'
22
+ spec.add_dependency 'rails', '>= 6.1', '< 7'
23
23
  spec.add_dependency 'blacklight', '~> 7.12'
24
24
  spec.add_dependency 'config'
25
25
  spec.add_dependency 'faraday', '>= 1.0'
@@ -109,7 +109,6 @@ class CatalogController < ApplicationController
109
109
  config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
110
110
  config.add_facet_field Settings.FIELDS.PROVIDER, label: 'Provider', limit: 8, item_component: Geoblacklight::IconFacetItemComponent
111
111
  config.add_facet_field Settings.FIELDS.GEOREFERENCED, :label => 'Georeferenced', :limit => 3
112
- config.add_facet_field Settings.FIELDS.SOURCE, :label => 'Collection', :limit => 8, :show => false
113
112
 
114
113
  # GEOBLACKLIGHT APPLICATION FACETS
115
114
 
@@ -120,6 +119,18 @@ class CatalogController < ApplicationController
120
119
  # label - Defines the label used in contstraints container
121
120
  config.add_facet_field Settings.FIELDS.GEOMETRY, item_presenter: Geoblacklight::BboxItemPresenter, filter_class: Geoblacklight::BboxFilterField, filter_query_builder: Geoblacklight::BboxFilterQuery, within_boost: Settings.BBOX_WITHIN_BOOST, overlap_boost: Settings.OVERLAP_RATIO_BOOST, overlap_field: Settings.FIELDS.OVERLAP_FIELD, label: 'Bounding Box'
122
121
 
122
+ # Item Relationship Facets
123
+ # * Not displayed to end user (show: false)
124
+ # * Must be present for relationship "Browse all 4 records" links to work
125
+ # * Label value becomes the search contraint filter name
126
+ config.add_facet_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', show: false
127
+ config.add_facet_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', show: false
128
+ config.add_facet_field Settings.FIELDS.RELATION, label: 'Related', show: false
129
+ config.add_facet_field Settings.FIELDS.REPLACES, label: 'Replaces', show: false
130
+ config.add_facet_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', show: false
131
+ config.add_facet_field Settings.FIELDS.SOURCE, label: 'Source', show: false
132
+ config.add_facet_field Settings.FIELDS.VERSION, label: 'Is Version Of', show: false
133
+
123
134
  # Have BL send all facet field names to Solr, which has been the default
124
135
  # previously. Simply remove these lines if you'd rather use Solr request
125
136
  # handler defaults, or have no facets.
@@ -150,7 +161,7 @@ class CatalogController < ApplicationController
150
161
  # DEFAULT FIELDS
151
162
  # The following fields all feature string values. If there is a value present in the metadata, they fields will show up on the item show page.
152
163
  # The labels and order can be customed. Comment out fields to hide them.
153
-
164
+
154
165
  config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title'
155
166
  config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
156
167
  config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator', itemprop: 'creator'
@@ -169,7 +180,7 @@ class CatalogController < ApplicationController
169
180
  config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access Rights', itemprop: 'access_rights'
170
181
  config.add_show_field Settings.FIELDS.FORMAT, label: 'Format', itemprop: 'format'
171
182
  config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File Size', itemprop: 'file_size'
172
- config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced'
183
+ config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced'
173
184
  config.add_show_field(
174
185
  Settings.FIELDS.REFERENCES,
175
186
  label: 'More details at',
@@ -181,23 +192,23 @@ class CatalogController < ApplicationController
181
192
  # ADDITIONAL FIELDS
182
193
  # The following fields are not user friendly and are not set to appear on the item show page. They contain non-literal values, codes, URIs, or are otherwise designed to power features in the interface.
183
194
  # These values might need a translations to be readable by users.
184
-
195
+
185
196
  # config.add_show_field Settings.FIELDS.LANGUAGE, label: 'Language', itemprop: 'language'
186
197
  # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword'
187
-
198
+
188
199
  # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year'
189
200
  # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range'
190
-
201
+
191
202
  # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid'
192
203
  # config.add_show_field Settings.FIELDS.OVERLAP_FIELD, label: 'Overlap BBox', itemprop: 'overlap_field'
193
-
204
+
194
205
  # config.add_show_field Settings.FIELDS.RELATION, label: 'Relation', itemprop: 'relation'
195
206
  # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of'
196
207
  # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of'
197
208
  # config.add_show_field Settings.FIELDS.VERSION, label: 'Version', itemprop: 'version'
198
209
  # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces'
199
210
  # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by'
200
-
211
+
201
212
  # config.add_show_field Settings.FIELDS.WXS_IDENTIFIER, label: 'Web Service Layer', itemprop: 'wxs_identifier'
202
213
  # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id'
203
214
  # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier'
@@ -205,8 +216,8 @@ class CatalogController < ApplicationController
205
216
  # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified'
206
217
  # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version'
207
218
  # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed'
208
-
209
-
219
+
220
+
210
221
  # "fielded" search configuration. Used by pulldown among other places.
211
222
  # For supported keys in hash, see rdoc for Blacklight::SearchFields
212
223
  #
@@ -107,11 +107,16 @@ RELATIONSHIPS_SHOWN:
107
107
  query_type: ancestors
108
108
  icon: nil
109
109
  label: geoblacklight.relations.member_of
110
- PART_OF:
110
+ PART_OF_ANCESTORS:
111
111
  field: dct_isPartOf_sm
112
112
  query_type: ancestors
113
113
  icon: nil
114
- label: geoblacklight.relations.part_of
114
+ label: geoblacklight.relations.part_of_ancestors
115
+ PART_OF_DESCENDANTS:
116
+ field: dct_isPartOf_sm
117
+ query_type: descendants
118
+ icon: child-item
119
+ label: geoblacklight.relations.part_of_descendants
115
120
  RELATION:
116
121
  field: dct_relation_sm
117
122
  query_type: ancestors
@@ -32,7 +32,7 @@ module Geoblacklight
32
32
  # @param [String] bbox as "W S E N"
33
33
  # @return [Geoblacklight::BoundingBox]
34
34
  def self.from_rectangle(rectangle)
35
- rectangle_array = rectangle.split
35
+ rectangle_array = rectangle.is_a?(String) ? rectangle.split : []
36
36
  message = 'Bounding box should be a string in Solr rectangle syntax e.g."W S E N"'
37
37
  fail Geoblacklight::Exceptions::WrongBoundingBoxFormat, message if rectangle_array.count != 4
38
38
  new(
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Geoblacklight
3
- VERSION = '4.0.0-rc1'
3
+ VERSION = '4.0.0-rc2'
4
4
  end
@@ -10,6 +10,6 @@ describe 'Config' do
10
10
  end
11
11
 
12
12
  it 'Loads new v3.4 Settings.FIELDS defaults' do
13
- expect(Settings.HOMEPAGE_MAP_GEOM).to eq nil
13
+ expect(Settings.HOMEPAGE_MAP_GEOM).to be_nil
14
14
  end
15
15
  end
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe WmsController, type: :controller do
5
- let(:wms_layer) { instance_double('Geoblacklight::WmsLayer') }
5
+ let(:wms_layer) { instance_double(Geoblacklight::WmsLayer) }
6
6
  let(:feature_info) { { values: ['fid', 'layer:example'] } }
7
7
  let(:params) do
8
8
  { format: 'json', 'URL' => 'http://www.example.com/', 'LAYERS' => 'layer:example',
@@ -30,4 +30,15 @@ feature 'Display related documents' do
30
30
  visit solr_document_path('harvard-g7064-s2-1834-k3')
31
31
  expect(page).to have_no_css('.card.relations')
32
32
  end
33
+
34
+ scenario 'Relationship browse link returns relationship-scoped results', js: true do
35
+ # Wabash Topo parent record
36
+ visit solr_document_path('88cc9b19-3294-4da9-9edd-775c81fb1c59')
37
+
38
+ expect(page).to have_content('Has part...')
39
+ expect(page).to have_link('Browse all 4 records...')
40
+ click_link('Browse all 4 records...')
41
+
42
+ expect(page).not_to have_content('No results found for your search')
43
+ end
33
44
  end
@@ -0,0 +1,62 @@
1
+ {
2
+ "id": "b5857bb0-2819-49cf-a6da-fdb39d50c529",
3
+ "gbl_mdVersion_s": "Aardvark",
4
+ "dct_title_s": "Wabash Topo (15): Indiana, 1929",
5
+ "dct_description_sm": [
6
+ "The maps represented here are on tiff files owned by EAS library. The topos were scanned in color and are up to 550MB each. These images can be viewed and performed in the using either ArcGIS Desktop or QGIS (user choice), referencing against a number of known mapsets like the 2005 Indiana Orthophoto setand USGS DRGs. The geographic coordinate system reference of the maps included are applied in GCS_WGS_1984."
7
+ ],
8
+ "dct_language_sm": [
9
+ "eng"
10
+ ],
11
+ "dct_creator_sm": [
12
+ "Brock & Weymouth Inc.",
13
+ "United States Engineer Office"
14
+ ],
15
+ "dct_publisher_sm": [
16
+ "Purdue University Libraries"
17
+ ],
18
+ "gbl_resourceClass_sm": [
19
+ "Maps"
20
+ ],
21
+ "dcat_keyword_sm": [
22
+ "Topography",
23
+ "Purdue Georeferenced Imagery"
24
+ ],
25
+ "dcat_theme_sm": [
26
+ "Imagery and Base Maps"
27
+ ],
28
+ "dct_issued_s": "2015-10-31",
29
+ "dct_temporal_sm": [
30
+ "1929"
31
+ ],
32
+ "gbl_dateRange_drsim": [
33
+ "[1929 TO 1929]"
34
+ ],
35
+ "gbl_indexYear_im": [
36
+ 1929
37
+ ],
38
+ "dct_spatial_sm": [
39
+ "Indiana"
40
+ ],
41
+ "locn_geometry": "ENVELOPE(-87.5071,-87.3597,39.539,39.4622)",
42
+ "dcat_bbox": "ENVELOPE(-87.5071,-87.3597,39.539,39.4622)",
43
+ "dcat_centroid": "39.500600000000006,-87.4334",
44
+ "pcdm_memberOf_sm": [
45
+ "09d-01"
46
+ ],
47
+ "gbl_resourceType_sm": [
48
+ "Topographic maps"
49
+ ],
50
+ "dct_format_s": "GeoTIFF",
51
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://mapsweb.lib.purdue.edu/datasets/Wabash1929/wabash_topo_15.tif.zip\",\"urn:x-esri:serviceType:ArcGIS#ImageMapLayer\":\"https://mapsweb.lib.purdue.edu/arcgis/rest/services/Purdue/wabashtopo/ImageServer\",\"http://schema.org/url\":\"https://mapsweb.lib.purdue.edu/wabashriver/\"}",
52
+ "dct_identifier_sm": [
53
+ "b5857bb0-2819-49cf-a6da-fdb39d50c529"
54
+ ],
55
+ "schema_provider_s": "Purdue University",
56
+ "dct_isPartOf_sm": [
57
+ "88cc9b19-3294-4da9-9edd-775c81fb1c59"
58
+ ],
59
+ "dct_accessRights_s": "Public",
60
+ "gbl_suppressed_b": true,
61
+ "gbl_mdModified_dt": "2021-05-07T23:00:10Z"
62
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "id": "d8906fc8-92bb-4ced-bcd5-9ce9a4701c25",
3
+ "gbl_mdVersion_s": "Aardvark",
4
+ "dct_title_s": "Wabash Topo (16): Indiana, 1929",
5
+ "dct_description_sm": [
6
+ "The maps represented here are on tiff files owned by EAS library. The topos were scanned in color and are up to 550MB each. These images can be viewed and performed in the using either ArcGIS Desktop or QGIS (user choice), referencing against a number of known mapsets like the 2005 Indiana Orthophoto setand USGS DRGs. The geographic coordinate system reference of the maps included are applied in GCS_WGS_1984."
7
+ ],
8
+ "dct_language_sm": [
9
+ "eng"
10
+ ],
11
+ "dct_creator_sm": [
12
+ "Brock & Weymouth Inc.",
13
+ "United States Engineer Office"
14
+ ],
15
+ "dct_publisher_sm": [
16
+ "Purdue University Libraries"
17
+ ],
18
+ "gbl_resourceClass_sm": [
19
+ "Maps"
20
+ ],
21
+ "dcat_keyword_sm": [
22
+ "Topography",
23
+ "Purdue Georeferenced Imagery"
24
+ ],
25
+ "dcat_theme_sm": [
26
+ "Imagery and Base Maps"
27
+ ],
28
+ "dct_issued_s": "2015-10-31",
29
+ "dct_temporal_sm": [
30
+ "1929"
31
+ ],
32
+ "gbl_dateRange_drsim": [
33
+ "[1929 TO 1929]"
34
+ ],
35
+ "gbl_indexYear_im": [
36
+ 1929
37
+ ],
38
+ "dct_spatial_sm": [
39
+ "Indiana",
40
+ "Tippecano County, Indiana",
41
+ "Wabash River, Indiana"
42
+ ],
43
+ "locn_geometry": "ENVELOPE(-87.4831,-87.336,39.606,39.5301)",
44
+ "dcat_bbox": "ENVELOPE(-87.4831,-87.336,39.606,39.5301)",
45
+ "dcat_centroid": "39.56805,-87.40955",
46
+ "pcdm_memberOf_sm": [
47
+ "09d-01"
48
+ ],
49
+ "gbl_resourceType_sm": [
50
+ "Topographic maps"
51
+ ],
52
+ "dct_format_s": "GeoTIFF",
53
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://mapsweb.lib.purdue.edu/datasets/Wabash1929/wabash_topo_16.tif.zip\",\"urn:x-esri:serviceType:ArcGIS#ImageMapLayer\":\"https://mapsweb.lib.purdue.edu/arcgis/rest/services/Purdue/wabashtopo/ImageServer\",\"http://schema.org/url\":\"https://mapsweb.lib.purdue.edu/wabashriver/\"}",
54
+ "dct_identifier_sm": [
55
+ "d8906fc8-92bb-4ced-bcd5-9ce9a4701c25"
56
+ ],
57
+ "schema_provider_s": "Purdue University",
58
+ "dct_isPartOf_sm": [
59
+ "88cc9b19-3294-4da9-9edd-775c81fb1c59"
60
+ ],
61
+ "dct_accessRights_s": "Public",
62
+ "gbl_suppressed_b": true,
63
+ "gbl_mdModified_dt": "2021-05-07T23:00:10Z"
64
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "id": "55d9f193-9f29-4cbf-860d-23c1cff11691",
3
+ "gbl_mdVersion_s": "Aardvark",
4
+ "dct_title_s": "Wabash Topo (17): Indiana, 1929",
5
+ "dct_description_sm": [
6
+ "The maps represented here are on tiff files owned by EAS library. The topos were scanned in color and are up to 550MB each. These images can be viewed and performed in the using either ArcGIS Desktop or QGIS (user choice), referencing against a number of known mapsets like the 2005 Indiana Orthophoto setand USGS DRGs. The geographic coordinate system reference of the maps included are applied in GCS_WGS_1984."
7
+ ],
8
+ "dct_language_sm": [
9
+ "eng"
10
+ ],
11
+ "dct_creator_sm": [
12
+ "Brock & Weymouth Inc.",
13
+ "United States Engineer Office"
14
+ ],
15
+ "dct_publisher_sm": [
16
+ "Purdue University Libraries"
17
+ ],
18
+ "gbl_resourceClass_sm": [
19
+ "Maps"
20
+ ],
21
+ "dcat_keyword_sm": [
22
+ "Topography",
23
+ "Purdue Georeferenced Imagery"
24
+ ],
25
+ "dcat_theme_sm": [
26
+ "Imagery and Base Maps"
27
+ ],
28
+ "dct_issued_s": "2015-10-31",
29
+ "dct_temporal_sm": [
30
+ "1929"
31
+ ],
32
+ "gbl_dateRange_drsim": [
33
+ "[1929 TO 1929]"
34
+ ],
35
+ "gbl_indexYear_im": [
36
+ 1929
37
+ ],
38
+ "dct_spatial_sm": [
39
+ "Indiana"
40
+ ],
41
+ "locn_geometry": "ENVELOPE(-87.4665,-87.3179,39.6748,39.5982)",
42
+ "dcat_bbox": "ENVELOPE(-87.4665,-87.3179,39.6748,39.5982)",
43
+ "dcat_centroid": "39.6365,-87.3922",
44
+ "pcdm_memberOf_sm": [
45
+ "09d-01"
46
+ ],
47
+ "gbl_resourceType_sm": [
48
+ "Topographic maps"
49
+ ],
50
+ "dct_format_s": "GeoTIFF",
51
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://mapsweb.lib.purdue.edu/datasets/Wabash1929/wabash_topo_17.tif.zip\",\"urn:x-esri:serviceType:ArcGIS#ImageMapLayer\":\"https://mapsweb.lib.purdue.edu/arcgis/rest/services/Purdue/wabashtopo/ImageServer\",\"http://schema.org/url\":\"https://mapsweb.lib.purdue.edu/wabashriver/\"}",
52
+ "dct_identifier_sm": [
53
+ "55d9f193-9f29-4cbf-860d-23c1cff11691"
54
+ ],
55
+ "schema_provider_s": "Purdue University",
56
+ "dct_isPartOf_sm": [
57
+ "88cc9b19-3294-4da9-9edd-775c81fb1c59"
58
+ ],
59
+ "dct_accessRights_s": "Public",
60
+ "gbl_suppressed_b": true,
61
+ "gbl_mdModified_dt": "2021-05-07T23:00:10Z"
62
+ }