geoblacklight 1.9.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -2
  3. data/.rubocop.yml +4 -14
  4. data/.rubocop_todo.yml +51 -48
  5. data/README.md +3 -0
  6. data/Rakefile +1 -2
  7. data/app/assets/javascripts/geoblacklight/basemaps.js +3 -3
  8. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +1 -1
  10. data/app/assets/javascripts/geoblacklight/modules/download.js +1 -1
  11. data/app/assets/javascripts/geoblacklight/modules/home.js +3 -2
  12. data/app/assets/javascripts/geoblacklight/modules/util.js +8 -0
  13. data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +19 -0
  14. data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +15 -13
  15. data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +3 -3
  16. data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +4 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +20 -12
  18. data/app/assets/javascripts/geoblacklight/viewers/map.js +2 -1
  19. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -5
  20. data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +43 -0
  21. data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +4 -1
  22. data/app/assets/stylesheets/geoblacklight/application.scss +0 -1
  23. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +33 -13
  24. data/app/assets/stylesheets/geoblacklight/modules/home.scss +22 -19
  25. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +1 -1
  26. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +7 -0
  27. data/app/assets/stylesheets/geoblacklight/modules/item.scss +7 -8
  28. data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +9 -0
  29. data/app/assets/stylesheets/geoblacklight/modules/relations.scss +15 -0
  30. data/app/assets/stylesheets/geoblacklight/modules/results.scss +7 -2
  31. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +60 -0
  32. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +55 -35
  33. data/app/controllers/download_controller.rb +5 -4
  34. data/app/controllers/relation_controller.rb +11 -1
  35. data/app/helpers/carto_helper.rb +2 -9
  36. data/app/helpers/geoblacklight_helper.rb +15 -28
  37. data/app/models/concerns/geoblacklight/solr_document.rb +4 -0
  38. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +18 -1
  39. data/app/presenters/geoblacklight/document_presenter.rb +2 -2
  40. data/app/views/catalog/_document_action.html.erb +2 -2
  41. data/app/views/catalog/_document_split.html.erb +5 -3
  42. data/app/views/catalog/_downloads_secondary.html.erb +39 -0
  43. data/app/views/catalog/_facet_tag_layout.html.erb +1 -1
  44. data/app/views/catalog/_home_text.html.erb +30 -38
  45. data/app/views/catalog/_index_split_default.html.erb +1 -2
  46. data/app/views/catalog/_metadata.html.erb +3 -3
  47. data/app/views/catalog/_show_default_attribute_table.html.erb +16 -14
  48. data/app/views/catalog/_show_default_viewer_container.html.erb +5 -3
  49. data/app/views/catalog/_show_default_viewer_information.html.erb +3 -1
  50. data/app/views/catalog/_show_downloads.html.erb +12 -9
  51. data/app/views/catalog/_show_tools.html.erb +25 -0
  52. data/app/views/catalog/_web_services.html.erb +1 -1
  53. data/app/views/catalog/_web_services_wfs.html.erb +1 -1
  54. data/app/views/catalog/_web_services_wms.html.erb +1 -1
  55. data/app/views/catalog/index.html.erb +9 -8
  56. data/app/views/relation/_ancestors.html.erb +2 -2
  57. data/app/views/relation/_descendants.html.erb +3 -3
  58. data/app/views/relation/index.html.erb +8 -8
  59. data/app/views/shared/_header_navbar.html.erb +28 -17
  60. data/config/locales/geoblacklight.en.yml +2 -2
  61. data/geoblacklight.gemspec +5 -4
  62. data/lib/generators/geoblacklight/install_generator.rb +3 -12
  63. data/lib/generators/geoblacklight/templates/Procfile +3 -0
  64. data/lib/generators/geoblacklight/templates/catalog_controller.rb +33 -5
  65. data/lib/generators/geoblacklight/templates/package.json +14 -0
  66. data/lib/generators/geoblacklight/templates/settings.yml +15 -1
  67. data/lib/generators/geoblacklight/templates/webpacker.yml +67 -0
  68. data/lib/generators/geoblacklight/webpacker_generator.rb +35 -0
  69. data/lib/geoblacklight.rb +2 -4
  70. data/lib/geoblacklight/controller_override.rb +27 -22
  71. data/lib/geoblacklight/engine.rb +0 -1
  72. data/lib/geoblacklight/version.rb +1 -1
  73. data/lib/tasks/geoblacklight.rake +18 -0
  74. data/schema/geoblacklight-schema.md +72 -59
  75. data/schema/geometry-type-values.md +1 -0
  76. data/schema/references.md +22 -0
  77. data/schema/schema-commentary.md +198 -0
  78. data/schema/subjects.md +41 -0
  79. data/schema/type-values.md +4 -2
  80. data/solr/conf/core.properties +5 -0
  81. data/solr/conf/schema.xml +11 -1
  82. data/solr/conf/solrconfig.xml +1 -1
  83. data/spec/controllers/catalog_controller_spec.rb +17 -1
  84. data/spec/factories/user.rb +2 -2
  85. data/spec/features/download_layer_spec.rb +19 -15
  86. data/spec/features/esri_viewer_spec.rb +2 -2
  87. data/spec/features/home_page_spec.rb +6 -2
  88. data/spec/features/index_map_spec.rb +15 -25
  89. data/spec/features/layer_opacity_spec.rb +1 -1
  90. data/spec/features/layer_preview_spec.rb +3 -2
  91. data/spec/features/linkified_attribute_table_spec.rb +3 -4
  92. data/spec/features/relations_spec.rb +1 -1
  93. data/spec/features/search_bar_spec.rb +2 -2
  94. data/spec/features/search_results_map_spec.rb +2 -2
  95. data/spec/features/search_results_overlap_ratio_spec.rb +55 -0
  96. data/spec/features/search_spec.rb +13 -0
  97. data/spec/features/show_page_metadata_spec.rb +1 -1
  98. data/spec/features/sms_spec.rb +15 -0
  99. data/spec/features/split_view.html.erb_spec.rb +24 -15
  100. data/spec/features/web_services_modal_spec.rb +0 -2
  101. data/spec/fixtures/solr_documents/README.md +38 -0
  102. data/spec/fixtures/solr_documents/esri-image-map-layer.json +39 -18
  103. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +37 -0
  104. data/spec/fixtures/solr_documents/index-map-polygon.json +37 -0
  105. data/spec/fixtures/solr_documents/{point_index_map.json → index_map_point.json} +1 -1
  106. data/spec/fixtures/solr_documents/princeton-child1.json +30 -0
  107. data/spec/fixtures/solr_documents/princeton-child2.json +30 -0
  108. data/spec/fixtures/solr_documents/princeton-parent.json +25 -0
  109. data/spec/helpers/carto_helper_spec.rb +1 -20
  110. data/spec/helpers/geoblacklight_helper_spec.rb +4 -22
  111. data/spec/lib/geoblacklight/document_presenter_spec.rb +1 -1
  112. data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -1
  113. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +10 -0
  114. data/spec/spec_helper.rb +6 -3
  115. data/spec/teaspoon_env.rb +31 -1
  116. data/spec/test_app_templates/lib/generators/test_app_generator.rb +5 -0
  117. data/spec/test_app_templates/solr_documents +1 -0
  118. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
  119. data/spec/views/catalog/_show_tools.html.erb_spec.rb +39 -0
  120. data/template.rb +4 -2
  121. data/vendor/assets/images/layers-2x.png +0 -0
  122. data/vendor/assets/images/layers.png +0 -0
  123. data/vendor/assets/images/marker-icon-2x.png +0 -0
  124. data/vendor/assets/images/marker-icon.png +0 -0
  125. data/vendor/assets/images/marker-shadow.png +0 -0
  126. data/vendor/assets/javascripts/esri-leaflet.js.map +1 -0
  127. data/vendor/assets/javascripts/leaflet-src.js.map +1 -0
  128. data/vendor/assets/javascripts/leaflet.js.erb +13922 -0
  129. data/vendor/assets/stylesheets/leaflet.css +635 -0
  130. metadata +87 -33
  131. data/app/assets/stylesheets/geoblacklight/modules/twitter-typeahead.scss +0 -14
  132. data/app/views/catalog/_search_form_no_navbar.html.erb +0 -22
  133. data/app/views/catalog/_show_default.html.erb +0 -13
  134. data/app/views/catalog/_upper_metadata.html.erb +0 -20
  135. data/spec/fixtures/solr_documents/umn_metro_result2.json +0 -39
@@ -4,6 +4,10 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
4
4
  before do
5
5
  visit root_path
6
6
  end
7
+ scenario 'navbar' do
8
+ expect(page).to have_css '#bookmarks_nav'
9
+ expect(page).to have_css 'a', text: 'History'
10
+ end
7
11
  scenario 'search bar' do
8
12
  expect(page).not_to have_css '#search-navbar'
9
13
  within '.jumbotron' do
@@ -17,8 +21,8 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
17
21
  expect(page).to have_css '.home-facet-link', count: 36
18
22
  expect(page).to have_css 'a.more_facets_link', count: 4
19
23
  click_link 'Elevation'
20
- expect(page).to have_css '.filterName', text: 'Subject'
21
- expect(page).to have_css '.filterValue', text: 'Elevation'
24
+ expect(page).to have_css '.filter-name', text: 'Subject'
25
+ expect(page).to have_css '.filter-value', text: 'Elevation'
22
26
  end
23
27
  scenario 'map should be visible' do
24
28
  within '#main-container' do
@@ -1,41 +1,31 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  feature 'Index map' do
4
+ # Colors
5
+ default_color = '#1eb300'
6
+ selected_color = '#006bde'
4
7
  scenario 'displays index map viewer (polygon)', js: true do
5
8
  visit solr_document_path('stanford-fb897vt9938')
6
9
  # Wait until SVG elements are added
7
10
  expect(page).to have_css '.leaflet-overlay-pane svg'
8
- page.first('svg g path').click
9
- within '.index-map-info' do
10
- expect(page).to have_css 'h3', text: 'Dabao Kinbōzu -- ダバオ近傍圖'
11
- expect(page).to have_css 'a img[src="https://stacks.stanford.edu/image/iiif/zh828kt2136%2Fzh828kt2136_00_0001/full/!400,400/0/default.jpg"]'
12
- within 'dl' do
13
- expect(page).to have_css 'dt', text: 'Website'
14
- expect(page).to have_css 'dd a', text: 'http://purl.stanford.edu/zh828kt2136'
15
- expect(page).to have_css 'dt', text: 'Download'
16
- expect(page).to have_css 'dd a', text: 'https://embed.stanford.edu/iframe?url=https://purl.stanford.edu/zh828kt2136&hide_title=true#'
17
- expect(page).to have_css 'dt', text: 'Record Identifier'
18
- expect(page).to have_css 'dd', text: '10532136'
19
- expect(page).to have_css 'dt', text: 'Label'
20
- expect(page).to have_css 'dd', text: 'SHEET 8'
21
- end
11
+ within '#map' do
12
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
13
+ find('svg g path:nth-child(2)').click
14
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{selected_color}']"
15
+ first('svg g path').click
16
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
22
17
  end
23
18
  end
24
19
  scenario 'displays index map viewer (points)', js: true do
25
20
  visit solr_document_path('cornell-ny-aerial-photos-1960s')
26
21
  # Wait until SVG elements are added
27
22
  expect(page).to have_css '.leaflet-overlay-pane svg'
28
- page.first('svg g path').click
29
- within '.index-map-info' do
30
- expect(page).to have_css 'img[src="http://stor.artstor.org/stor/e6d1510d-de11-436a-9bfd-3dcdfbbc6296_size2"]'
31
- within 'dl' do
32
- expect(page).to have_css 'dt', text: 'Download'
33
- expect(page).to have_css 'dd a', text: 'http://stor.artstor.org/stor/e6d1510d-de11-436a-9bfd-3dcdfbbc6296.jpg'
34
- expect(page).to have_css 'dt', text: 'Record Identifier'
35
- expect(page).to have_css 'dd', text: 'ss:201109'
36
- expect(page).to have_css 'dt', text: 'Label'
37
- expect(page).to have_css 'dd', text: 'ARO-1DD-14'
38
- end
23
+ within '#map' do
24
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
25
+ find('svg g path:nth-child(2)').click
26
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{selected_color}']"
27
+ first('svg g path').click
28
+ expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
39
29
  end
40
30
  end
41
31
  end
@@ -8,7 +8,7 @@ feature 'Layer opacity', js: true do
8
8
  end
9
9
 
10
10
  scenario 'ESRI image service layer should have opacity control' do
11
- visit solr_document_path('princeton-test-oregon-naip-2011')
11
+ visit solr_document_path('32653ed6-8d83-4692-8a06-bf13ffe2c018')
12
12
  expect(page).to have_css('div.opacity-text', text: '75%')
13
13
  expect(page.find('img.leaflet-image-layer', match: :first)[:style]).to match(/opacity: 0.75;/)
14
14
  end
@@ -3,12 +3,13 @@ require 'spec_helper'
3
3
  feature 'Layer preview', js: true do
4
4
  scenario 'Restricted layer should show bounding box' do
5
5
  visit solr_document_path('stanford-cg357zz0321')
6
- expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 1
6
+ within('#map') do
7
+ expect(page).to have_css('path')
8
+ end
7
9
  end
8
10
 
9
11
  scenario 'Public layer should show wms layer not bounding box' do
10
12
  visit solr_document_path('mit-f6rqs4ucovjk2')
11
- expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 0
12
13
  within '.leaflet-tile-pane' do
13
14
  expect(page).to have_css('.leaflet-layer', count: 2)
14
15
  end
@@ -1,10 +1,9 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  feature 'Attribute table values', js: true do
4
- scenario 'are linkified' do
5
- pending 'ArcGIS server returning an error'
6
- visit solr_document_path 'minnesota-e2f33b52-4039-4bbb-9095-b5cdc0175943'
7
- # Wait until SVG elements are added
4
+ xscenario 'are linkified' do
5
+ # ArcGIS server returning an error. Wait until SVG elements are added
6
+ visit solr_document_path 'f406332e63eb4478a9560ad86ae90327_18'
8
7
  expect(page).to have_css '.leaflet-overlay-pane svg'
9
8
  page.first('svg g path').click
10
9
  expect(page).to have_css 'td a[href="http://www.minneapolismn.gov/fire/stations/fire_station28"]', text: 'http://www.minneapolismn.gov/fire/stations/fire_station28'
@@ -41,7 +41,7 @@ feature 'Display related documents' do
41
41
 
42
42
  scenario 'Record with relations should render widget in catalog#show', js: true do
43
43
  visit solr_document_path('nyu_2451_34635')
44
- expect(page).to have_css('div.panel-heading', text: 'Data Relations')
44
+ expect(page).to have_css('div.card-header', text: 'Data Relations')
45
45
  end
46
46
 
47
47
  scenario 'Record without relations should not render widget in catalog#show', js: true do
@@ -3,10 +3,10 @@ require 'spec_helper'
3
3
  feature 'search bar' do
4
4
  scenario 'present on a spatial search' do
5
5
  visit search_catalog_path(bbox: '25 3 75 35')
6
- expect(page).to have_css '#search-navbar'
6
+ expect(page).to have_css '.navbar-search'
7
7
  end
8
8
  scenario 'present on a text search' do
9
9
  visit search_catalog_path(q: 'test')
10
- expect(page).to have_css '#search-navbar'
10
+ expect(page).to have_css '.navbar-search'
11
11
  end
12
12
  end
@@ -8,8 +8,8 @@ feature 'search results map', js: true do
8
8
  scenario 'present on a search result page' do
9
9
  visit root_path
10
10
  click_link 'Minnesota, United States'
11
- results = page.all(:css, 'div.document')
12
- expect(results.count).to equal(4)
11
+ results = page.all(:css, 'article.document')
12
+ expect(results.count).to equal(3)
13
13
  end
14
14
  scenario 'view is scoped to Minnesota' do
15
15
  visit root_path
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ feature 'spatial search results overlap ratio' do
4
+ scenario 'result bboxes fully contained, overlap ratio applied to relevancy' do
5
+ allow(Settings).to receive(:OVERLAP_RATIO_BOOST).and_return 200
6
+
7
+ # BBox param is the US upper midwest and Canada, roughly centered on the state of Minnesota
8
+ visit search_catalog_path(
9
+ bbox: '-103.196521 39.21962 -84.431873 53.63497',
10
+ 'f[dct_provenance_s][]': 'Minnesota'
11
+ )
12
+
13
+ # MN State result
14
+ # Slightly bigger bbox / result bbox fits bbox param best
15
+ expect(position_in_result_page(page, 'e9c71086-6b25-4950-8e1c-84c2794e3382')).to eq 1
16
+
17
+ # MN State result
18
+ # Slightly smaller bbox / result bbox fits bbox param second best
19
+ expect(position_in_result_page(page, '2eddde2f-c222-41ca-bd07-2fd74a21f4de')).to eq 2
20
+
21
+ # TC Metro result
22
+ # Smaller bbox / result bbox fits bbox param third
23
+ expect(position_in_result_page(page, '02236876-9c21-42f6-9870-d2562da8e44f')).to eq 3
24
+ end
25
+
26
+ scenario 'three bboxes overlap, but none are fully contained, overlap ratio should still impact relevancy' do
27
+ allow(Settings).to receive(:OVERLAP_RATIO_BOOST).and_return 200
28
+
29
+ # BBox param is the center to western edge of New York state and Canada, roughly centered on Lake Ontario
30
+ visit search_catalog_path(
31
+ bbox: '-83.750499 40.41709 -74.368175 47.963663',
32
+ 'f[dct_provenance_s][]': 'Cornell'
33
+ )
34
+
35
+ # NY State result
36
+ # Bigger bbox / result bbox overlaps bbox param best
37
+ expect(position_in_result_page(page, 'cugir-008186')).to be < 3
38
+
39
+ # NY State result
40
+ # Bigger bbox / result bbox overlaps bbox param best (score tie)
41
+ expect(position_in_result_page(page, 'cugir-008186-no-downloadurl')).to be < 3
42
+
43
+ # NY Adirondak Region result
44
+ # Smaller bbox / result bbox overlaps bbox param the least
45
+ expect(position_in_result_page(page, 'cugir-007741')).to eq 3
46
+ end
47
+ end
48
+
49
+ def position_in_result_page(page, id)
50
+ results = []
51
+ page.all('div.documentHeader.row').each do |div|
52
+ results << div['data-layer-id']
53
+ end
54
+ results.index(id) + 1
55
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ feature 'Search' do
4
+ scenario 'Suppressed records are hidden' do
5
+ visit '/?q=Sanborn+Map+Company'
6
+ expect(page).to have_css '.document', count: 1
7
+ end
8
+
9
+ scenario 'When searching child records from a parent record, supressed records are not hidden' do
10
+ visit '/?f[dc_source_sm][]=princeton-1r66j405w&q='
11
+ expect(page).to have_css '.document', count: 2
12
+ end
13
+ end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  feature 'Metadata display on show page' do
4
4
  scenario 'with default CatalogController specified fields' do
5
5
  visit solr_document_path 'stanford-dp018hs9766'
6
- within '.geoblacklight-view-panel' do
6
+ within '.document-metadata' do
7
7
  expect(page).to have_css 'dt', count: 8
8
8
  expect(page).to have_css 'dd', count: 8
9
9
  expect(page).to have_css 'div.truncate-abstract', count: 1
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ feature 'SMS tool', js: true do
4
+ scenario 'shows up in tools' do
5
+ visit solr_document_path 'stanford-cg357zz0321'
6
+ expect(page).to have_css 'li.sms a', text: 'SMS This'
7
+ click_link 'SMS This'
8
+ within '.modal-body' do
9
+ expect(page).to have_css 'input', count: 1
10
+ expect(page).to have_css 'label', text: 'Phone Number:'
11
+ expect(page).to have_css 'select', count: 1
12
+ expect(page).to have_css 'label', text: 'Carrier'
13
+ end
14
+ end
15
+ end
@@ -13,22 +13,28 @@ feature 'Index view', js: true do
13
13
  expect(page).to have_css('#map')
14
14
  end
15
15
 
16
+ scenario 'should have sort and per_page on page' do
17
+ visit search_catalog_path(f: { Settings.FIELDS.PROVENANCE => ['Stanford'] })
18
+ expect(page).to have_css('#sort-dropdown')
19
+ expect(page).to have_css('#per_page-dropdown')
20
+ end
21
+
16
22
  scenario 'should have facets listed correctly' do
17
23
  within '#facet-panel-collapse' do
18
- expect(page).to have_css('div.panel.facet_limit', text: 'Institution')
19
- expect(page).to have_css('div.panel.facet_limit', text: 'Publisher')
20
- expect(page).to have_css('div.panel.facet_limit', text: 'Subject')
21
- expect(page).to have_css('div.panel.facet_limit', text: 'Place')
22
- expect(page).to have_css('div.panel.facet_limit', text: 'Year')
23
- expect(page).to have_css('div.panel.facet_limit', text: 'Access')
24
- expect(page).to have_css('div.panel.facet_limit', text: 'Data type')
25
- expect(page).to have_css('div.panel.facet_limit', text: 'Format')
24
+ expect(page).to have_css('div.card.facet-limit', text: 'Institution')
25
+ expect(page).to have_css('div.card.facet-limit', text: 'Publisher')
26
+ expect(page).to have_css('div.card.facet-limit', text: 'Subject')
27
+ expect(page).to have_css('div.card.facet-limit', text: 'Place')
28
+ expect(page).to have_css('div.card.facet-limit', text: 'Year')
29
+ expect(page).to have_css('div.card.facet-limit', text: 'Access')
30
+ expect(page).to have_css('div.card.facet-limit', text: 'Data type')
31
+ expect(page).to have_css('div.card.facet-limit', text: 'Format')
26
32
  end
27
33
  click_link 'Institution'
28
34
  using_wait_time 120 do
29
- expect(page).to have_css('a.facet_select', text: 'Minnesota', visible: true)
30
- expect(page).to have_css('a.facet_select', text: 'MIT', visible: true)
31
- expect(page).to have_css('a.facet_select', text: 'Stanford', visible: true)
35
+ expect(page).to have_css('a.facet-select', text: 'Minnesota', visible: true)
36
+ expect(page).to have_css('a.facet-select', text: 'MIT', visible: true)
37
+ expect(page).to have_css('a.facet-select', text: 'Stanford', visible: true)
32
38
  expect(page).to have_css('a.more_facets_link', text: /more\sInstitution\s»/, visible: true)
33
39
  end
34
40
  end
@@ -36,9 +42,12 @@ feature 'Index view', js: true do
36
42
  scenario 'hover on record should produce bounding box on map' do
37
43
  # Needed to find an svg element on the page
38
44
  visit search_catalog_path(f: { Settings.FIELDS.PROVENANCE => ['Stanford'] })
39
- expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 0
45
+ # BL7 has svg icons, so sniffing for SVG path won't return false
46
+ # expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 0
40
47
  find('.documentHeader', match: :first).hover
41
- expect(Nokogiri::HTML.parse(page.body).css('path').length).to eq 1
48
+ within('#map') do
49
+ expect(page).to have_css('path')
50
+ end
42
51
  end
43
52
 
44
53
  scenario 'click on a record area to expand collapse' do
@@ -52,7 +61,7 @@ feature 'Index view', js: true do
52
61
  scenario 'spatial search should reset to page one' do
53
62
  visit '/?per_page=5&q=%2A&page=2'
54
63
  find('#map').double_click
55
- expect(find('.page_entries')).to have_content(/^1 - \d of \d.*$/)
64
+ expect(find('.page-entries')).to have_content(/^1 - \d of \d.*$/)
56
65
  end
57
66
 
58
67
  scenario 'clicking map search should retain current search parameters' do
@@ -60,7 +69,7 @@ feature 'Index view', js: true do
60
69
  find('#map').double_click
61
70
  within '#appliedParams' do
62
71
  expect(page).to have_content('Subject Population')
63
- expect(page).to have_css 'span.filterName', text: 'Bounding Box'
72
+ expect(page).to have_css 'span.filter-name', text: 'Bounding Box'
64
73
  end
65
74
  end
66
75
  end
@@ -10,11 +10,9 @@ feature 'web services tools' do
10
10
  expect(page).to have_css 'input', count: 4
11
11
  expect(page).to have_css 'label', text: 'Web Feature Service (WFS)'
12
12
  expect(page).to have_css 'input[value="https://geowebservices-restricted.stanford.edu/geoserver/wfs"]'
13
- expect(page).to have_css 'label', text: 'Web Feature Service (WFS)'
14
13
  expect(page).to have_css 'input[value="druid:cg357zz0321"]', count: 2
15
14
  expect(page).to have_css 'label', text: 'Web Mapping Service (WMS)'
16
15
  expect(page).to have_css 'input[value="https://geowebservices-restricted.stanford.edu/geoserver/wms"]'
17
- expect(page).to have_css 'label', text: 'WMS layers'
18
16
  end
19
17
  end
20
18
  end
@@ -0,0 +1,38 @@
1
+ # Listing of GeoBlacklight .json test documents
2
+
3
+ If you add a new document, please add it to the table below, and indicate its purpose.
4
+
5
+ | document | purpose |
6
+ | -------- | ------- |
7
+ | actual-papermap1 |Nondigitized paper map with a link to a library catalog|
8
+ | actual-point1 |Point dataset with WMS and WFS|
9
+ | actual-polygon1 |Polygon dataset (no direct download) with WFS, WMS, and FGDC metadata as XML|
10
+ | actual-raster1 |Restricted raster layer with WMS and metadata in MODS and ISO 19139|
11
+ | baruch_ancestor1 |SQLite Database with documentation download. Referenced as parent|
12
+ | baruch_ancestor2 |Geodatabase with documentation download. Referenced as parent|
13
+ | baruch_documentation_download |Point dataset with WMS and WFS, documentation download, and two parent records|
14
+ | bbox-spans-180 |Scanned map with IIIF and direct TIFF download that spans across the 180th meridian|
15
+ | cornell_html_metadata |Point dataset with WMS, WFS, direct download, and FGDC metadata XML and HTML|
16
+ | esri-dynamic-layer-single-layer |ArcGIS Dynamic Map Layer with single layer indicated|
17
+ | esri-feature-layer |ArcGIS Feature Layer - point dataset|
18
+ | esri-image-map-layer |ArcGIS Image Map Layer with GeoTIFF direct download|
19
+ | esri-tiled_map_layer |ArcGIS tiled map layer|
20
+ | esri-wms-layer |Dataset with ArcGIS Dynamic Map Layer, ArcGIS WMS, and direct download|
21
+ | harvard_raster |Raster with WMS and Harvard style download function|
22
+ | iiif-eastern-hemisphere |Eastern hemisphere scanned map with IIIF and direct TIFF download|
23
+ | index_map_point | GeoJSON index map of points |
24
+ | index_map_polygon | GeoJSON index map of polygons, with a downloadUrl for the index itself |
25
+ | index_map_polygon-no-downloadurl | GeoJSON index map of polygons, but lacking a downloadUrl for the index itself |
26
+ | index-map-stanford | old-style (pre-GeoJSON) index map of rectangular polygons |
27
+ | no_spatial |File without geometry type or solr_geometry (will cause error)|
28
+ | princeton-child1.json | Child record for testing the `suppressed_b` property |
29
+ | princeton-child2.json | Child record for testing the `suppressed_b` property |
30
+ | princeton-parent.json | Parent record for testing the `suppressed_b` property |
31
+ | public_direct_download | includes a tentative `dcat_distribution_sm` property |
32
+ | public_iiif_princeton |Scanned map with IIIF|
33
+ | public_polygon_mit |Polygon shapefile with WMS and WFS|
34
+ | restricted-line |Restricted line layer with WFS, WMS and metadata in MODS and ISO 19139|
35
+ | umn_metro_result1.json |Bounding box of metropolitan area and ArcGIS Dynamic Map Layer|
36
+ | umn_state_result1.json |Bounding box of state area and static image in references|
37
+ | umn_state_result2.json |Bounding box of state area and raster download|
38
+ | uva_slug_colon.json | Multipoint dataset with WMS and WFS and a colon in the slug and layer ID |
@@ -1,21 +1,42 @@
1
1
  {
2
- "geoblacklight_version": "1.0",
3
- "dc_description_s": "A Web Mercator mosaic derived from half-meter resolution color Digital Orthophoto Quadrangles (DOQ) of the entire state of Oregon from the summer of 2011 for multiple state agencies in Oregon. The original content was produced utilizing the scanned aerial film acquired during peak agriculture growing seasons under the National Agriculture Imagery Program (NAIP) under contract for the United States Department of Agriculture (USDA) for the Farm Service Agency's (FSA) Compliance Program. A DOQ is a raster image in which displacement in the image caused by sensor orientation and terrain relief has been removed. A DOQ combines the image characteristics of a photograph with the geometric qualities of a map. The geographic extent of the DOQ is a full 7.5-minute map (latitude and longitude) with a nominal buffer. The horizontal accuracy is within 5 meters of reference ortho imagery (1992 USGS DOQs.) The 1992 USGS DOQ imagery met National Map Accuracy Standards at 1:24,000 scale for 7.5-minute quadrangles. Translated to the ground, the 0.5 mm error distance at 1:24,000 scale is 39.4 ft (12 meters), making the absolute accuracy for the 2011 Oregon DOQs +/- 17 meters. The process of reprojecting and mosaicing the images may have added a potential shift of +/-0.75 meters, making the cumulative accuracy +/-17.75 meters. The original images were projected into a GCS_WGS_1984_Web_Mercator(Auxiliary Sphere) for compatibility with other generic web map services.",
4
- "dc_format_s": "GeoTIFF",
5
- "dc_identifier_s": "oregon-naip-2011",
6
- "dc_language_s": "English",
2
+ "dc_identifier_s": "32653ed6-8d83-4692-8a06-bf13ffe2c018",
3
+ "dc_title_s": "Wabash Topo (27): Indiana, 1929",
4
+ "dc_description_s": "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
5
  "dc_rights_s": "Public",
8
- "dc_title_s": "2011 One Meter Color IR NAIP Orthoimagery",
9
- "dc_type_s": "Dataset",
10
- "dct_references_s": "{\"urn:x-esri:serviceType:ArcGIS#ImageMapLayer\": \"http://imagery.oregonexplorer.info/arcgis/rest/services/NAIP_2011/NAIP_2011_Dynamic/ImageServer\"}",
6
+ "dc_format_s": "GeoTIFF",
7
+ "dc_language_sm": [
8
+ "English"
9
+ ],
10
+ "dc_type_sm": [
11
+ "Image"
12
+ ],
13
+ "dc_publisher_sm": [
14
+ "Purdue University Libraries"
15
+ ],
16
+ "dc_creator_sm": [
17
+
18
+ ],
19
+ "dc_source_sm": "88cc9b19-3294-4da9-9edd-775c81fb1c59",
20
+ "dc_subject_sm": [
21
+ "Imagery and Base Maps",
22
+ "Topography"
23
+ ],
24
+ "dct_provenance_s": "Purdue",
25
+ "dct_references_s": "{\"http://schema.org/url\":\"https://mapsweb.lib.purdue.edu/wabashriver/\",\"http://schema.org/downloadUrl\":\"https://mapsweb.lib.purdue.edu/datasets/Wabash1929/wabash_topo_27.tif.zip\",\"urn:x-esri:serviceType:ArcGIS#ImageMapLayer\":\"https://mapsweb.lib.purdue.edu/arcgis/rest/services/Purdue/wabashtopo/ImageServer\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://64.90.181.107/geonetwork/srv/api/records/32653ed6-8d83-4692-8a06-bf13ffe2c018/formatters/xml\"}",
26
+ "dct_isPartOf_sm": [
27
+ "Purdue Georeferenced Imagery"
28
+ ],
29
+ "dct_issued_s": "2015-10-31",
11
30
  "dct_temporal_sm": [
12
- "2011"
13
- ],
14
- "dct_provenance_s": "Princeton",
15
- "layer_slug_s": "princeton-test-oregon-naip-2011",
16
- "layer_id_s": "oregon-naip-2011",
17
- "layer_geom_type_s": "Raster",
18
- "layer_modified_dt": "2015-07-15T00:41:49Z",
19
- "solr_geom": "ENVELOPE(-124.88, -116.41, 46.34, 41.91)",
20
- "solr_year_i": 2008
21
- }
31
+ "1929"
32
+ ],
33
+ "dct_spatial_sm": [
34
+ "Indiana, United States"
35
+ ],
36
+ "layer_slug_s": "32653ed6-8d83-4692-8a06-bf13ffe2c018",
37
+ "layer_geom_type_s": "Image",
38
+ "layer_modified_dt": "2018-07-20T18:08:03Z",
39
+ "solr_geom": "ENVELOPE(-87.324704, -87.174404, 40.310695, 40.233691)",
40
+ "solr_year_i": 1929,
41
+ "geoblacklight_version": "1.0"
42
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "geoblacklight_version":"1.0",
3
+ "dc_identifier_s":"http://cugir.library.cornell.edu/catalog/cugir-008186#no-downloadUrl",
4
+ "dc_title_s":"Index of Digital Elevation Models (DEM), New York",
5
+ "dc_description_s":"This is an index of all the available DEM (digital elevation model) tiles within New York state. Download links are provided for each tile, but this record doesn't include a downloadUrl for the index map itself.",
6
+ "dc_rights_s":"Public",
7
+ "dct_provenance_s":"Cornell",
8
+ "dct_references_s":"{\"https://openindexmaps.org\":\"https://s3.amazonaws.com/cugir-data/00/81/86/cugir-008186-index.geojson\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.xml\",\"http://www.w3.org/1999/xhtml\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.html\"}",
9
+ "layer_id_s":"cugir008186",
10
+ "layer_slug_s":"cugir-008186-no-downloadurl",
11
+ "dc_type_s":"Dataset",
12
+ "dc_format_s":"GeoTIFF",
13
+ "layer_geom_type_s":"Raster",
14
+ "layer_modified_dt":"2018-12-20T00:00:00Z",
15
+ "dc_creator_sm":[
16
+ "U.S. Geological Survey"
17
+ ],
18
+ "dc_publisher_sm":[
19
+ "U.S. Geological Survey"
20
+ ],
21
+ "dc_subject_sm":[
22
+ "digital elevation model",
23
+ "digital terrain model",
24
+ "hypsography",
25
+ "altitude",
26
+ "topography",
27
+ "Index maps"
28
+ ],
29
+ "dct_spatial_sm":[
30
+ "New York"
31
+ ],
32
+ "dct_temporal_sm":[
33
+ "1995"
34
+ ],
35
+ "solr_geom":"ENVELOPE(-79.750232, -71.750494, 44.999963, 40.499893)",
36
+ "solr_year_i":1995
37
+ }