blacklight-spotlight 3.0.0.alpha.2 → 3.0.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -4
- data/app/assets/javascripts/spotlight/admin/appearance.js +3 -3
- data/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +18 -16
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +19 -20
- data/app/assets/javascripts/spotlight/admin/exhibits.js +6 -1
- data/app/assets/javascripts/spotlight/admin/multi_image_selector.js +1 -1
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +1 -1
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +1 -1
- data/app/assets/javascripts/spotlight/admin/spotlight_nestable.js +6 -1
- data/app/assets/javascripts/spotlight/admin/tabs.js +2 -2
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +1 -35
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +17 -10
- data/app/assets/stylesheets/spotlight/_browse.scss +11 -18
- data/app/assets/stylesheets/spotlight/_catalog.scss +13 -4
- data/app/assets/stylesheets/spotlight/_curation.scss +21 -14
- data/app/assets/stylesheets/spotlight/_exhibit_navbar.scss +10 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +4 -48
- data/app/assets/stylesheets/spotlight/_header.scss +3 -1
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +3 -3
- data/app/assets/stylesheets/spotlight/_multi_image_selector.scss +6 -7
- data/app/assets/stylesheets/spotlight/_nestable.scss +12 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +7 -19
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -0
- data/app/assets/stylesheets/spotlight/_translations.scss +5 -0
- data/app/controllers/concerns/spotlight/base.rb +2 -2
- data/app/controllers/concerns/spotlight/controller.rb +2 -2
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -0
- data/app/controllers/spotlight/about_pages_controller.rb +1 -1
- data/app/controllers/spotlight/appearances_controller.rb +9 -9
- data/app/controllers/spotlight/browse_controller.rb +1 -1
- data/app/controllers/spotlight/catalog_controller.rb +5 -9
- data/app/controllers/spotlight/concerns/application_controller.rb +3 -3
- data/app/controllers/spotlight/contacts_controller.rb +1 -1
- data/app/controllers/spotlight/custom_fields_controller.rb +1 -1
- data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
- data/app/controllers/spotlight/exhibits_controller.rb +4 -4
- data/app/controllers/spotlight/feature_pages_controller.rb +3 -5
- data/app/controllers/spotlight/filters_controller.rb +1 -3
- data/app/controllers/spotlight/home_pages_controller.rb +1 -1
- data/app/controllers/spotlight/metadata_configurations_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +7 -7
- data/app/controllers/spotlight/resources/upload_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/controllers/spotlight/roles_controller.rb +1 -1
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +12 -12
- data/app/controllers/spotlight/sites_controller.rb +5 -5
- data/app/controllers/spotlight/translations_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +3 -3
- data/app/helpers/spotlight/main_app_helpers.rb +6 -6
- data/app/helpers/spotlight/masthead_helper.rb +19 -0
- data/app/helpers/spotlight/search_configurations_helper.rb +9 -7
- data/app/helpers/spotlight/searches_helper.rb +1 -1
- data/app/jobs/spotlight/add_uploads_from_csv.rb +0 -1
- data/app/jobs/spotlight/reindex_job.rb +4 -4
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +1 -1
- data/app/models/concerns/spotlight/exhibit_analytics.rb +2 -2
- data/app/models/concerns/spotlight/solr_document.rb +5 -1
- data/app/models/concerns/spotlight/solr_document/uploaded_resource.rb +2 -2
- data/app/models/spotlight/ability.rb +2 -2
- data/app/models/spotlight/about_page.rb +1 -1
- data/app/models/spotlight/analytics/ga.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +20 -18
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/custom_field.rb +7 -7
- data/app/models/spotlight/exhibit.rb +11 -2
- data/app/models/spotlight/feature_page.rb +1 -1
- data/app/models/spotlight/featured_image.rb +1 -4
- data/app/models/spotlight/home_page.rb +1 -1
- data/app/models/spotlight/page.rb +2 -2
- data/app/models/spotlight/reindexing_log_entry.rb +3 -3
- data/app/models/spotlight/resource.rb +3 -5
- data/app/models/spotlight/resources/iiif_manifest.rb +1 -1
- data/app/models/spotlight/resources/upload.rb +0 -1
- data/app/models/spotlight/role.rb +1 -1
- data/app/models/spotlight/search.rb +3 -3
- data/app/serializers/spotlight/exhibit_export_serializer.rb +10 -10
- data/app/serializers/spotlight/featured_image_representer.rb +1 -1
- data/app/serializers/spotlight/main_navigation_representer.rb +1 -1
- data/app/serializers/spotlight/page_representer.rb +1 -1
- data/app/uploaders/spotlight/attachment_uploader.rb +0 -1
- data/app/views/catalog/_image_default.html.erb +3 -3
- data/app/views/catalog/_save_search.html.erb +2 -2
- data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
- data/app/views/shared/_breadcrumbs.html.erb +1 -1
- data/app/views/shared/_exhibit_navbar.html.erb +3 -3
- data/app/views/shared/_header_navbar.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +12 -15
- data/app/views/spotlight/about_pages/_contact.html.erb +12 -12
- data/app/views/spotlight/about_pages/_contact_properties.html.erb +16 -12
- data/app/views/spotlight/about_pages/_contacts.html.erb +1 -1
- data/app/views/spotlight/about_pages/_contacts_form.html.erb +2 -2
- data/app/views/spotlight/about_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/appearances/edit.html.erb +27 -31
- data/app/views/spotlight/browse/_search.html.erb +1 -1
- data/app/views/spotlight/browse/_search_box.html.erb +2 -2
- data/app/views/spotlight/browse/_sort_and_per_page.html.erb +1 -1
- data/app/views/spotlight/browse/index.html.erb +3 -2
- data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
- data/app/views/spotlight/contacts/_form.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +15 -6
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +15 -6
- data/app/views/spotlight/custom_search_fields/edit.html.erb +5 -5
- data/app/views/spotlight/custom_search_fields/new.html.erb +5 -5
- data/app/views/spotlight/dashboards/_analytics.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_solr_document_activity.html.erb +1 -1
- data/app/views/spotlight/exhibits/_contact.html.erb +1 -1
- data/app/views/spotlight/exhibits/_delete.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card_back.html.erb +21 -19
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +5 -3
- data/app/views/spotlight/exhibits/_exhibits.html.erb +3 -5
- data/app/views/spotlight/exhibits/_form.html.erb +3 -3
- data/app/views/spotlight/exhibits/_languages.html.erb +6 -4
- data/app/views/spotlight/feature_pages/_header.html.erb +5 -5
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/featured_images/_form.html.erb +2 -2
- data/app/views/spotlight/featured_images/_upload_form.html.erb +2 -2
- data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
- data/app/views/spotlight/pages/_order_pages.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +23 -23
- data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
- data/app/views/spotlight/resources/_external_resources_form.html.erb +10 -2
- data/app/views/spotlight/resources/new.html.erb +2 -2
- data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
- data/app/views/spotlight/roles/index.html.erb +2 -6
- data/app/views/spotlight/search_configurations/_default_per_page.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +22 -22
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +11 -15
- data/app/views/spotlight/search_configurations/_sort.html.erb +19 -19
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/searches/_search.html.erb +24 -24
- data/app/views/spotlight/searches/index.html.erb +1 -1
- data/app/views/spotlight/shared/_configuration_sidebar.html.erb +2 -1
- data/app/views/spotlight/shared/_curation_sidebar.html.erb +1 -1
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +6 -6
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +15 -7
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +7 -6
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +4 -4
- data/config/locales/spotlight.en.yml +13 -5
- data/config/locales/spotlight.es.yml +40 -0
- data/config/locales/spotlight.pt-BR.yml +25 -0
- data/config/routes.rb +14 -14
- data/lib/generators/spotlight/install_generator.rb +1 -1
- data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
- data/lib/generators/spotlight/templates/config/initializers/translation.rb +5 -5
- data/lib/spotlight/engine.rb +12 -11
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +2 -2
- data/spec/controllers/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +10 -0
- data/spec/controllers/spotlight/admin_users_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/appearances_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/attachments_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/browse_controller_spec.rb +5 -4
- data/spec/controllers/spotlight/catalog_controller_spec.rb +18 -4
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/contact_forms_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/contacts_controller_spec.rb +3 -0
- data/spec/controllers/spotlight/custom_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/exhibits_controller_spec.rb +4 -2
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +13 -1
- data/spec/controllers/spotlight/featured_images_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +5 -2
- data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/pages_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/resources/upload_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/resources_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/roles_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/searches_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/sites_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/tags_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/translations_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/versions_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +2 -1
- data/spec/examples.txt +1382 -50
- data/spec/factories/contact_emails.rb +1 -1
- data/spec/factories/contact_images.rb +1 -1
- data/spec/factories/contacts.rb +1 -1
- data/spec/factories/custom_fields.rb +1 -1
- data/spec/factories/custom_search_fields.rb +1 -1
- data/spec/factories/exhibit_thumbnails.rb +1 -1
- data/spec/factories/exhibits.rb +1 -1
- data/spec/factories/featured_images.rb +2 -2
- data/spec/factories/language.rb +1 -1
- data/spec/factories/main_navigation.rb +1 -1
- data/spec/factories/reindexing_log_entries.rb +6 -6
- data/spec/factories/resources.rb +2 -2
- data/spec/factories/roles.rb +1 -1
- data/spec/factories/searches.rb +2 -2
- data/spec/factories/tags.rb +2 -2
- data/spec/features/about_page_spec.rb +1 -0
- data/spec/features/add_contacts_spec.rb +2 -1
- data/spec/features/add_custom_field_metadata_spec.rb +3 -0
- data/spec/features/add_iiif_manifest_spec.rb +1 -0
- data/spec/features/add_items_spec.rb +1 -0
- data/spec/features/browse_category_admin_spec.rb +3 -1
- data/spec/features/browse_category_spec.rb +4 -1
- data/spec/features/catalog_spec.rb +1 -0
- data/spec/features/create_exhibit_spec.rb +1 -0
- data/spec/features/create_page_spec.rb +1 -0
- data/spec/features/edit_contact_spec.rb +1 -0
- data/spec/features/edit_search_fields_spec.rb +4 -3
- data/spec/features/exhibit_masthead_spec.rb +4 -4
- data/spec/features/exhibits/administration_spec.rb +11 -2
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +3 -2
- data/spec/features/exhibits/language_create_edit_spec.rb +1 -0
- data/spec/features/exhibits/translation_editing_spec.rb +5 -3
- data/spec/features/exhibits_index_spec.rb +2 -2
- data/spec/features/feature_page_spec.rb +6 -2
- data/spec/features/home_page_spec.rb +3 -1
- data/spec/features/import_exhibit_spec.rb +1 -0
- data/spec/features/item_admin_spec.rb +4 -2
- data/spec/features/javascript/about_page_admin_spec.rb +2 -1
- data/spec/features/javascript/block_controls_spec.rb +3 -2
- data/spec/features/javascript/blocks/rule_block_spec.rb +1 -0
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +11 -11
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +5 -7
- data/spec/features/javascript/edit_in_place_spec.rb +2 -1
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/features/javascript/home_page_edit_spec.rb +1 -1
- data/spec/features/javascript/metadata_admin_spec.rb +3 -1
- data/spec/features/javascript/multi_image_select_spec.rb +3 -2
- data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
- data/spec/features/javascript/roles_admin_spec.rb +1 -0
- data/spec/features/javascript/search_config_admin_spec.rb +3 -1
- data/spec/features/javascript/search_context_spec.rb +5 -4
- data/spec/features/main_navigation_spec.rb +46 -2
- data/spec/features/metadata_admin_spec.rb +1 -0
- data/spec/features/report_a_problem_spec.rb +1 -1
- data/spec/features/site_masthead_spec.rb +3 -3
- data/spec/features/slideshow_spec.rb +1 -1
- data/spec/helpers/spotlight/application_helper_spec.rb +10 -5
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -0
- data/spec/helpers/spotlight/languages_helper_spec.rb +2 -0
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +10 -6
- data/spec/helpers/spotlight/masthead_helper_spec.rb +51 -0
- data/spec/helpers/spotlight/meta_helper_spec.rb +1 -0
- data/spec/helpers/spotlight/navbar_helper_spec.rb +5 -3
- data/spec/helpers/spotlight/pages_helper_spec.rb +10 -3
- data/spec/helpers/spotlight/title_helper_spec.rb +1 -0
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +1 -0
- data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +2 -1
- data/spec/lib/migration/iiif_spec.rb +1 -1
- data/spec/lib/migration/page_language_spec.rb +1 -0
- data/spec/lib/spotlight/controller_spec.rb +4 -4
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +5 -2
- data/spec/models/solr_document_spec.rb +19 -10
- data/spec/models/spotlight/ability_spec.rb +3 -1
- data/spec/models/spotlight/about_page_spec.rb +6 -3
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +2 -1
- data/spec/models/spotlight/analytics/ga_spec.rb +1 -1
- data/spec/models/spotlight/blacklight_configuration_spec.rb +36 -31
- data/spec/models/spotlight/contact_email_spec.rb +4 -3
- data/spec/models/spotlight/contact_form_spec.rb +3 -2
- data/spec/models/spotlight/contact_spec.rb +4 -3
- data/spec/models/spotlight/custom_field_spec.rb +17 -8
- data/spec/models/spotlight/custom_search_field_spec.rb +2 -0
- data/spec/models/spotlight/custom_translation_extension_spec.rb +2 -1
- data/spec/models/spotlight/exhibit_spec.rb +34 -3
- data/spec/models/spotlight/feature_page_spec.rb +21 -9
- data/spec/models/spotlight/field_metadata_spec.rb +4 -4
- data/spec/models/spotlight/home_page_spec.rb +8 -4
- data/spec/models/spotlight/language_spec.rb +1 -0
- data/spec/models/spotlight/masthead_spec.rb +2 -1
- data/spec/models/spotlight/page_configurations_spec.rb +2 -1
- data/spec/models/spotlight/page_spec.rb +14 -8
- data/spec/models/spotlight/reindexing_log_entry_spec.rb +4 -4
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +5 -3
- data/spec/models/spotlight/resources/iiif_manifest_spec.rb +6 -2
- data/spec/models/spotlight/resources/iiif_service_spec.rb +4 -1
- data/spec/models/spotlight/resources/open_graph_spec.rb +3 -2
- data/spec/models/spotlight/resources/upload_spec.rb +7 -2
- data/spec/models/spotlight/role_spec.rb +5 -0
- data/spec/models/spotlight/search_spec.rb +4 -1
- data/spec/models/spotlight/sitemap_spec.rb +2 -2
- data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +2 -1
- data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +3 -1
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +8 -7
- data/spec/models/spotlight/user_spec.rb +1 -0
- data/spec/models/translation_spec.rb +3 -2
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +24 -23
- data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +2 -1
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +3 -2
- data/spec/services/spotlight/solr_document_builder_spec.rb +2 -1
- data/spec/spec_helper.rb +4 -4
- data/spec/support/features/test_features_helpers.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +1 -1
- data/spec/test_app_templates/catalog_controller.rb +1 -1
- data/spec/test_app_templates/spotlight_test.rake +1 -1
- data/spec/uploaders/spotlight/attachment_uploader_spec.rb +2 -1
- data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +2 -1
- data/spec/views/shared/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +5 -5
- data/spec/views/shared/_masthead.html.erb_spec.rb +4 -1
- data/spec/views/shared/_user_util_links.html.erb_spec.rb +9 -2
- data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +4 -1
- data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +3 -1
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +6 -5
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_exhibit_card_front.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/new.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +4 -3
- data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/resources/new.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +17 -3
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +8 -1
- data/spec/views/spotlight/tags/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/translations/_page.html.erb_spec.rb +1 -0
- metadata +158 -152
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
describe 'Search Configuration Administration', js: true do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
5
|
let(:user) { FactoryBot.create(:exhibit_admin, exhibit: exhibit) }
|
6
|
+
|
6
7
|
before { login_as user }
|
7
8
|
|
8
9
|
describe 'search fields', default_max_wait_time: 5 do
|
@@ -110,6 +111,7 @@ feature 'Search Configuration Administration', js: true do
|
|
110
111
|
expect(page).to have_checked_field '20'
|
111
112
|
expect(page).to have_unchecked_field '10'
|
112
113
|
end
|
114
|
+
|
113
115
|
it 'updates Sort field result options' do
|
114
116
|
visit spotlight.edit_exhibit_search_configuration_path(exhibit)
|
115
117
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
describe 'Search contexts' do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
5
|
let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
|
6
6
|
let(:feature_page) do
|
@@ -10,9 +10,10 @@ feature 'Search contexts' do
|
|
10
10
|
exhibit: exhibit
|
11
11
|
)
|
12
12
|
end
|
13
|
+
|
13
14
|
before { login_as exhibit_curator }
|
14
15
|
|
15
|
-
|
16
|
+
it 'adds context breadcrumbs back to the home page when navigating to an item from the home page', js: true do
|
16
17
|
exhibit.home_page.content = [
|
17
18
|
{
|
18
19
|
type: 'solr_documents',
|
@@ -41,7 +42,7 @@ feature 'Search contexts' do
|
|
41
42
|
expect(page).to have_selector '.breadcrumb a', text: 'Home'
|
42
43
|
end
|
43
44
|
|
44
|
-
|
45
|
+
it 'adds context breadcrumb back to the feature page when navigating to an item from a feature page', js: true do
|
45
46
|
feature_page.content = [
|
46
47
|
{
|
47
48
|
type: 'solr_documents',
|
@@ -74,7 +75,7 @@ feature 'Search contexts' do
|
|
74
75
|
context 'from a browse page' do
|
75
76
|
let!(:search) { FactoryBot.create(:search, title: 'Some Saved Search', exhibit: exhibit, published: true) }
|
76
77
|
|
77
|
-
|
78
|
+
it 'adds context breadcrumbs back to the browse page when navigating to an item', js: true do
|
78
79
|
visit spotlight.exhibit_home_page_path(exhibit, exhibit.home_page)
|
79
80
|
click_link 'Browse'
|
80
81
|
click_link 'Some Saved Search'
|
@@ -3,6 +3,7 @@
|
|
3
3
|
describe 'Main navigation labels are settable', type: :feature do
|
4
4
|
let!(:exhibit) { FactoryBot.create(:exhibit) }
|
5
5
|
let!(:about) { FactoryBot.create(:about_page, exhibit: exhibit, published: true) }
|
6
|
+
|
6
7
|
before do
|
7
8
|
about_nav = exhibit.main_navigations.about
|
8
9
|
about_nav.label = 'New About Label'
|
@@ -21,32 +22,75 @@ describe 'Main navigation labels are settable', type: :feature do
|
|
21
22
|
expect(page).to have_css('.navbar-nav li', text: 'New About Label')
|
22
23
|
expect(page).to have_css('.navbar-nav li', text: 'New Browse Label')
|
23
24
|
end
|
25
|
+
|
24
26
|
it 'has the configured about page label in the sidebar' do
|
25
27
|
visit spotlight.exhibit_about_page_path(exhibit, about)
|
26
|
-
expect(page).to have_css('#sidebar
|
28
|
+
expect(page).to have_css('#sidebar h2', text: 'New About Label')
|
27
29
|
end
|
30
|
+
|
28
31
|
it 'has the configured about page label visible in the breadcrumb' do
|
29
32
|
visit spotlight.exhibit_about_page_path(exhibit, about)
|
30
33
|
expect(page).to have_css('.breadcrumb li', text: 'New About Label')
|
31
34
|
end
|
35
|
+
|
32
36
|
it 'has the configured browse page label visible in the breadcrumb of the browse index page' do
|
33
37
|
visit spotlight.exhibit_browse_index_path(exhibit, exhibit.searches.first)
|
34
38
|
expect(page).to have_content('New Browse Label')
|
35
39
|
expect(page).to have_css('.breadcrumb li', text: 'New Browse Label')
|
36
40
|
end
|
41
|
+
|
37
42
|
it 'has the configured browse page label visible in the breadcrumb of the browse show page' do
|
38
43
|
visit spotlight.exhibit_browse_path(exhibit, exhibit.searches.first)
|
39
44
|
expect(page).to have_content('New Browse Label')
|
40
45
|
expect(page).to have_css('.breadcrumb li', text: 'New Browse Label')
|
41
46
|
end
|
47
|
+
|
42
48
|
it 'does not display any main navigation menu items that are configured to not display' do
|
43
49
|
about_nav = exhibit.main_navigations.about
|
44
50
|
about_nav.display = false
|
45
51
|
about_nav.save
|
46
52
|
visit spotlight.exhibit_path(exhibit)
|
47
|
-
expect(page).
|
53
|
+
expect(page).not_to have_css('.navbar-nav li', text: 'New About Label')
|
48
54
|
about_nav = exhibit.main_navigations.about
|
49
55
|
about_nav.display = true
|
50
56
|
about_nav.save
|
51
57
|
end
|
58
|
+
|
59
|
+
describe 'Restore default button functionality', js: true do
|
60
|
+
let(:user) { FactoryBot.create(:exhibit_admin, exhibit: exhibit) }
|
61
|
+
|
62
|
+
before { login_as user }
|
63
|
+
|
64
|
+
it 'is present when the navigation label is not the default value' do
|
65
|
+
visit spotlight.edit_exhibit_appearance_path(exhibit)
|
66
|
+
|
67
|
+
click_link 'Main menu'
|
68
|
+
|
69
|
+
within '.main_navigation_admin' do
|
70
|
+
within all('li').first do
|
71
|
+
expect(page).not_to have_css('button.restore-default', visible: true)
|
72
|
+
end
|
73
|
+
|
74
|
+
within all('li').last do
|
75
|
+
expect(page).to have_css('button.restore-default', visible: true)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
context 'when the navigation label is not the default value' do
|
81
|
+
it 'restores the default value' do
|
82
|
+
visit spotlight.edit_exhibit_appearance_path(exhibit)
|
83
|
+
|
84
|
+
click_link 'Main menu'
|
85
|
+
|
86
|
+
within '.main_navigation_admin' do
|
87
|
+
within all('li').last do
|
88
|
+
expect(page).to have_css('a', text: 'New About Label')
|
89
|
+
click_button 'Restore default'
|
90
|
+
expect(page).to have_css('a', text: 'About')
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
52
96
|
end
|
@@ -56,7 +56,7 @@ describe 'Add and update the site masthead', type: :feature do
|
|
56
56
|
it 'displays a masthead image when one is uploaded and configured' do
|
57
57
|
visit spotlight.edit_site_path
|
58
58
|
|
59
|
-
expect(page).
|
59
|
+
expect(page).not_to have_css('.image-masthead')
|
60
60
|
|
61
61
|
click_link 'Site masthead'
|
62
62
|
|
@@ -76,7 +76,7 @@ describe 'Add and update the site masthead', type: :feature do
|
|
76
76
|
it 'does not display an uploaded masthead if configured to not display' do
|
77
77
|
visit spotlight.edit_site_path
|
78
78
|
|
79
|
-
expect(page).
|
79
|
+
expect(page).not_to have_css('.image-masthead')
|
80
80
|
|
81
81
|
click_link 'Site masthead'
|
82
82
|
|
@@ -86,6 +86,6 @@ describe 'Add and update the site masthead', type: :feature do
|
|
86
86
|
|
87
87
|
click_button 'Save changes'
|
88
88
|
expect(page).to have_content('The site was successfully updated.')
|
89
|
-
expect(page).
|
89
|
+
expect(page).not_to have_css('.image-masthead .background-container')
|
90
90
|
end
|
91
91
|
end
|
@@ -6,7 +6,7 @@ describe 'Slideshow', type: :feature, js: true do
|
|
6
6
|
|
7
7
|
before do
|
8
8
|
login_as user
|
9
|
-
exhibit.blacklight_configuration.update(document_index_view_types: %w
|
9
|
+
exhibit.blacklight_configuration.update(document_index_view_types: %w[list gallery slideshow])
|
10
10
|
end
|
11
11
|
|
12
12
|
it 'has slideshow' do
|
@@ -3,6 +3,7 @@
|
|
3
3
|
describe Spotlight::ApplicationHelper, type: :helper do
|
4
4
|
describe '#application_name' do
|
5
5
|
let(:site) { Spotlight::Site.instance }
|
6
|
+
|
6
7
|
before do
|
7
8
|
allow(helper).to receive(:current_site).and_return(site)
|
8
9
|
end
|
@@ -31,6 +32,7 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
31
32
|
|
32
33
|
describe '#site_title' do
|
33
34
|
let(:site) { Spotlight::Site.instance }
|
35
|
+
|
34
36
|
before do
|
35
37
|
allow(helper).to receive(:current_site).and_return(site)
|
36
38
|
end
|
@@ -77,13 +79,13 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
77
79
|
end
|
78
80
|
|
79
81
|
it "returns keys with a value of 'on'" do
|
80
|
-
expect(helper.selected_search_block_views(block)).to eq %w
|
82
|
+
expect(helper.selected_search_block_views(block)).to eq %w[a d]
|
81
83
|
end
|
82
84
|
end
|
83
85
|
|
84
86
|
describe 'blacklight_view_config_for_search_block' do
|
85
87
|
let(:sir_trevor_block) do
|
86
|
-
SirTrevorRails::Block.new({ type: 'xyz', data: { view: %w
|
88
|
+
SirTrevorRails::Block.new({ type: 'xyz', data: { view: %w[list gallery] } }, 'parent')
|
87
89
|
end
|
88
90
|
|
89
91
|
let(:config) do
|
@@ -93,13 +95,14 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
93
95
|
config.view.slideshow = {}
|
94
96
|
end
|
95
97
|
end
|
98
|
+
|
96
99
|
before do
|
97
100
|
allow(helper).to receive_messages(blacklight_config: config)
|
98
101
|
end
|
99
102
|
|
100
103
|
it 'returns a blacklight configuration object that has reduced the views to those that are configured in the block' do
|
101
104
|
new_config = helper.blacklight_view_config_for_search_block(sir_trevor_block)
|
102
|
-
expect(new_config.keys).to eq [
|
105
|
+
expect(new_config.keys).to eq %i[list gallery]
|
103
106
|
end
|
104
107
|
end
|
105
108
|
end
|
@@ -107,6 +110,7 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
107
110
|
describe 'render_document_class' do
|
108
111
|
let(:current_exhibit) { FactoryBot.create(:exhibit) }
|
109
112
|
let(:document) { SolrDocument.new(some_field: 'Some data') }
|
113
|
+
|
110
114
|
before do
|
111
115
|
allow(helper).to receive_messages(current_exhibit: current_exhibit)
|
112
116
|
allow(helper).to receive_messages(blacklight_config: Blacklight::Configuration.new do |config|
|
@@ -119,6 +123,7 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
119
123
|
allow(document).to receive(:private?).with(current_exhibit).and_return(true)
|
120
124
|
expect(helper.render_document_class(document)).to include 'blacklight-private'
|
121
125
|
end
|
126
|
+
|
122
127
|
it 'prefixs "blacklight-" to the configured type' do
|
123
128
|
expect(helper.render_document_class(document)).to include 'blacklight-some-data'
|
124
129
|
end
|
@@ -155,13 +160,13 @@ describe Spotlight::ApplicationHelper, type: :helper do
|
|
155
160
|
blacklight_config.view.b.if = false
|
156
161
|
|
157
162
|
expect(helper.available_view_fields).to include :a
|
158
|
-
expect(helper.available_view_fields).
|
163
|
+
expect(helper.available_view_fields).not_to include :b
|
159
164
|
end
|
160
165
|
end
|
161
166
|
|
162
167
|
describe '#block_document_index_view_type' do
|
163
168
|
let(:blacklight_config) { Blacklight::Configuration.new }
|
164
|
-
let(:block) { double(view: %w
|
169
|
+
let(:block) { double(view: %w[b c]) }
|
165
170
|
let(:block_with_bad_or_missing_data) { double(view: []) }
|
166
171
|
|
167
172
|
before do
|
@@ -3,6 +3,7 @@
|
|
3
3
|
describe Spotlight::CrudLinkHelpers, type: :helper do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
5
|
let(:some_model) { Spotlight::FeaturePage.create! exhibit: exhibit }
|
6
|
+
|
6
7
|
describe '#cancel_link' do
|
7
8
|
it 'is a model-specific cancel link' do
|
8
9
|
expect(helper).to receive(:action_default_value).with(:my_model, :cancel).and_return 'Cancel'
|
@@ -31,6 +32,7 @@ describe Spotlight::CrudLinkHelpers, type: :helper do
|
|
31
32
|
|
32
33
|
describe '#exhibit_create_link' do
|
33
34
|
let(:some_model) { Spotlight::FeaturePage.new }
|
35
|
+
|
34
36
|
before do
|
35
37
|
allow(helper).to receive_messages(current_exhibit: exhibit)
|
36
38
|
allow(helper).to receive_messages action_default_value: 'Create'
|
@@ -52,6 +54,7 @@ describe Spotlight::CrudLinkHelpers, type: :helper do
|
|
52
54
|
|
53
55
|
describe '#exhibit_edit_link' do
|
54
56
|
let(:some_model) { Spotlight::FeaturePage.create! exhibit: exhibit }
|
57
|
+
|
55
58
|
before do
|
56
59
|
allow(helper).to receive_messages(current_exhibit: exhibit)
|
57
60
|
allow(helper).to receive_messages action_default_value: 'Edit'
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
describe Spotlight::LanguagesHelper, type: :helper do
|
4
4
|
let(:current_exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
|
5
6
|
describe '#add_exhibit_language_dropdown_options' do
|
6
7
|
it 'returns a sorted Array of locales and their names' do
|
7
8
|
allow(helper).to receive_messages(current_exhibit: current_exhibit)
|
@@ -61,6 +62,7 @@ describe Spotlight::LanguagesHelper, type: :helper do
|
|
61
62
|
it do
|
62
63
|
expect(helper.default_language?).to eq true
|
63
64
|
end
|
65
|
+
|
64
66
|
it do
|
65
67
|
expect(helper).to receive_messages(params: { locale: :en })
|
66
68
|
expect(helper.default_language?).to eq true
|
@@ -3,8 +3,10 @@
|
|
3
3
|
describe Spotlight::MainAppHelpers, type: :helper do
|
4
4
|
describe '#show_contact_form?' do
|
5
5
|
subject { helper }
|
6
|
+
|
6
7
|
let(:exhibit) { FactoryBot.create :exhibit }
|
7
8
|
let(:exhibit_with_contacts) { FactoryBot.create :exhibit }
|
9
|
+
|
8
10
|
context 'with an exhibit with confirmed contacts' do
|
9
11
|
before do
|
10
12
|
exhibit_with_contacts.contact_emails.create(email: 'cabeer@stanford.edu').tap do |e|
|
@@ -18,7 +20,7 @@ describe Spotlight::MainAppHelpers, type: :helper do
|
|
18
20
|
|
19
21
|
before { allow(helper).to receive_messages current_exhibit: exhibit_with_contacts }
|
20
22
|
|
21
|
-
its(:show_contact_form?) {
|
23
|
+
its(:show_contact_form?) { is_expected.to be_truthy }
|
22
24
|
end
|
23
25
|
|
24
26
|
context 'with an exhibit with only unconfirmed contacts' do
|
@@ -26,19 +28,19 @@ describe Spotlight::MainAppHelpers, type: :helper do
|
|
26
28
|
|
27
29
|
before { allow(helper).to receive_messages current_exhibit: exhibit_with_contacts }
|
28
30
|
|
29
|
-
its(:show_contact_form?) {
|
31
|
+
its(:show_contact_form?) { is_expected.to be_falsey }
|
30
32
|
end
|
31
33
|
|
32
34
|
context 'with an exhibit without contacts' do
|
33
35
|
before { allow(helper).to receive_messages current_exhibit: exhibit }
|
34
36
|
|
35
|
-
its(:show_contact_form?) {
|
37
|
+
its(:show_contact_form?) { is_expected.to be_falsey }
|
36
38
|
end
|
37
39
|
|
38
40
|
context 'outside the context of an exhibit' do
|
39
41
|
before { allow(helper).to receive_messages current_exhibit: nil }
|
40
42
|
|
41
|
-
its(:show_contact_form?) {
|
43
|
+
its(:show_contact_form?) { is_expected.to be_falsey }
|
42
44
|
end
|
43
45
|
|
44
46
|
context 'with a default contact address' do
|
@@ -46,18 +48,20 @@ describe Spotlight::MainAppHelpers, type: :helper do
|
|
46
48
|
|
47
49
|
before { allow(helper).to receive_messages current_exhibit: exhibit }
|
48
50
|
|
49
|
-
its(:show_contact_form?) {
|
51
|
+
its(:show_contact_form?) { is_expected.to be_truthy }
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
53
55
|
describe '#exhibit_stylesheet_link_tag' do
|
54
56
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
57
|
+
|
55
58
|
before do
|
56
59
|
allow(helper).to receive_messages(current_exhibit: exhibit)
|
57
60
|
end
|
58
61
|
|
59
62
|
context 'without an exhibit context' do
|
60
63
|
let(:exhibit) { nil }
|
64
|
+
|
61
65
|
it 'uses the standard stylesheet' do
|
62
66
|
expect(helper.exhibit_stylesheet_link_tag('application')).to eq helper.stylesheet_link_tag('application')
|
63
67
|
end
|
@@ -85,7 +89,7 @@ describe Spotlight::MainAppHelpers, type: :helper do
|
|
85
89
|
|
86
90
|
context 'for a themed exhibit' do
|
87
91
|
before do
|
88
|
-
allow(Spotlight::Engine.config).to receive(:exhibit_themes).and_return(%w
|
92
|
+
allow(Spotlight::Engine.config).to receive(:exhibit_themes).and_return(%w[default modern])
|
89
93
|
exhibit.update(theme: 'modern')
|
90
94
|
end
|
91
95
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe Spotlight::MastheadHelper, type: :helper do
|
4
|
+
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
let(:site) { Spotlight::Site.instance }
|
6
|
+
|
7
|
+
before do
|
8
|
+
allow(helper).to receive(:current_exhibit).and_return(nil)
|
9
|
+
allow(helper).to receive(:current_site).and_return(site)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#masthead_heading_content' do
|
13
|
+
context 'when there is a current exhibit' do
|
14
|
+
before { allow(helper).to receive(:current_exhibit).and_return(exhibit) }
|
15
|
+
|
16
|
+
it { expect(helper.masthead_heading_content).to eq exhibit.title }
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'when there is no current exhibit' do
|
20
|
+
it { expect(helper.masthead_heading_content).to eq 'Blacklight' } # the application_name
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#masthead_subheading_content' do
|
25
|
+
context 'when there is a current exhibit' do
|
26
|
+
before { allow(helper).to receive(:current_exhibit).and_return(exhibit) }
|
27
|
+
|
28
|
+
context 'when the exhibit has a subtitle' do
|
29
|
+
before { exhibit.subtitle = 'MastheadHelper Spec Exhibit' }
|
30
|
+
|
31
|
+
it { expect(helper.masthead_subheading_content).to eq 'MastheadHelper Spec Exhibit' }
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when the exhibit does not have a subtitle' do
|
35
|
+
it { expect(helper.masthead_subheading_content).to be_nil }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when there is no current exhibit' do
|
40
|
+
context 'when the site has a subtitle' do
|
41
|
+
before { site.subtitle = "The site's subtitle" }
|
42
|
+
|
43
|
+
it { expect(helper.masthead_subheading_content).to eq "The site's subtitle" }
|
44
|
+
end
|
45
|
+
|
46
|
+
context 'when the site does not have a subtitle' do
|
47
|
+
it { expect(helper.masthead_subheading_content).to be_nil }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
describe Spotlight::MetaHelper, type: :helper do
|
4
4
|
describe '#add_exhibit_meta_content' do
|
5
5
|
let(:current_exhibit) { FactoryBot.create(:exhibit) }
|
6
|
+
|
6
7
|
before do
|
7
8
|
allow(helper).to receive_messages(current_exhibit: current_exhibit)
|
8
9
|
allow(helper).to receive(:site_title).and_return('some title')
|