geoblacklight 4.0.0.pre.alpha.2 → 4.0.0.pre.rc2
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/.github/ISSUE_TEMPLATE.md +1 -1
- data/.github/workflows/ruby.yml +27 -103
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -6
- data/.rubocop_todo.yml +0 -3
- data/.solr_wrapper +2 -0
- data/README.md +1 -4
- data/Rakefile +0 -1
- data/app/assets/images/blacklight/child-item.svg +3 -0
- data/app/assets/images/blacklight/collections.svg +4 -0
- data/app/assets/images/blacklight/datasets.svg +7 -0
- data/app/assets/images/blacklight/geoblacklight-icons.json +363 -332
- data/app/assets/images/blacklight/imagery.svg +4 -0
- data/app/assets/images/blacklight/maps.svg +4 -0
- data/app/assets/images/blacklight/parent-item.svg +3 -0
- data/app/assets/images/blacklight/university-of-colorado-boulder.svg +6 -0
- data/app/assets/images/blacklight/websites.svg +4 -0
- data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +8 -0
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +2 -1
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +33 -0
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/viewer.js +3 -0
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/wmts.js +85 -0
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +10 -0
- data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -0
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/_styles.scss +5 -1
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +20 -47
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +68 -0
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +16 -0
- data/app/assets/stylesheets/geoblacklight/modules/modal.scss +6 -0
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +4 -0
- data/app/components/geoblacklight/icon_facet_item_component.rb +33 -0
- data/app/helpers/geoblacklight_helper.rb +6 -45
- data/app/models/concerns/geoblacklight/bbox_filter_field.rb +64 -0
- data/app/models/concerns/geoblacklight/bbox_filter_query.rb +50 -0
- data/app/models/concerns/geoblacklight/solr_document.rb +1 -1
- data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +31 -0
- data/app/presenters/geoblacklight/bbox_item_presenter.rb +9 -0
- data/app/views/catalog/_downloads_collapse.html.erb +27 -0
- data/app/views/catalog/_header_icons.html.erb +2 -2
- data/app/views/catalog/_index_split_default.html.erb +2 -2
- data/app/views/catalog/_show_default_viewer_container.html.erb +17 -0
- data/app/views/catalog/_show_downloads.html.erb +10 -21
- data/app/views/catalog/_show_sidebar.html.erb +3 -0
- data/app/views/catalog/_show_web_services.html.erb +11 -0
- data/app/views/catalog/_web_services.html.erb +3 -2
- data/app/views/catalog/web_services.html.erb +1 -1
- data/app/views/shared/_header_navbar.html.erb +13 -3
- data/config/locales/geoblacklight.en.yml +5 -1
- data/geoblacklight.gemspec +7 -7
- data/lib/generators/geoblacklight/install_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/assets/_customizations.scss +5 -4
- data/lib/generators/geoblacklight/templates/assets/application.scss +0 -3
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +86 -57
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +5 -5
- data/lib/generators/geoblacklight/templates/settings.yml +43 -25
- data/lib/geoblacklight/bounding_box.rb +5 -1
- data/lib/geoblacklight/constants.rb +3 -0
- data/lib/geoblacklight/engine.rb +3 -2
- data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +176 -0
- data/lib/geoblacklight/item_viewer.rb +13 -1
- data/lib/geoblacklight/metadata/base.rb +2 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +2 -28
- data/lib/geoblacklight.rb +0 -10
- data/lib/tasks/geoblacklight.rake +1 -1
- data/schema/geoblacklight-schema-aardvark.json +3 -23
- data/solr/conf/schema.xml +37 -43
- data/solr/conf/solrconfig.xml +17 -17
- data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +17 -0
- data/spec/config/initializers/rails_config_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/controllers/wms_controller_spec.rb +1 -1
- data/spec/features/download_layer_spec.rb +31 -14
- data/spec/features/esri_viewer_spec.rb +5 -1
- data/spec/features/full_screen_controll_spec.rb +15 -0
- data/spec/features/home_page_spec.rb +2 -2
- data/spec/features/index_map_spec.rb +2 -2
- data/spec/features/missing_metadata_spec.rb +1 -1
- data/spec/features/multiple_downloads_spec.rb +2 -1
- data/spec/features/relations_spec.rb +12 -1
- data/spec/features/saved_searches_spec.rb +1 -1
- data/spec/features/search_results_complex_geometry_spec.rb +24 -0
- data/spec/features/search_results_icons_spec.rb +16 -0
- data/spec/features/search_results_map_spec.rb +2 -2
- data/spec/features/search_spec.rb +17 -0
- data/spec/features/show_page_download_spec.rb +29 -0
- data/spec/features/show_page_metadata_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +12 -1
- data/spec/features/tilejson_spec.rb +22 -0
- data/spec/features/tms_spec.rb +2 -2
- data/spec/features/web_services_modal_spec.rb +35 -2
- data/spec/features/wmts_spec.rb +34 -0
- data/spec/features/xyz_spec.rb +10 -0
- data/spec/fixtures/manifests/tilejson.json +21 -0
- data/spec/fixtures/manifests/wmts-multiple.xml +813 -0
- data/spec/fixtures/manifests/wmts-single.xml +126 -0
- data/spec/fixtures/solr_documents/README.md +46 -43
- data/spec/fixtures/solr_documents/actual-papermap1.json +2 -1
- data/spec/fixtures/solr_documents/actual-point1.json +2 -1
- data/spec/fixtures/solr_documents/actual-polygon1.json +2 -1
- data/spec/fixtures/solr_documents/actual-raster1.json +3 -2
- data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +64 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_parent.json +59 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +2 -1
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +2 -1
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +1 -1
- data/spec/fixtures/solr_documents/bbox-spans-180.json +2 -1
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +4 -3
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +3 -2
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +3 -2
- data/spec/fixtures/solr_documents/esri-feature-layer.json +2 -1
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +3 -2
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +2 -1
- data/spec/fixtures/solr_documents/esri-wms-layer.json +2 -1
- data/spec/fixtures/solr_documents/harvard_raster.json +3 -2
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +3 -2
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +2 -1
- data/spec/fixtures/solr_documents/index-map-polygon.json +2 -1
- data/spec/fixtures/solr_documents/index-map-stanford.json +2 -1
- data/spec/fixtures/solr_documents/index_map_point.json +3 -2
- data/spec/fixtures/solr_documents/metadata_no_provider.json +2 -1
- data/spec/fixtures/solr_documents/multiple-downloads.json +3 -2
- data/spec/fixtures/solr_documents/no_spatial.json +1 -4
- data/spec/fixtures/solr_documents/oembed.json +2 -1
- data/spec/fixtures/solr_documents/princeton-child1.json +3 -2
- data/spec/fixtures/solr_documents/princeton-child2.json +3 -2
- data/spec/fixtures/solr_documents/princeton-child3.json +2 -1
- data/spec/fixtures/solr_documents/princeton-child4.json +3 -2
- data/spec/fixtures/solr_documents/princeton-parent.json +5 -3
- data/spec/fixtures/solr_documents/public_direct_download.json +2 -1
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +3 -2
- data/spec/fixtures/solr_documents/public_polygon_mit.json +2 -1
- data/spec/fixtures/solr_documents/restricted-line.json +2 -1
- data/spec/fixtures/solr_documents/tilejson.json +48 -0
- data/spec/fixtures/solr_documents/tms.json +15 -18
- data/spec/fixtures/solr_documents/umn_metro_result1.json +5 -3
- data/spec/fixtures/solr_documents/umn_state_result1.json +3 -2
- data/spec/fixtures/solr_documents/umn_state_result2.json +3 -5
- data/spec/fixtures/solr_documents/uva_slug_colon.json +2 -1
- data/spec/fixtures/solr_documents/wmts-multiple.json +41 -0
- data/spec/fixtures/solr_documents/wmts-single-layer.json +48 -0
- data/spec/fixtures/solr_documents/xyz.json +46 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +12 -35
- data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -3
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +2 -2
- data/spec/lib/geoblacklight/metadata/base_spec.rb +19 -1
- data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +1 -1
- data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +1 -1
- data/spec/lib/geoblacklight/references_spec.rb +5 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +5 -0
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -10
- data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -1
- data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +96 -0
- data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +105 -0
- data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +2 -1
- data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +31 -0
- data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +36 -0
- data/spec/spec_helper.rb +8 -3
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +5 -5
- data/template.rb +2 -4
- data/vendor/assets/images/fullscreen.png +0 -0
- data/vendor/assets/images/fullscreen@2x.png +0 -0
- data/vendor/assets/javascripts/Leaflet.fullscreen.js +152 -0
- data/vendor/assets/javascripts/esri-leaflet.js +10 -3
- data/vendor/assets/javascripts/esri-leaflet.js.map +1 -1
- data/vendor/assets/javascripts/leaflet-iiif.js +39 -18
- data/vendor/assets/javascripts/leaflet-src.js.erb +14126 -0
- data/vendor/assets/javascripts/leaflet-src.js.map +1 -1
- data/vendor/assets/stylesheets/leaflet.css +640 -634
- data/vendor/assets/stylesheets/leaflet.fullscreen.css +40 -0
- metadata +108 -53
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +0 -71
- data/app/views/catalog/_download_generated_link.html.erb +0 -4
- data/app/views/catalog/_download_link.html.erb +0 -3
- data/app/views/catalog/_downloads_generated.html.erb +0 -6
- data/app/views/catalog/_downloads_primary.html.erb +0 -21
- data/app/views/catalog/_downloads_secondary.html.erb +0 -39
- data/app/views/catalog/_icon_facet.html.erb +0 -16
- data/bin/coverage.rb +0 -36
- data/lib/generators/geoblacklight/templates/Procfile +0 -3
- data/lib/generators/geoblacklight/templates/package.json +0 -14
- data/lib/generators/geoblacklight/templates/webpacker.yml +0 -67
- data/lib/generators/geoblacklight/webpacker_generator.rb +0 -36
- data/lib/geoblacklight/catalog_helper_override.rb +0 -14
- data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +0 -97
- data/vendor/assets/javascripts/leaflet.js.erb +0 -13922
- data/vendor/assets/stylesheets/leaflet-label.css +0 -54
data/solr/conf/schema.xml
CHANGED
|
@@ -4,20 +4,36 @@
|
|
|
4
4
|
<fields>
|
|
5
5
|
<field name="_version_" type="long" stored="true" indexed="true"/>
|
|
6
6
|
<field name="timestamp" type="date" stored="true" indexed="true" default="NOW"/>
|
|
7
|
-
<field name="
|
|
8
|
-
<field name="id" type="string" stored="true" indexed="true" required="true"/>
|
|
7
|
+
<field name="id" type="string" stored="true" indexed="true" required="true"/>
|
|
9
8
|
|
|
10
9
|
<!-- core generated fields -->
|
|
11
10
|
<field name="text" type="text_en" stored="false" indexed="true" multiValued="true"
|
|
12
11
|
termVectors="true" termPositions="true" termOffsets="true" />
|
|
13
12
|
|
|
13
|
+
<!-- Spatial Field Type: Represents the exent of the resource and powers map search functionality.
|
|
14
|
+
Value can be any valid WKT or ENVELOPE String:
|
|
15
|
+
<field name="locn_geometry">POLYGON((1 8, 1 9, 2 9, 2 8, 1 8))</field>
|
|
16
|
+
<field name="locn_geometry">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field> -->
|
|
17
|
+
<field name="locn_geometry" type="location_geo3d" stored="true" indexed="true"/>
|
|
18
|
+
|
|
19
|
+
<!-- Spatial Field Type: The bounding box of the resource. Used in overlap ratio boosting.
|
|
20
|
+
Value must be an ENVELOPE String:
|
|
21
|
+
<field name="dcat_bbox">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field> -->
|
|
22
|
+
<field name="dcat_bbox" type="location_rpt" stored="true" indexed="true"/>
|
|
23
|
+
|
|
24
|
+
<!-- Spatial Field Type: Used to display the center point of a resource. -->
|
|
25
|
+
<field name="dcat_centroid" type="location" stored="true" indexed="true"/>
|
|
26
|
+
|
|
27
|
+
<!-- Spatial Field Type: Internal field used for overlap ratio boosting. -->
|
|
28
|
+
<field name="solr_bboxtype" type="bbox" stored="true" indexed="true"/>
|
|
29
|
+
|
|
14
30
|
<!-- dynamic field with simple types by suffix -->
|
|
15
31
|
<dynamicField name="*_b" type="boolean" stored="true" indexed="true"/>
|
|
16
32
|
<dynamicField name="*_d" type="double" stored="true" indexed="true"/>
|
|
17
33
|
<dynamicField name="*_dt" type="date" stored="true" indexed="true"/>
|
|
18
34
|
<dynamicField name="*_f" type="float" stored="true" indexed="true"/>
|
|
19
35
|
<dynamicField name="*_i" type="int" stored="true" indexed="true"/>
|
|
20
|
-
<dynamicField name="*_im" type="int" stored="true" indexed="true" multiValued="true" />
|
|
36
|
+
<dynamicField name="*_im" type="int" stored="true" indexed="true" multiValued="true" sortMissingLast="true" />
|
|
21
37
|
<dynamicField name="*_l" type="long" stored="true" indexed="true"/>
|
|
22
38
|
<dynamicField name="*_s" type="string" stored="true" indexed="true"/>
|
|
23
39
|
<dynamicField name="*_ss" type="string" stored="true" indexed="false"/>
|
|
@@ -44,31 +60,6 @@
|
|
|
44
60
|
|
|
45
61
|
<!-- date range (_drsim) -->
|
|
46
62
|
<dynamicField name="*_drsim" type="dateRange" stored="true" indexed="true" multiValued="true"/>
|
|
47
|
-
|
|
48
|
-
<!-- Spatial field types:
|
|
49
|
-
|
|
50
|
-
Solr3:
|
|
51
|
-
<field name="my_pt">83.1,-117.312</field>
|
|
52
|
-
as (y,x)
|
|
53
|
-
|
|
54
|
-
Solr4:
|
|
55
|
-
|
|
56
|
-
<field name="my_bbox">-117.312 83.1 -115.39 84.31</field>
|
|
57
|
-
as (W S E N)
|
|
58
|
-
|
|
59
|
-
<field name="my_geom">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field>
|
|
60
|
-
as (W E N S)
|
|
61
|
-
|
|
62
|
-
<field name="my_jts">POLYGON((1 8, 1 9, 2 9, 2 8, 1 8))</field>
|
|
63
|
-
as WKT for point, linestring, polygon
|
|
64
|
-
|
|
65
|
-
-->
|
|
66
|
-
<dynamicField name="*_pt" type="location" stored="true" indexed="true"/>
|
|
67
|
-
<dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/><!-- deprecated -->
|
|
68
|
-
<dynamicField name="*_geom" type="location_rpt" stored="true" indexed="true"/>
|
|
69
|
-
<dynamicField name="*_geometry" type="location_rpt" stored="true" indexed="true"/>
|
|
70
|
-
<dynamicField name="*_bboxtype" type="bbox" stored="true" indexed="true"/>
|
|
71
|
-
|
|
72
63
|
</fields>
|
|
73
64
|
|
|
74
65
|
<types>
|
|
@@ -146,32 +137,36 @@
|
|
|
146
137
|
</fieldType>
|
|
147
138
|
|
|
148
139
|
<!-- Spatial field types -->
|
|
149
|
-
<fieldType name="location" class="solr.
|
|
150
|
-
|
|
140
|
+
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true"/>
|
|
151
141
|
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
|
|
152
142
|
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
|
|
143
|
+
<fieldType name="location_geo3d"
|
|
144
|
+
class="solr.SpatialRecursivePrefixTreeFieldType"
|
|
145
|
+
spatialContextFactory="Geo3D"
|
|
146
|
+
prefixTree="s2"
|
|
147
|
+
geo="true"
|
|
148
|
+
maxDistErr="0.001"
|
|
149
|
+
planetModel="WGS84"/>
|
|
150
|
+
|
|
153
151
|
<!-- Adding field type for bboxField that enables, among other things, overlap ratio calculations -->
|
|
154
152
|
<fieldType name="bbox" class="solr.BBoxField"
|
|
155
153
|
geo="true" distanceUnits="kilometers" numberType="pdouble" />
|
|
156
154
|
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
|
|
157
|
-
|
|
158
|
-
|
|
159
155
|
</types>
|
|
160
156
|
|
|
161
157
|
<!-- for scoring formula -->
|
|
162
158
|
<copyField source="dct_spatial_sm" dest="dct_spatial_tmi" maxChars="10000"/>
|
|
163
159
|
<copyField source="dct_temporal_sm" dest="dct_temporal_tmi" maxChars="10000"/>
|
|
164
|
-
<copyField source="dct_creator_sm" dest="
|
|
165
|
-
<copyField source="dct_description_sm" dest="
|
|
166
|
-
<copyField source="dct_format_s" dest="
|
|
167
|
-
<copyField source="dct_identifier_sm" dest="
|
|
168
|
-
<copyField source="dct_publisher_sm" dest="
|
|
169
|
-
<copyField source="dct_accessRights_s" dest="
|
|
160
|
+
<copyField source="dct_creator_sm" dest="dct_creator_tmi" maxChars="1000"/>
|
|
161
|
+
<copyField source="dct_description_sm" dest="dct_description_tmi" maxChars="10000"/>
|
|
162
|
+
<copyField source="dct_format_s" dest="dct_format_ti" maxChars="100"/>
|
|
163
|
+
<copyField source="dct_identifier_sm" dest="dct_identifier_tmi" maxChars="100"/>
|
|
164
|
+
<copyField source="dct_publisher_sm" dest="dct_publisher_tmi" maxChars="1000"/>
|
|
165
|
+
<copyField source="dct_accessRights_s" dest="dct_accessRights_ti" maxChars="100"/>
|
|
170
166
|
<copyField source="schema_provider_s" dest="dct_provider_ti" maxChars="1000"/>
|
|
171
|
-
<copyField source="dct_subject_sm" dest="
|
|
172
|
-
<copyField source="dct_title_s" dest="
|
|
167
|
+
<copyField source="dct_subject_sm" dest="dct_subject_tmi" maxChars="10000"/>
|
|
168
|
+
<copyField source="dct_title_s" dest="dct_title_ti" maxChars="1000"/>
|
|
173
169
|
<copyField source="dct_isPartOf_sm" dest="dct_isPartOf_tmi" maxChars="1000"/>
|
|
174
|
-
<copyField source="locn_geometry_s" dest="layer_geom_type_ti" maxChars="100"/>
|
|
175
170
|
<copyField source="id" dest="layer_slug_ti" maxChars="100"/>
|
|
176
171
|
|
|
177
172
|
<!-- core text search -->
|
|
@@ -180,7 +175,6 @@
|
|
|
180
175
|
|
|
181
176
|
<!-- for sorting text fields -->
|
|
182
177
|
<copyField source="schema_provider_s" dest="schema_provider_sort"/>
|
|
183
|
-
<copyField source="dct_publisher_sm" dest="dc_publisher_sort"/>
|
|
184
178
|
<copyField source="dct_title_s" dest="dct_title_sort"/>
|
|
185
179
|
|
|
186
180
|
<!-- for spell checking -->
|
|
@@ -200,5 +194,5 @@
|
|
|
200
194
|
<copyField source="dct_spatial_sm" dest="suggest"/>
|
|
201
195
|
|
|
202
196
|
<!-- for bbox value -->
|
|
203
|
-
<copyField source="
|
|
197
|
+
<copyField source="dcat_bbox" dest="solr_bboxtype"/>
|
|
204
198
|
</schema>
|
data/solr/conf/solrconfig.xml
CHANGED
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
71
71
|
<query>
|
|
72
72
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
|
73
|
-
<filterCache class="solr.
|
|
74
|
-
<queryResultCache class="solr.
|
|
75
|
-
<documentCache class="solr.
|
|
73
|
+
<filterCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
|
74
|
+
<queryResultCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
|
75
|
+
<documentCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
|
76
76
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
|
77
77
|
<queryResultWindowSize>20</queryResultWindowSize>
|
|
78
78
|
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
|
@@ -117,35 +117,35 @@
|
|
|
117
117
|
<str name="q.alt">*:*</str>
|
|
118
118
|
<str name="qf">
|
|
119
119
|
text^1
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
dct_description_ti^2
|
|
121
|
+
dct_creator_tmi^3
|
|
122
|
+
dct_publisher_ti^3
|
|
123
123
|
dct_isPartOf_tmi^4
|
|
124
|
-
|
|
124
|
+
dct_subject_tmi^5
|
|
125
125
|
dct_spatial_tmi^5
|
|
126
126
|
dct_temporal_tmi^5
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
dct_title_ti^6
|
|
128
|
+
dct_accessRights_ti^7
|
|
129
129
|
dct_provider_ti^8
|
|
130
130
|
layer_geom_type_ti^9
|
|
131
131
|
layer_slug_ti^10
|
|
132
|
-
|
|
132
|
+
dct_identifier_ti^10
|
|
133
133
|
</str>
|
|
134
134
|
<str name="pf"><!-- phrase boost within result set -->
|
|
135
135
|
text^1
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
dct_description_ti^2
|
|
137
|
+
dct_creator_tmi^3
|
|
138
|
+
dct_publisher_ti^3
|
|
139
139
|
dct_isPartOf_tmi^4
|
|
140
|
-
|
|
140
|
+
dct_subject_tmi^5
|
|
141
141
|
dct_spatial_tmi^5
|
|
142
142
|
dct_temporal_tmi^5
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
dct_title_ti^6
|
|
144
|
+
dct_accessRights_ti^7
|
|
145
145
|
dct_provider_ti^8
|
|
146
146
|
layer_geom_type_ti^9
|
|
147
147
|
layer_slug_ti^10
|
|
148
|
-
|
|
148
|
+
dct_identifier_ti^10
|
|
149
149
|
</str>
|
|
150
150
|
<bool name="facet">true</bool>
|
|
151
151
|
<int name="facet.mincount">1</int>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
RSpec.describe Geoblacklight::IconFacetItemComponent, type: :component do
|
|
5
|
+
subject(:rendered) do
|
|
6
|
+
render_inline_to_capybara_node(described_class.new(suppress_link: true, **kwargs))
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
let(:kwargs) { { facet_item: facet_item } }
|
|
10
|
+
let(:facet_item) { instance_double(Blacklight::FacetItemPresenter, label: 'Stanford', value: 'stanford', hits: 5, href: nil, selected?: false, facet_config: facet_config) }
|
|
11
|
+
let(:facet_config) { Blacklight::Configuration::FacetField.new(field: 'provider_facet', label: 'Provider') }
|
|
12
|
+
|
|
13
|
+
it 'prepends the icon to the facet item label' do
|
|
14
|
+
expect(rendered).to have_selector('span.facet-label', text: 'Stanford')
|
|
15
|
+
expect(rendered).to have_selector('span.facet-label svg title', text: 'Stanford University')
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -77,7 +77,7 @@ describe CatalogController, type: :controller do
|
|
|
77
77
|
expect(response_values).to include Settings.FIELDS.ACCESS_RIGHTS => 'Public'
|
|
78
78
|
expect(response_values).to include Settings.FIELDS.PROVIDER => 'Tufts'
|
|
79
79
|
expect(response_values).to include Settings.FIELDS.ID => 'tufts-cambridgegrid100-04'
|
|
80
|
-
expect(response_values).to include Settings.FIELDS.
|
|
80
|
+
expect(response_values).to include Settings.FIELDS.GEOMETRY => 'ENVELOPE(-71.163984,-71.052581,42.408316,42.34757)'
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
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(
|
|
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',
|
|
@@ -13,71 +13,88 @@ feature 'Download layer' do
|
|
|
13
13
|
scenario 'clicking initial shapefile download button should trigger download', js: true do
|
|
14
14
|
expect(shapefile_download).to receive(:get).and_return('mit-f6rqs4ucovjk2-shapefile.zip')
|
|
15
15
|
visit solr_document_path('mit-f6rqs4ucovjk2')
|
|
16
|
-
find('
|
|
16
|
+
find('#downloads-button').click
|
|
17
|
+
find('a[data-download-type="shapefile"]', text: 'Export Shapefile').click
|
|
17
18
|
expect(page).to have_css(
|
|
18
19
|
'a[href="/download/file/mit-f6rqs4ucovjk2-shapefile.zip"]',
|
|
19
20
|
text: 'Your file mit-f6rqs4ucovjk2-shapefile.zip is ready for download'
|
|
20
21
|
)
|
|
21
22
|
end
|
|
23
|
+
|
|
22
24
|
scenario 'failed download should return message with link to layer', js: true do
|
|
23
25
|
expect(shapefile_download).to receive(:get).and_raise(Geoblacklight::Exceptions::ExternalDownloadFailed.new(message: 'Failed', url: 'http://www.example.com/failed'))
|
|
24
26
|
visit solr_document_path('mit-f6rqs4ucovjk2')
|
|
25
|
-
find('
|
|
27
|
+
find('#downloads-button').click
|
|
28
|
+
find('#downloads-collapse a[data-download-type="shapefile"]', text: 'Export Shapefile').click
|
|
26
29
|
expect(page).to have_css 'div.alert.alert-danger', text: 'Sorry, the requested file could not be downloaded. Try downloading it directly from:'
|
|
27
30
|
expect(page).to have_css 'a', text: 'http://www.example.com/failed'
|
|
28
31
|
end
|
|
32
|
+
|
|
29
33
|
scenario 'clicking kmz download button should trigger download', js: true do
|
|
30
34
|
expect(kmz_download).to receive(:get).and_return('mit-f6rqs4ucovjk2-kmz.kmz')
|
|
31
35
|
visit solr_document_path('mit-f6rqs4ucovjk2')
|
|
32
|
-
find('
|
|
36
|
+
find('#downloads-button').click
|
|
37
|
+
find('#downloads-collapse a[data-download-type="kmz"]', text: 'Export KMZ').click
|
|
33
38
|
expect(page).to have_css(
|
|
34
39
|
'a[href="/download/file/mit-f6rqs4ucovjk2-kmz.kmz"]',
|
|
35
40
|
text: 'Your file mit-f6rqs4ucovjk2-kmz.kmz is ready for download'
|
|
36
41
|
)
|
|
37
42
|
end
|
|
43
|
+
|
|
38
44
|
scenario 'jpg download option should be present under toggle' do
|
|
39
45
|
visit solr_document_path('princeton-02870w62c')
|
|
40
|
-
|
|
46
|
+
find('#downloads-button').click
|
|
47
|
+
expect(page).to have_css('#downloads-collapse a', text: 'Original JPG')
|
|
41
48
|
end
|
|
49
|
+
|
|
42
50
|
scenario 'clicking jpg download button should redirect to external image' do
|
|
43
51
|
visit solr_document_path('princeton-02870w62c')
|
|
44
|
-
|
|
52
|
+
find('#downloads-button').click
|
|
53
|
+
expect(page).to have_css("#downloads-collapse a[href='https://iiif-cloud.princeton.edu/iiif/2/6c%2F52%2F12%2F6c5212e81bc845f59bb1cdc740a88bad%2Fintermediate_file/full/full/0/default.jpg']", text: 'Original JPG')
|
|
45
54
|
end
|
|
55
|
+
|
|
46
56
|
scenario 'options should be available under toggle' do
|
|
47
57
|
visit solr_document_path('mit-f6rqs4ucovjk2')
|
|
48
|
-
|
|
49
|
-
expect(page).to have_css('
|
|
58
|
+
find('#downloads-button').click
|
|
59
|
+
expect(page).to have_css('#downloads-collapse a[data-download-type="shapefile"]', text: 'Export Shapefile')
|
|
60
|
+
expect(page).to have_css('#downloads-collapse a[data-download-type="kmz"]', text: 'Export KMZ')
|
|
50
61
|
end
|
|
62
|
+
|
|
51
63
|
scenario 'restricted layer should not have download available to non logged in user' do
|
|
52
64
|
visit solr_document_path('stanford-cg357zz0321')
|
|
53
65
|
expect(page).to have_css 'a', text: 'Login to View and Download'
|
|
54
|
-
expect(page).not_to have_css 'button', text: 'Download
|
|
66
|
+
expect(page).not_to have_css 'button', text: 'Download'
|
|
55
67
|
end
|
|
68
|
+
|
|
56
69
|
scenario 'restricted layer should have download available to logged in user' do
|
|
57
70
|
sign_in
|
|
58
71
|
visit solr_document_path('stanford-cg357zz0321')
|
|
59
72
|
expect(page).not_to have_css 'a', text: 'Login to view and download'
|
|
60
|
-
expect(page).to have_css '
|
|
73
|
+
expect(page).to have_css 'button', text: 'Download'
|
|
61
74
|
end
|
|
75
|
+
|
|
62
76
|
scenario 'layer with direct download and wms/wfs should include all download types' do
|
|
63
77
|
sign_in
|
|
64
78
|
visit solr_document_path('stanford-cg357zz0321')
|
|
65
|
-
|
|
66
|
-
expect(page).to have_css
|
|
67
|
-
expect(page).to have_css '
|
|
68
|
-
expect(page).to have_css 'a', text: 'Export'
|
|
79
|
+
find('#downloads-button').click
|
|
80
|
+
expect(page).to have_css('#downloads-collapse a', text: 'Original')
|
|
81
|
+
expect(page).to have_css('#downloads-collapse a', text: 'Export')
|
|
69
82
|
end
|
|
70
|
-
|
|
83
|
+
|
|
84
|
+
scenario 'clicking download GeoTIFF for Harvard layer should show email form', js: true do
|
|
71
85
|
visit solr_document_path('harvard-g7064-s2-1834-k3')
|
|
86
|
+
find('#downloads-button').click
|
|
72
87
|
find('a[data-download-type="harvard-hgl"]', text: 'GeoTIFF').click
|
|
73
88
|
expect(page).to have_css('#hglRequest')
|
|
74
89
|
end
|
|
90
|
+
|
|
75
91
|
context 'with a successful request to the server' do
|
|
76
92
|
let(:hgl_download) { instance_double(Geoblacklight::HglDownload) }
|
|
77
93
|
|
|
78
94
|
xscenario 'submitting email form should trigger HGL request', js: true do
|
|
79
95
|
# There are currently difficulties with testing the HGL downloader
|
|
80
96
|
visit solr_document_path('harvard-g7064-s2-1834-k3')
|
|
97
|
+
find('#downloads-button').click
|
|
81
98
|
find('a[data-download-type="harvard-hgl"]', text: 'Original GeoTIFF').click
|
|
82
99
|
|
|
83
100
|
allow_any_instance_of(Geoblacklight::HglDownload).to receive(:new).and_return(hgl_download)
|
|
@@ -3,17 +3,19 @@ require 'spec_helper'
|
|
|
3
3
|
|
|
4
4
|
feature 'feature_layer reference', js: true do
|
|
5
5
|
scenario 'displays image map layer' do
|
|
6
|
-
skip '
|
|
6
|
+
skip 'spec depend on potentially flaky external services'
|
|
7
7
|
visit solr_document_path '32653ed6-8d83-4692-8a06-bf13ffe2c018'
|
|
8
8
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
|
9
9
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
|
10
10
|
end
|
|
11
11
|
scenario 'displays dynamic layer (all layers)' do
|
|
12
|
+
skip 'spec depend on potentially flaky external services'
|
|
12
13
|
visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
|
|
13
14
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
|
14
15
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
|
15
16
|
end
|
|
16
17
|
scenario 'displays dynamic layer (single layer)' do
|
|
18
|
+
skip 'spec depend on potentially flaky external services'
|
|
17
19
|
visit solr_document_path '4669301e-b4b2-4c8b-bf40-01b968a2865b'
|
|
18
20
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
|
19
21
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
|
@@ -26,11 +28,13 @@ feature 'feature_layer reference', js: true do
|
|
|
26
28
|
fail
|
|
27
29
|
end
|
|
28
30
|
scenario 'displays tiled map layer' do
|
|
31
|
+
skip 'spec depend on potentially flaky external services'
|
|
29
32
|
visit solr_document_path 'nyu-test-soil-survey-map'
|
|
30
33
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
|
31
34
|
expect(page).to have_css 'img.leaflet-tile.leaflet-tile-loaded', visible: true
|
|
32
35
|
end
|
|
33
36
|
scenario 'displays Esri WMS layer' do
|
|
37
|
+
skip 'spec depend on potentially flaky external services'
|
|
34
38
|
visit solr_document_path 'purdue-urn-f082acb1-b01e-4a08-9126-fd62a23fd9aa'
|
|
35
39
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
|
36
40
|
expect(page).to have_css 'img.leaflet-tile.leaflet-tile-loaded', visible: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
feature 'Leaflet fullscreen control', js: true do
|
|
6
|
+
scenario 'IIIF layer should have full screen control' do
|
|
7
|
+
visit solr_document_path('princeton-sx61dn82p')
|
|
8
|
+
expect(page).to have_css('.leaflet-control-fullscreen-button')
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
scenario 'WMS layer should have full screen control' do
|
|
12
|
+
visit solr_document_path('stanford-cz128vq0535')
|
|
13
|
+
expect(page).to have_css('.leaflet-control-fullscreen-button')
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -21,9 +21,9 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
|
|
|
21
21
|
expect(page).to have_css '.category-block', count: 4
|
|
22
22
|
expect(page).to have_css '.home-facet-link', count: 36
|
|
23
23
|
expect(page).to have_css 'a.more_facets_link', count: 4
|
|
24
|
-
click_link '
|
|
24
|
+
click_link 'Counties'
|
|
25
25
|
expect(page).to have_css '.filter-name', text: 'Subject'
|
|
26
|
-
expect(page).to have_css '.filter-value', text: '
|
|
26
|
+
expect(page).to have_css '.filter-value', text: 'Counties'
|
|
27
27
|
end
|
|
28
28
|
scenario 'map should be visible' do
|
|
29
29
|
within '#main-container' do
|
|
@@ -3,8 +3,8 @@ require 'spec_helper'
|
|
|
3
3
|
|
|
4
4
|
feature 'Index map' do
|
|
5
5
|
# Colors
|
|
6
|
-
default_color = '#
|
|
7
|
-
selected_color = '#
|
|
6
|
+
default_color = '#7FCDBB'
|
|
7
|
+
selected_color = '#2C7FB8'
|
|
8
8
|
scenario 'displays index map viewer (polygon)', js: true do
|
|
9
9
|
visit solr_document_path('stanford-fb897vt9938')
|
|
10
10
|
# Wait until SVG elements are added
|
|
@@ -18,7 +18,7 @@ feature 'Missing metadata', js: true do
|
|
|
18
18
|
visit solr_document_path('99-0001-noprovider')
|
|
19
19
|
expect(page).to have_css('#map')
|
|
20
20
|
end
|
|
21
|
-
scenario 'Yields error free show page for no
|
|
21
|
+
scenario 'Yields error free show page for no locn_geometry' do
|
|
22
22
|
visit solr_document_path('05d-p16022coll246-noGeo')
|
|
23
23
|
expect(page).to have_css('#map')
|
|
24
24
|
end
|
|
@@ -5,7 +5,8 @@ feature 'Multiple downloads' do
|
|
|
5
5
|
feature 'when item has multiple downloads in dct_references_s' do
|
|
6
6
|
scenario 'downloads are listed in download card' do
|
|
7
7
|
visit solr_document_path 'cugir-007950'
|
|
8
|
-
|
|
8
|
+
find('#downloads-button').click
|
|
9
|
+
within '#downloads-collapse' do
|
|
9
10
|
expect(page).to have_link 'Shapefile', href: 'https://cugir-data.s3.amazonaws.com/00/79/50/cugir-007950.zip'
|
|
10
11
|
expect(page).to have_link 'PDF', href: 'https://cugir-data.s3.amazonaws.com/00/79/50/agBROO.pdf'
|
|
11
12
|
expect(page).to have_link 'KMZ', href: 'https://cugir-data.s3.amazonaws.com/00/79/50/agBROO2011.kmz'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
require 'spec_helper'
|
|
3
3
|
|
|
4
4
|
feature 'Display related documents' do
|
|
5
|
-
scenario 'Record with
|
|
5
|
+
scenario 'Record with dct_source_sm value(s) should have parent(s)' do
|
|
6
6
|
visit relations_solr_document_path('nyu_2451_34502')
|
|
7
7
|
expect(page).to have_css('.relations .card-header h2', text: 'Source Datasets')
|
|
8
8
|
end
|
|
@@ -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
|
|
@@ -9,6 +9,6 @@ feature 'saved searches' do
|
|
|
9
9
|
expect(page.current_url).to match(/bbox=/)
|
|
10
10
|
end
|
|
11
11
|
visit blacklight.search_history_path
|
|
12
|
-
expect(page).to have_css 'td.query a', text: /#{I18n.t('geoblacklight.bbox_label')}
|
|
12
|
+
expect(page).to have_css 'td.query a', text: /#{I18n.t('geoblacklight.bbox_label')}/
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
feature 'spatial search results with an WKT bounding box that crosses the anti-meridian' do
|
|
5
|
+
scenario 'when searching within the covered area' do
|
|
6
|
+
# BBox param is in China
|
|
7
|
+
visit search_catalog_path(
|
|
8
|
+
q: 'A new & accurate map of Asia',
|
|
9
|
+
bbox: '98.4375 31.765537 117.202148 45.429299'
|
|
10
|
+
)
|
|
11
|
+
result_id = page.all('div.documentHeader.row').first['data-layer-id']
|
|
12
|
+
expect(result_id).to eq '57f0f116-b64e-4773-8684-96ba09afb549'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
scenario 'when searching outside the covered area' do
|
|
16
|
+
# BBox param is in Oklahoma
|
|
17
|
+
visit search_catalog_path(
|
|
18
|
+
q: 'A new & accurate map of Asia',
|
|
19
|
+
bbox: '-98.717651 34.40691 -96.37207 36.199958'
|
|
20
|
+
)
|
|
21
|
+
results = page.all('div.documentHeader.row')
|
|
22
|
+
expect(results.count).to eq 0
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
feature 'search results display document iconography' do
|
|
5
|
+
scenario 'when viewing result row' do
|
|
6
|
+
# Search returns fixture stanford-cg357zz0321
|
|
7
|
+
visit search_catalog_path(
|
|
8
|
+
search_field: 'all_fields',
|
|
9
|
+
q: 'stanford-cg357zz0321'
|
|
10
|
+
)
|
|
11
|
+
first_result = page.all('span.status-icons > span')
|
|
12
|
+
expect(first_result[0][:class]).to include 'blacklight-icon-dataset'
|
|
13
|
+
expect(first_result[1][:class]).to include 'blacklight-icon-stanford'
|
|
14
|
+
expect(first_result[2][:class]).to include 'blacklight-icon-restricted'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -6,8 +6,8 @@ feature 'search results map', js: true do
|
|
|
6
6
|
visit search_catalog_path(q: 'Minnesota')
|
|
7
7
|
expect(page).to have_css '#map'
|
|
8
8
|
end
|
|
9
|
-
|
|
10
|
-
pending 'Minnesota fixtures have changed.'
|
|
9
|
+
xscenario 'view is scoped to Minnesota' do
|
|
10
|
+
# pending 'Minnesota fixtures have changed.'
|
|
11
11
|
visit root_path
|
|
12
12
|
click_link 'Minnesota, United States'
|
|
13
13
|
expect(page).to have_css '#map'
|
|
@@ -17,4 +17,21 @@ feature 'Search' do
|
|
|
17
17
|
click_link 'Browse all 4 records...'
|
|
18
18
|
expect(page).to have_css '.document', count: 4
|
|
19
19
|
end
|
|
20
|
+
|
|
21
|
+
scenario 'When sorting by year desc, highest value sorts first' do
|
|
22
|
+
visit '/?f%5Bschema_provider_s%5D%5B%5D=University+of+Minnesota&sort=gbl_indexYear_im+desc%2C+dct_title_sort+asc'
|
|
23
|
+
|
|
24
|
+
first_doc = find('.document', match: :first)
|
|
25
|
+
|
|
26
|
+
# Doc with gbl_indexYear_im value: [2014, 2030]
|
|
27
|
+
expect(first_doc['data-document-id']).to eq('02236876-9c21-42f6-9870-d2562da8e44f')
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
scenario 'When sorting by year, missing values sort last' do
|
|
31
|
+
visit '/?f%5Bschema_provider_s%5D%5B%5D=University+of+Minnesota&sort=gbl_indexYear_im+desc%2C+dct_title_sort+asc'
|
|
32
|
+
last_doc = find_all('.document').last
|
|
33
|
+
|
|
34
|
+
# Doc without gbl_indexYear_im value
|
|
35
|
+
expect(last_doc['data-document-id']).to eq('05d-03-nogeomtype')
|
|
36
|
+
end
|
|
20
37
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
feature 'Download display on show page' do
|
|
5
|
+
scenario 'with download String' do
|
|
6
|
+
visit solr_document_path '2eddde2f-c222-41ca-bd07-2fd74a21f4de'
|
|
7
|
+
find('#downloads-button').click
|
|
8
|
+
within '#downloads-collapse' do
|
|
9
|
+
expect(page).to have_selector(:css, 'a[href="ftp://gdrs.dnr.state.mn.us/gdrs/data/pub/us_mn_state_dnr/fgdb_base_usgs_scanned_topo_100k_drg.zip"]')
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
scenario 'with download Array' do
|
|
14
|
+
visit solr_document_path 'princeton-sx61dn82p'
|
|
15
|
+
find('#downloads-button').click
|
|
16
|
+
within '#downloads-collapse' do
|
|
17
|
+
expect(page).to have_selector(:css, 'a[href="https://figgy.princeton.edu/downloads/a990e1b4-7f0e-44b8-ae2a-de7e93cdd74a/file/36a2274c-e0c6-4901-a14f-7c422d15e194"]')
|
|
18
|
+
expect(page).to have_selector(:css, 'a[href="https://libimages1.princeton.edu/loris/figgy_prod/2e%2Fa9%2F43%2F2ea943b0bd4348fc9954b299f1b359f6%2Fintermediate_file.jp2/full/full/0/default.jpg"]')
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
scenario 'with Harvard hgl_download' do
|
|
23
|
+
visit solr_document_path 'harvard-g7064-s2-1834-k3'
|
|
24
|
+
find('#downloads-button').click
|
|
25
|
+
within '#downloads-collapse' do
|
|
26
|
+
expect(page).to have_selector(:css, 'a[href="/download/hgl/harvard-g7064-s2-1834-k3"][data-download-type="harvard-hgl"]')
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -5,8 +5,8 @@ feature 'Metadata display on show page' do
|
|
|
5
5
|
scenario 'with default CatalogController specified fields' do
|
|
6
6
|
visit solr_document_path 'stanford-dp018hs9766'
|
|
7
7
|
within '.document-metadata' do
|
|
8
|
-
expect(page).to have_css 'dt', count:
|
|
9
|
-
expect(page).to have_css 'dd', count:
|
|
8
|
+
expect(page).to have_css 'dt', count: 16
|
|
9
|
+
expect(page).to have_css 'dd', count: 16
|
|
10
10
|
expect(page).to have_css 'div.truncate-abstract', count: 1
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -40,7 +40,7 @@ feature 'Index view', js: true do
|
|
|
40
40
|
expect(page).to have_css('a.facet-select', text: 'University of Minnesota', visible: true)
|
|
41
41
|
expect(page).to have_css('a.facet-select', text: 'MIT', visible: true)
|
|
42
42
|
expect(page).to have_css('a.facet-select', text: 'Stanford', visible: true)
|
|
43
|
-
expect(page).to have_css('a
|
|
43
|
+
expect(page).to have_css('.more_facets a', text: /more\sProvider\s»/, visible: true)
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -77,4 +77,15 @@ feature 'Index view', js: true do
|
|
|
77
77
|
expect(page).to have_css 'span.filter-name', text: 'Bounding Box'
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
|
+
|
|
81
|
+
scenario 'should have schema.org props listed' do
|
|
82
|
+
visit search_catalog_path(f: { Settings.FIELDS.PROVIDER => ['Stanford'] })
|
|
83
|
+
within('.documentHeader', match: :first) do
|
|
84
|
+
expect(page).to have_css("a[itemprop='name']")
|
|
85
|
+
find('.caret-toggle').click
|
|
86
|
+
end
|
|
87
|
+
within('.more-info-area', match: :first) do
|
|
88
|
+
expect(page).to have_css("small[itemprop='description']")
|
|
89
|
+
end
|
|
90
|
+
end
|
|
80
91
|
end
|