blacklight-spotlight 2.13.0 → 3.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/blacklight/add_circle.svg +1 -0
- data/app/assets/images/blacklight/arrow_back_ios.svg +1 -0
- data/app/assets/images/blacklight/arrow_forward_ios.svg +1 -0
- data/app/assets/images/blacklight/check.svg +1 -0
- data/app/assets/images/blacklight/check_circle.svg +1 -0
- data/app/assets/images/blacklight/chevron_right.svg +1 -0
- data/app/assets/images/blacklight/custom_fullscreen.svg +1 -0
- data/app/assets/images/blacklight/edit.svg +1 -0
- data/app/assets/images/blacklight/error.svg +1 -0
- data/app/assets/images/blacklight/info.svg +1 -0
- data/app/assets/images/blacklight/remove_circle.svg +1 -0
- data/app/assets/images/blacklight/remove_circle_outline.svg +1 -0
- data/app/assets/images/blacklight/resize_small.svg +1 -0
- data/app/assets/images/blacklight/warning.svg +1 -0
- data/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +1 -1
- data/app/assets/javascripts/spotlight/admin/block_mixins/plustextable.js +2 -2
- data/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +1 -1
- data/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +7 -7
- data/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +3 -3
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +7 -7
- data/app/assets/javascripts/spotlight/admin/catalog_edit.js +2 -2
- data/app/assets/javascripts/spotlight/admin/multi_image_selector.js +2 -2
- data/app/assets/javascripts/spotlight/admin/reindex_monitor.js +1 -1
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +2 -2
- data/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +1 -1
- data/app/assets/javascripts/spotlight/admin/users.js +1 -1
- data/app/assets/javascripts/spotlight/user/index.js +1 -0
- data/app/assets/javascripts/spotlight/user/zpr_links.js.erb +6 -6
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +44 -4
- data/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +4 -8
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +31 -14
- data/app/assets/stylesheets/spotlight/_browse.scss +16 -13
- data/app/assets/stylesheets/spotlight/_catalog.scss +13 -7
- data/app/assets/stylesheets/spotlight/_collapse_toggle.scss +10 -14
- data/app/assets/stylesheets/spotlight/_curation.scss +34 -32
- data/app/assets/stylesheets/spotlight/_exhibit_admin.scss +4 -29
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +16 -14
- data/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +22 -20
- data/app/assets/stylesheets/spotlight/_footer.scss +2 -2
- data/app/assets/stylesheets/spotlight/_header.scss +18 -39
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +1 -24
- data/app/assets/stylesheets/spotlight/_mixins.scss +3 -8
- data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -1
- data/app/assets/stylesheets/spotlight/_nestable.scss +1 -2
- data/app/assets/stylesheets/spotlight/_pages.scss +33 -54
- data/app/assets/stylesheets/spotlight/_report_a_problem.scss +7 -1
- data/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +9 -9
- data/app/assets/stylesheets/spotlight/_slideshow_block.scss +13 -11
- data/app/assets/stylesheets/spotlight/_spotlight.scss +0 -1
- data/app/assets/stylesheets/spotlight/_translations.scss +12 -12
- data/app/assets/stylesheets/spotlight/_variables.scss +14 -15
- data/app/assets/stylesheets/spotlight/_variables_bootstrap.scss +7 -7
- data/app/assets/stylesheets/spotlight/typeahead.css +1 -1
- data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +3 -2
- data/app/controllers/concerns/spotlight/catalog.rb +1 -1
- data/app/controllers/concerns/spotlight/controller.rb +3 -3
- data/app/controllers/concerns/spotlight/search_helper.rb +23 -0
- data/app/controllers/spotlight/browse_controller.rb +18 -4
- data/app/controllers/spotlight/catalog_controller.rb +13 -17
- data/app/controllers/spotlight/dashboards_controller.rb +5 -1
- data/app/controllers/spotlight/exhibits_controller.rb +1 -1
- data/app/controllers/spotlight/home_pages_controller.rb +32 -3
- data/app/controllers/spotlight/pages_controller.rb +19 -1
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +4 -1
- data/app/controllers/spotlight/solr_controller.rb +1 -2
- data/app/helpers/spotlight/application_helper.rb +1 -1
- data/app/helpers/spotlight/browse_helper.rb +1 -1
- data/app/helpers/spotlight/crud_link_helpers.rb +19 -0
- data/app/helpers/spotlight/pages_helper.rb +1 -1
- data/app/mailers/spotlight/contact_mailer.rb +1 -1
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +2 -2
- data/app/models/concerns/spotlight/exhibit_analytics.rb +1 -3
- data/app/models/concerns/spotlight/exhibit_documents.rb +1 -1
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +11 -3
- data/app/models/spotlight/ability.rb +1 -1
- data/app/models/spotlight/analytics/ga.rb +25 -35
- data/app/models/spotlight/analytics/ga_model.rb +29 -0
- data/app/models/spotlight/blacklight_configuration.rb +5 -3
- data/app/models/spotlight/contact_form.rb +11 -4
- data/app/models/spotlight/exhibit.rb +0 -4
- data/app/models/spotlight/field_metadata.rb +3 -9
- data/app/models/spotlight/page.rb +0 -3
- data/app/models/spotlight/page_configurations.rb +1 -1
- data/app/models/spotlight/role.rb +0 -4
- data/app/models/spotlight/search.rb +3 -17
- data/app/presenters/spotlight/iiif_manifest_presenter.rb +5 -1
- data/app/serializers/spotlight/exhibit_export_serializer.rb +69 -28
- data/app/serializers/spotlight/page_representer.rb +1 -1
- data/app/views/catalog/_save_search.html.erb +6 -4
- data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
- data/app/views/layouts/spotlight/base.html.erb +48 -0
- data/app/views/layouts/spotlight/spotlight.html.erb +16 -54
- data/app/views/shared/_about_navbar.html.erb +2 -2
- data/app/views/shared/_browse_navbar.html.erb +2 -2
- data/app/views/shared/_curated_features_navbar.html.erb +4 -4
- data/app/views/shared/_exhibit_navbar.html.erb +5 -5
- data/app/views/shared/_header_navbar.html.erb +8 -13
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/shared/_site_sidebar.html.erb +6 -6
- data/app/views/shared/_user_util_links.html.erb +47 -0
- data/app/views/spotlight/about_pages/_contact.html.erb +3 -4
- data/app/views/spotlight/about_pages/_contacts.html.erb +1 -1
- data/app/views/spotlight/about_pages/_sidebar.html.erb +3 -5
- data/app/views/spotlight/about_pages/index.html.erb +7 -6
- data/app/views/spotlight/admin_users/index.html.erb +78 -79
- data/app/views/spotlight/appearances/edit.html.erb +26 -23
- data/app/views/spotlight/browse/_search.html.erb +2 -2
- data/app/views/spotlight/browse/_search_box.html.erb +9 -6
- data/app/views/spotlight/browse/_search_title.html.erb +1 -1
- data/app/views/spotlight/browse/_sort_and_per_page.html.erb +3 -5
- data/app/views/spotlight/browse/index.html.erb +4 -6
- data/app/views/spotlight/browse/show.html.erb +1 -1
- data/app/views/spotlight/catalog/_admin_header.html.erb +2 -2
- data/app/views/spotlight/catalog/_curation_mode_toggle_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +4 -4
- data/app/views/spotlight/catalog/_edit_sidecar.html.erb +1 -1
- data/app/views/spotlight/catalog/_index_compact_default.html.erb +1 -2
- data/app/views/spotlight/catalog/_reindex_progress_panel.html.erb +3 -5
- data/app/views/spotlight/catalog/admin.html.erb +12 -12
- data/app/views/spotlight/contact_forms/new.html.erb +1 -3
- data/app/views/spotlight/contacts/edit.html.erb +6 -5
- data/app/views/spotlight/contacts/new.html.erb +6 -5
- data/app/views/spotlight/custom_fields/edit.html.erb +6 -5
- data/app/views/spotlight/custom_fields/new.html.erb +6 -5
- data/app/views/spotlight/dashboards/_analytics.html.erb +3 -3
- data/app/views/spotlight/dashboards/_page.html.erb +6 -6
- data/app/views/spotlight/dashboards/_page_activity.html.erb +5 -5
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +12 -12
- data/app/views/spotlight/dashboards/analytics.html.erb +11 -11
- data/app/views/spotlight/dashboards/show.html.erb +13 -13
- data/app/views/spotlight/exhibits/_confirmation_status.html.erb +3 -4
- data/app/views/spotlight/exhibits/_contact.html.erb +3 -3
- data/app/views/spotlight/exhibits/_delete.html.erb +7 -5
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +2 -2
- data/app/views/spotlight/exhibits/_form.html.erb +5 -5
- data/app/views/spotlight/exhibits/_languages.html.erb +2 -2
- data/app/views/spotlight/exhibits/_new_exhibit_form.html.erb +0 -2
- data/app/views/spotlight/exhibits/edit.html.erb +43 -42
- data/app/views/spotlight/exhibits/index.html.erb +40 -41
- data/app/views/spotlight/exhibits/new.html.erb +4 -5
- data/app/views/spotlight/feature_pages/_header.html.erb +12 -14
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +2 -4
- data/app/views/spotlight/featured_images/_form.html.erb +4 -4
- data/app/views/spotlight/filters/_form.html.erb +1 -1
- data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/home_pages/_sidebar.html.erb +1 -3
- data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +4 -4
- data/app/views/spotlight/metadata_configurations/edit.html.erb +5 -4
- data/app/views/spotlight/pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/pages/_form.html.erb +7 -7
- data/app/views/spotlight/pages/_order_pages.html.erb +2 -2
- data/app/views/spotlight/pages/_page.html.erb +11 -11
- data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
- data/app/views/spotlight/pages/edit.html.erb +2 -4
- data/app/views/spotlight/pages/index.html.erb +5 -4
- data/app/views/spotlight/pages/show.html.erb +5 -4
- data/app/views/spotlight/resources/_external_resources_form.html.erb +2 -2
- data/app/views/spotlight/resources/_form.html.erb +1 -1
- data/app/views/spotlight/resources/csv_upload/_form.html.erb +1 -1
- data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
- data/app/views/spotlight/resources/json_upload/_form.html.erb +1 -1
- data/app/views/spotlight/resources/new.html.erb +25 -23
- data/app/views/spotlight/resources/upload/_form.html.erb +2 -2
- data/app/views/spotlight/roles/index.html.erb +60 -57
- data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +3 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +19 -18
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +6 -6
- data/app/views/spotlight/search_configurations/_sort.html.erb +6 -6
- data/app/views/spotlight/search_configurations/edit.html.erb +42 -40
- data/app/views/spotlight/searches/_form.html.erb +15 -10
- data/app/views/spotlight/searches/_search.html.erb +29 -22
- data/app/views/spotlight/searches/edit.html.erb +6 -5
- data/app/views/spotlight/searches/index.html.erb +32 -31
- data/app/views/spotlight/shared/_configuration_sidebar.html.erb +6 -6
- data/app/views/spotlight/shared/_curation_sidebar.html.erb +8 -9
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +6 -8
- data/app/views/spotlight/shared/_locale_picker.html.erb +3 -3
- data/app/views/spotlight/shared/_report_a_problem.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_browse_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +2 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +8 -8
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +8 -8
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +3 -4
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +32 -31
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +5 -5
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +8 -10
- data/app/views/spotlight/sites/edit.html.erb +31 -34
- data/app/views/spotlight/sites/edit_exhibits.html.erb +28 -29
- data/app/views/spotlight/tags/index.html.erb +25 -24
- data/app/views/spotlight/translations/_browse_categories.html.erb +20 -15
- data/app/views/spotlight/translations/_general.html.erb +69 -91
- data/app/views/spotlight/translations/_metadata.html.erb +18 -14
- data/app/views/spotlight/translations/_page.html.erb +2 -2
- data/app/views/spotlight/translations/_search_fields.html.erb +26 -20
- data/app/views/spotlight/translations/edit.html.erb +16 -14
- data/config/locales/spotlight.en.yml +3 -0
- data/config/routes.rb +1 -1
- data/lib/generators/spotlight/install_generator.rb +2 -2
- data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
- data/lib/generators/spotlight/templates/spotlight.scss +0 -1
- data/lib/spotlight/engine.rb +12 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/application_controller_spec.rb +2 -2
- data/spec/controllers/spotlight/browse_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/catalog_controller_spec.rb +13 -13
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +1 -1
- data/spec/examples.txt +50 -1489
- data/spec/features/add_items_spec.rb +2 -2
- data/spec/features/browse_category_admin_spec.rb +3 -3
- data/spec/features/browse_category_spec.rb +3 -3
- data/spec/features/catalog_spec.rb +1 -1
- data/spec/features/exhibits/translation_editing_spec.rb +21 -21
- data/spec/features/feature_page_spec.rb +1 -1
- data/spec/features/home_page_spec.rb +3 -3
- data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +1 -1
- data/spec/features/javascript/blocks/link_to_search_block_spec.rb +1 -1
- data/spec/features/javascript/blocks/search_result_block_spec.rb +9 -4
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +23 -15
- data/spec/features/javascript/blocks/solr_documents_carousel_block_spec.rb +29 -0
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +2 -2
- data/spec/features/javascript/edit_in_place_spec.rb +1 -0
- data/spec/features/javascript/feature_page_admin_spec.rb +11 -11
- data/spec/features/javascript/locale_selector_spec.rb +0 -1
- data/spec/features/javascript/multi_image_select_spec.rb +3 -3
- data/spec/features/javascript/reindex_monitor_spec.rb +2 -2
- data/spec/features/javascript/roles_admin_spec.rb +2 -2
- data/spec/features/javascript/search_context_spec.rb +4 -6
- data/spec/features/site_users_management_spec.rb +1 -1
- data/spec/helpers/spotlight/application_helper_spec.rb +2 -1
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +19 -0
- data/spec/helpers/spotlight/languages_helper_spec.rb +1 -0
- data/spec/lib/spotlight/controller_spec.rb +2 -2
- data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +38 -0
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +7 -6
- data/spec/models/spotlight/analytics/ga_spec.rb +16 -1
- data/spec/models/spotlight/contact_form_spec.rb +37 -5
- data/spec/models/spotlight/exhibit_spec.rb +8 -4
- data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +4 -0
- data/spec/routing/spotlight/exhibit_catalog_spec.rb +15 -11
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +60 -0
- data/spec/test_app_templates/Gemfile.extra +3 -0
- data/spec/test_app_templates/catalog_controller.rb +4 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -2
- data/spec/views/shared/_header_navbar.html.erb_spec.rb +1 -1
- data/spec/views/shared/_masthead.html.erb_spec.rb +1 -1
- data/spec/views/{_user_util_links.html.erb_spec.rb → shared/_user_util_links.html.erb_spec.rb} +1 -1
- data/spec/views/spotlight/about_pages/_sidebar.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/browse/_sort_and_per_page.html.erb_spec.rb +2 -13
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +5 -5
- data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_exhibit_card_front.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +7 -7
- data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -2
- data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/pages/index.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +3 -3
- data/spec/views/spotlight/searches/_search.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/searches/edit.html.erb_spec.rb +3 -3
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +3 -3
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/translations/_page.html.erb_spec.rb +2 -2
- data/vendor/assets/javascripts/bootstrap-tagsinput.js +1 -1
- data/vendor/assets/stylesheets/sir-trevor/_variables.scss +15 -8
- metadata +31 -28
- data/app/assets/stylesheets/spotlight/_navbar.scss +0 -48
- data/app/views/_user_util_links.html.erb +0 -50
- data/app/views/shared/_modal.html.erb +0 -6
@@ -19,7 +19,7 @@ describe 'Uploading a non-repository item', type: :feature do
|
|
19
19
|
|
20
20
|
within('form#new_resources_upload') do
|
21
21
|
expect(page).to have_css('#resources_upload_url[type="file"]')
|
22
|
-
expect(page).to have_css('.
|
22
|
+
expect(page).to have_css('.form-text', text: 'Valid file types: jpg jpeg png')
|
23
23
|
expect(page).to have_css('#resources_upload_data_full_title_tesim[type="text"]')
|
24
24
|
expect(page).to have_css('textarea#resources_upload_data_spotlight_upload_description_tesim')
|
25
25
|
expect(page).to have_css('#resources_upload_data_spotlight_upload_attribution_tesim[type="text"]')
|
@@ -72,7 +72,7 @@ describe 'Uploading a non-repository item', type: :feature do
|
|
72
72
|
|
73
73
|
within('form#new_resources_csv_upload') do
|
74
74
|
expect(page).to have_css('#resources_csv_upload_url[type="file"]')
|
75
|
-
expect(page).to have_css('.
|
75
|
+
expect(page).to have_css('.form-text a', text: 'Download template')
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
@@ -9,7 +9,7 @@ describe 'Browse Category Administration', type: :feature do
|
|
9
9
|
describe 'index' do
|
10
10
|
it 'has searches' do
|
11
11
|
visit spotlight.exhibit_searches_path(exhibit)
|
12
|
-
expect(page).to have_css('.
|
12
|
+
expect(page).to have_css('.card-title', text: search.title)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -40,7 +40,7 @@ describe 'Browse Category Administration', type: :feature do
|
|
40
40
|
visit spotlight.edit_exhibit_search_path(exhibit, search)
|
41
41
|
expect(page).to have_css('h1 small', text: 'Edit Browse Category')
|
42
42
|
expect(find_field('search_title').value).to eq search.title
|
43
|
-
within '.
|
43
|
+
within '.appliedParams' do
|
44
44
|
expect(page).to have_content 'Genre'
|
45
45
|
expect(page).to have_content 'Value'
|
46
46
|
end
|
@@ -119,7 +119,7 @@ describe 'Browse Category Administration', type: :feature do
|
|
119
119
|
it 'destroys a tag' do
|
120
120
|
skip('TODO: Allow searches to be destroyed without javascript')
|
121
121
|
visit spotlight.exhibit_searches_path(exhibit)
|
122
|
-
within('.
|
122
|
+
within('.card .search') do
|
123
123
|
click_link('Delete')
|
124
124
|
end
|
125
125
|
expect(page).to have_content('Search was deleted')
|
@@ -9,7 +9,7 @@ feature 'Browse pages' do
|
|
9
9
|
let(:mock_response) { Blacklight::Solr::Response.new({ response: { numFound: 10, docs: mock_documents } }, {}) }
|
10
10
|
let(:mock_documents) { [] }
|
11
11
|
before do
|
12
|
-
allow_any_instance_of(
|
12
|
+
allow_any_instance_of(Blacklight::SearchService).to receive(:search_results).and_return([mock_response, mock_documents])
|
13
13
|
end
|
14
14
|
|
15
15
|
context 'with the standard exhibit masthead' do
|
@@ -20,7 +20,7 @@ feature 'Browse pages' do
|
|
20
20
|
expect(page).to have_selector 'h1', text: 'Some Saved Search'
|
21
21
|
end
|
22
22
|
|
23
|
-
expect(page).not_to have_selector '.masthead .
|
23
|
+
expect(page).not_to have_selector '.masthead .h2', text: 'Some Saved Search'
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'shows the search bar' do
|
@@ -57,7 +57,7 @@ feature 'Browse pages' do
|
|
57
57
|
it 'has a contextual masthead with the title and resource count' do
|
58
58
|
visit spotlight.exhibit_browse_path(exhibit, search)
|
59
59
|
|
60
|
-
expect(page).to have_selector '.masthead .
|
60
|
+
expect(page).to have_selector '.masthead .h2', text: 'Some Saved Search'
|
61
61
|
|
62
62
|
within '#main-container' do
|
63
63
|
expect(page).not_to have_selector 'h1', text: 'Some Saved Search'
|
@@ -23,7 +23,7 @@ describe 'Catalog', type: :feature do
|
|
23
23
|
|
24
24
|
it "has a 'Item Visiblity' facet" do
|
25
25
|
visit spotlight.search_exhibit_catalog_path(exhibit)
|
26
|
-
expect(page).to have_selector '.
|
26
|
+
expect(page).to have_selector '.card-header', text: 'Item Visibility'
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -21,13 +21,13 @@ describe 'Translation editing', type: :feature do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'selects the correct language' do
|
24
|
-
expect(page).to have_css '.nav-pills
|
24
|
+
expect(page).to have_css '.nav-pills .nav-link.active', text: 'French'
|
25
25
|
end
|
26
26
|
describe 'basic settings' do
|
27
27
|
it 'successfully adds translations' do
|
28
28
|
within '.translation-edit-form #general' do
|
29
|
-
expect(page).to have_css '.
|
30
|
-
expect(page).to have_css '.
|
29
|
+
expect(page).to have_css '.form-text', text: 'Sample'
|
30
|
+
expect(page).to have_css '.form-text', text: 'SubSample'
|
31
31
|
fill_in 'Title', id: 'exhibit_translations_attributes_0_value', with: 'Titre français'
|
32
32
|
fill_in 'Subtitle', with: 'Sous-titre français'
|
33
33
|
click_button 'Save changes'
|
@@ -35,14 +35,14 @@ describe 'Translation editing', type: :feature do
|
|
35
35
|
expect(page).to have_css '.flash_messages', text: 'The exhibit was successfully updated.'
|
36
36
|
within '.translation-basic-settings-title' do
|
37
37
|
expect(page).to have_css 'input[value="Titre français"]'
|
38
|
-
expect(page).to have_css '
|
38
|
+
expect(page).to have_css '.translation-complete'
|
39
39
|
end
|
40
40
|
within '.translation-basic-settings-subtitle' do
|
41
41
|
expect(page).to have_css 'input[value="Sous-titre français"]'
|
42
|
-
expect(page).to have_css '
|
42
|
+
expect(page).to have_css '.translation-complete'
|
43
43
|
end
|
44
44
|
within '.translation-basic-settings-description' do
|
45
|
-
expect(page).to_not have_css '
|
45
|
+
expect(page).to_not have_css '.translation-complete'
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -59,7 +59,7 @@ describe 'Translation editing', type: :feature do
|
|
59
59
|
|
60
60
|
it 'adds translations to exhibit navbar' do
|
61
61
|
within '.translation-edit-form #general' do
|
62
|
-
expect(page).to have_css '.
|
62
|
+
expect(page).to have_css '.form-text', text: 'Home'
|
63
63
|
fill_in 'Home', with: 'Maison'
|
64
64
|
fill_in 'Browse', with: 'parcourir ceci!'
|
65
65
|
click_button 'Save changes'
|
@@ -67,17 +67,17 @@ describe 'Translation editing', type: :feature do
|
|
67
67
|
expect(page).to have_css '.flash_messages', text: 'The exhibit was successfully updated.'
|
68
68
|
within '.translation-main-menu-home' do
|
69
69
|
expect(page).to have_css 'input[value="Maison"]'
|
70
|
-
expect(page).to have_css '
|
70
|
+
expect(page).to have_css '.translation-complete'
|
71
71
|
end
|
72
72
|
within '.translation-main-menu-browse' do
|
73
73
|
expect(page).to have_css 'input[value="parcourir ceci!"]'
|
74
|
-
expect(page).to have_css '
|
74
|
+
expect(page).to have_css '.translation-complete'
|
75
75
|
end
|
76
|
-
within '.translation-main-menu-
|
77
|
-
expect(page).to_not have_css '
|
76
|
+
within '.translation-main-menu-curated_features' do
|
77
|
+
expect(page).to_not have_css '.translation-complete'
|
78
78
|
end
|
79
79
|
within '.translation-main-menu-about' do
|
80
|
-
expect(page).to_not have_css '
|
80
|
+
expect(page).to_not have_css '.translation-complete'
|
81
81
|
end
|
82
82
|
I18n.locale = :fr
|
83
83
|
expect(exhibit.main_navigations.browse.label).to eq 'parcourir ceci!'
|
@@ -175,8 +175,8 @@ describe 'Translation editing', type: :feature do
|
|
175
175
|
click_button 'Save changes'
|
176
176
|
end
|
177
177
|
|
178
|
-
expect(page).to have_css '.nav-pills
|
179
|
-
expect(page).to have_css '.nav-tabs
|
178
|
+
expect(page).to have_css '.nav-pills .nav-link.active', text: 'French'
|
179
|
+
expect(page).to have_css '.nav-tabs .nav-link.active', text: 'Metadata field labels'
|
180
180
|
end
|
181
181
|
|
182
182
|
describe 'configured fields' do
|
@@ -252,8 +252,8 @@ describe 'Translation editing', type: :feature do
|
|
252
252
|
click_button 'Save changes'
|
253
253
|
end
|
254
254
|
|
255
|
-
expect(page).to have_css '.nav-pills
|
256
|
-
expect(page).to have_css '.nav-tabs
|
255
|
+
expect(page).to have_css '.nav-pills .nav-link.active', text: 'French'
|
256
|
+
expect(page).to have_css '.nav-tabs .nav-link.active', text: 'Search field labels'
|
257
257
|
end
|
258
258
|
|
259
259
|
describe 'field-based search fields' do
|
@@ -315,7 +315,7 @@ describe 'Translation editing', type: :feature do
|
|
315
315
|
|
316
316
|
visit spotlight.search_exhibit_catalog_path(exhibit, q: '*', locale: 'fr')
|
317
317
|
|
318
|
-
expect(page).to have_css('
|
318
|
+
expect(page).to have_css('#sort-dropdown', text: 'Trier par French Relevance', visible: true)
|
319
319
|
end
|
320
320
|
end
|
321
321
|
end
|
@@ -334,7 +334,7 @@ describe 'Translation editing', type: :feature do
|
|
334
334
|
|
335
335
|
expect(page).to have_field 'All Exhibit Items'
|
336
336
|
expect(page).to have_field 'Browse Category 1'
|
337
|
-
expect(page).to have_css('.
|
337
|
+
expect(page).to have_css('.form-text', text: 'All items in this exhibit.')
|
338
338
|
end
|
339
339
|
end
|
340
340
|
|
@@ -345,8 +345,8 @@ describe 'Translation editing', type: :feature do
|
|
345
345
|
click_button 'Save changes'
|
346
346
|
end
|
347
347
|
|
348
|
-
expect(page).to have_css '.nav-pills
|
349
|
-
expect(page).to have_css '.nav-tabs
|
348
|
+
expect(page).to have_css '.nav-pills .nav-link.active', text: 'French'
|
349
|
+
expect(page).to have_css '.nav-tabs .nav-link.active', text: 'Browse categories'
|
350
350
|
end
|
351
351
|
|
352
352
|
it 'persists changes', js: true do
|
@@ -355,7 +355,7 @@ describe 'Translation editing', type: :feature do
|
|
355
355
|
within('#browse', visible: true) do
|
356
356
|
fill_in 'All Exhibit Items', with: "Tous les objets d'exposition"
|
357
357
|
|
358
|
-
first('.
|
358
|
+
first('.translation-description-toggle').click
|
359
359
|
|
360
360
|
textarea = page.find('textarea')
|
361
361
|
textarea.set('Tous les articles de cette exposition.')
|
@@ -42,7 +42,7 @@ describe 'Feature page', type: :feature, versioning: true do
|
|
42
42
|
# the sidebar should display
|
43
43
|
within('#sidebar') do
|
44
44
|
# the current page should be the sidebar header
|
45
|
-
expect(page).to have_css('
|
45
|
+
expect(page).to have_css('li', text: parent_feature_page.title)
|
46
46
|
# within the sidebar navigation
|
47
47
|
within('ol.sidenav') do
|
48
48
|
# there should be a link to the child page
|
@@ -9,7 +9,7 @@ describe 'Home page', type: :feature, versioning: true do
|
|
9
9
|
visit spotlight.exhibit_dashboard_path(exhibit)
|
10
10
|
click_link 'Feature pages'
|
11
11
|
expect(page).to have_selector 'h3', text: 'Homepage'
|
12
|
-
expect(page).to have_selector 'h3.
|
12
|
+
expect(page).to have_selector 'h3.card-title', text: 'Exhibit Home'
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'allows users to edit the home page title' do
|
@@ -27,12 +27,12 @@ describe 'Home page', type: :feature, versioning: true do
|
|
27
27
|
end
|
28
28
|
click_link 'Feature pages'
|
29
29
|
expect(page).to have_content 'New Home Page Title'
|
30
|
-
expect(page).to have_selector '.
|
30
|
+
expect(page).to have_selector '.card-title a', text: 'New Home Page Title'
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'has working facet links' do
|
34
34
|
visit spotlight.exhibit_home_page_path(exhibit.home_page)
|
35
|
-
|
35
|
+
click_button 'Genre'
|
36
36
|
click_link 'map'
|
37
37
|
expect(page).to have_content exhibit.title
|
38
38
|
expect(page).to have_content 'You searched for: Genre map'
|
@@ -11,14 +11,19 @@ describe 'Search Result Block', type: :feature, js: true do
|
|
11
11
|
login_as exhibit_curator
|
12
12
|
|
13
13
|
exhibit.searches.each { |x| x.update published: true }
|
14
|
-
|
15
14
|
visit spotlight.edit_exhibit_feature_page_path(exhibit, feature_page)
|
16
15
|
add_widget 'search_results'
|
17
16
|
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
fill_in_typeahead_field
|
18
|
+
it 'allows a curator to select from existing browse categories' do
|
19
|
+
# Manually inject the inputs to the widget that the autocomplete would.
|
20
|
+
# fill_in_typeahead_field does not work here for us for some reason.
|
21
|
+
page.execute_script <<-JS
|
22
|
+
$("[data-twitter-typeahead]:visible").after(
|
23
|
+
"<input type='hidden' name='item[item_0][id]' value='all-exhibit-items' />" +
|
24
|
+
"<input type='hidden' name='item[item_0][display]' value='true' />"
|
25
|
+
);
|
26
|
+
JS
|
22
27
|
|
23
28
|
check 'Gallery'
|
24
29
|
check 'Slideshow'
|
@@ -29,7 +29,7 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
29
29
|
|
30
30
|
scenario 'it should allow you to add a solr document to the widget', js: true do
|
31
31
|
fill_in_solr_document_block_typeahead_field with: 'dq287tq6352'
|
32
|
-
within(:css, '.
|
32
|
+
within(:css, '.card') do
|
33
33
|
expect(page).to have_content "L'AMERIQUE"
|
34
34
|
end
|
35
35
|
|
@@ -37,8 +37,7 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
37
37
|
|
38
38
|
# verify that the item + image widget is displaying an image from the document.
|
39
39
|
within(:css, '.items-block', visible: true) do
|
40
|
-
expect(page).to have_css('.thumbnail')
|
41
|
-
expect(page).to have_css('.thumbnail a img')
|
40
|
+
expect(page).to have_css('.img-thumbnail')
|
42
41
|
expect(page).not_to have_css('.title')
|
43
42
|
end
|
44
43
|
end
|
@@ -66,7 +65,7 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
66
65
|
save_page
|
67
66
|
|
68
67
|
# The thumbnail on the rendered block should be correct
|
69
|
-
thumb = find('.thumbnail
|
68
|
+
thumb = find('.img-thumbnail')
|
70
69
|
expect(thumb['src']).to match(%r{xd327cm9378_05_0002/full})
|
71
70
|
|
72
71
|
# revisit the edit page
|
@@ -74,20 +73,20 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
74
73
|
|
75
74
|
# Expect the image on the rendered edit screen to be correct
|
76
75
|
expect(page).to have_css('[data-panel-image-pagination]', text: /Image 2 of 2/, visible: true)
|
77
|
-
thumb = find('.pic.thumbnail
|
76
|
+
thumb = find('.pic .img-thumbnail')
|
78
77
|
expect(thumb['src']).to match(%r{xd327cm9378_05_0002/full})
|
79
78
|
|
80
79
|
save_page
|
81
80
|
|
82
81
|
# Expect that the original image selection was retained
|
83
|
-
thumb = find('.thumbnail
|
82
|
+
thumb = find('.img-thumbnail')
|
84
83
|
expect(thumb['src']).to match(%r{xd327cm9378_05_0002/full})
|
85
84
|
end
|
86
85
|
|
87
86
|
scenario 'it should allow you toggle visibility of solr documents', js: true do
|
88
87
|
fill_in_solr_document_block_typeahead_field with: 'dq287tq6352'
|
89
88
|
|
90
|
-
within(:css, '.
|
89
|
+
within(:css, '.card') do
|
91
90
|
uncheck 'Display?'
|
92
91
|
end
|
93
92
|
|
@@ -104,6 +103,16 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
104
103
|
expect(page).to have_selector '.items-block .box', count: 1, visible: true
|
105
104
|
expect(page).to have_content '[World map]'
|
106
105
|
expect(page).not_to have_content "L'AMERIQUE"
|
106
|
+
|
107
|
+
visit spotlight.edit_exhibit_feature_page_path(exhibit, feature_page)
|
108
|
+
# display the title as the primary caption
|
109
|
+
within('.primary-caption') do
|
110
|
+
uncheck('Primary caption')
|
111
|
+
end
|
112
|
+
|
113
|
+
save_page
|
114
|
+
expect(page).to have_selector '.items-block .box', count: 1, visible: true
|
115
|
+
expect(page).not_to have_content '[World map]'
|
107
116
|
end
|
108
117
|
|
109
118
|
scenario 'should allow you to optionally display captions with the image', js: true do
|
@@ -124,8 +133,7 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
124
133
|
|
125
134
|
# verify that the item + image widget is displaying image and title from the requested document.
|
126
135
|
within(:css, '.items-block', visible: true) do
|
127
|
-
expect(page).to have_css('.thumbnail')
|
128
|
-
expect(page).to have_css('.thumbnail a img')
|
136
|
+
expect(page).to have_css('.img-thumbnail')
|
129
137
|
expect(page).to have_css('.primary-caption', text: '[World map]')
|
130
138
|
expect(page).to have_css('.secondary-caption', text: 'Latin')
|
131
139
|
end
|
@@ -168,9 +176,9 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
168
176
|
fill_in_solr_document_block_typeahead_field with: 'dq287tq6352'
|
169
177
|
|
170
178
|
# Select to align the text right
|
171
|
-
choose '
|
179
|
+
choose 'Left'
|
172
180
|
# this seems silly, but also seems to help with the flappy-ness of this spec
|
173
|
-
expect(find_field('
|
181
|
+
expect(find_field('Left', checked: true)).to be_checked
|
174
182
|
|
175
183
|
# fill in the content editable div
|
176
184
|
content_editable = find('.st-text-block')
|
@@ -180,18 +188,18 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
180
188
|
save_page
|
181
189
|
|
182
190
|
# verify that the item + image widget is displaying image and title from the requested document.
|
183
|
-
within(:css, '.items-block') do
|
191
|
+
within(:css, '.items-block.flex-row-reverse') do
|
184
192
|
within('.text-col') do
|
185
193
|
expect(page).to have_content 'zzz'
|
186
194
|
end
|
187
|
-
expect(page).to have_css('.items-col
|
195
|
+
expect(page).to have_css('.items-col')
|
188
196
|
end
|
189
197
|
end
|
190
198
|
|
191
199
|
scenario 'round-trip data', js: true do
|
192
200
|
fill_in_solr_document_block_typeahead_field with: 'dq287tq6352'
|
193
201
|
|
194
|
-
within(:css, '.
|
202
|
+
within(:css, '.card') do
|
195
203
|
uncheck 'Display?'
|
196
204
|
end
|
197
205
|
|
@@ -213,7 +221,7 @@ feature 'Solr Document Block', feature: true, versioning: true, default_max_wait
|
|
213
221
|
|
214
222
|
click_on 'Edit'
|
215
223
|
|
216
|
-
expect(page).to have_selector '.
|
224
|
+
expect(page).to have_selector '.card', count: 2, visible: true
|
217
225
|
|
218
226
|
# for some reason, the text area above isn't getting filled in
|
219
227
|
# expect(page).to have_selector ".st-text-block", text: "zzz"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe 'Solr Documents Carousel Block', type: :feature, js: true do
|
4
|
+
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
|
6
|
+
|
7
|
+
let!(:feature_page) { FactoryBot.create(:feature_page, exhibit: exhibit) }
|
8
|
+
|
9
|
+
before do
|
10
|
+
login_as exhibit_curator
|
11
|
+
|
12
|
+
visit spotlight.edit_exhibit_feature_page_path(exhibit, feature_page)
|
13
|
+
add_widget 'solr_documents_carousel'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'allows a curator to select a caption to display' do
|
17
|
+
fill_in_typeahead_field with: 'dq287tq6352'
|
18
|
+
|
19
|
+
check 'Primary caption'
|
20
|
+
select 'Title', from: 'primary-caption-field'
|
21
|
+
|
22
|
+
save_page
|
23
|
+
|
24
|
+
within '.carousel-block' do
|
25
|
+
expect(page).to have_css('.carousel-item', count: 1)
|
26
|
+
expect(page).to have_css('.carousel-caption .primary', text: "L'AMERIQUE")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -24,7 +24,7 @@ feature 'Uploaded Items Block', feature: true, js: true, versioning: true do
|
|
24
24
|
|
25
25
|
expect(page).to have_css('.dd-list li', count: 1)
|
26
26
|
within('.dd-list') do
|
27
|
-
expect(page).to have_css('.
|
27
|
+
expect(page).to have_css('.card-title', text: '800x600.png')
|
28
28
|
fill_in 'Caption', with: 'Some caption text'
|
29
29
|
end
|
30
30
|
|
@@ -32,7 +32,7 @@ feature 'Uploaded Items Block', feature: true, js: true, versioning: true do
|
|
32
32
|
|
33
33
|
expect(page).to have_css('.dd-list li', count: 2)
|
34
34
|
within('.dd-list') do
|
35
|
-
expect(page).to have_css('.
|
35
|
+
expect(page).to have_css('.card-title', text: 'avatar.png')
|
36
36
|
end
|
37
37
|
|
38
38
|
save_page
|