hydra-head 4.1.3 → 5.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- metadata +28 -617
- data/.gitignore +0 -73
- data/.gitmodules +0 -4
- data/Gemfile +0 -14
- data/HISTORY.textile +0 -99
- data/INSTALL_PREREQ.textile +0 -3
- data/LICENSE +0 -14
- data/README.textile +0 -129
- data/Rakefile +0 -5
- data/app/assets/images/hydra/powered_by_hydra.png +0 -0
- data/app/assets/images/hydra/search-button.png +0 -0
- data/app/assets/javascripts/date-picker/booking/index.html +0 -368
- data/app/assets/javascripts/date-picker/calendarHTML.txt +0 -84
- data/app/assets/javascripts/date-picker/css/datepicker.css +0 -511
- data/app/assets/javascripts/date-picker/css/demo.css +0 -229
- data/app/assets/javascripts/date-picker/index.html +0 -798
- data/app/assets/javascripts/date-picker/js/datepicker.js +0 -2898
- data/app/assets/javascripts/date-picker/js/datepicker.packed.js +0 -1
- data/app/assets/javascripts/date-picker/js/lang/ar.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/cs.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/da.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/de.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/en.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/eo.js +0 -13
- data/app/assets/javascripts/date-picker/js/lang/es.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/et.js +0 -23
- data/app/assets/javascripts/date-picker/js/lang/fi.js +0 -7
- data/app/assets/javascripts/date-picker/js/lang/fr.js +0 -69
- data/app/assets/javascripts/date-picker/js/lang/he.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/hu.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/id.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/it.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/kr.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/lt.js +0 -8
- data/app/assets/javascripts/date-picker/js/lang/lv.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/nl.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/no.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/pl.js +0 -10
- data/app/assets/javascripts/date-picker/js/lang/pt-br.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/pt.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/ru.js +0 -11
- data/app/assets/javascripts/date-picker/js/lang/se.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/si.js +0 -9
- data/app/assets/javascripts/date-picker/js/lang/tr.js +0 -9
- data/app/assets/javascripts/date-picker/language/index.html +0 -240
- data/app/assets/javascripts/date-picker/media/Thumbs.db +0 -0
- data/app/assets/javascripts/date-picker/media/backstripes.gif +0 -0
- data/app/assets/javascripts/date-picker/media/bg_header.jpg +0 -0
- data/app/assets/javascripts/date-picker/media/bullet1.gif +0 -0
- data/app/assets/javascripts/date-picker/media/bullet2.gif +0 -0
- data/app/assets/javascripts/date-picker/media/cal-grey.gif +0 -0
- data/app/assets/javascripts/date-picker/media/cal.gif +0 -0
- data/app/assets/javascripts/date-picker/media/gradient-e5e5e5-ffffff.gif +0 -0
- data/app/assets/javascripts/hydra/hydra-head.js +0 -195
- data/app/assets/javascripts/hydra/mediashelf.datepicker.js +0 -39
- data/app/assets/javascripts/hydra/mediashelf.placeholder.js +0 -67
- data/app/assets/javascripts/jquery.form.js +0 -1076
- data/app/assets/javascripts/jquery.ui.datepicker.js +0 -1793
- data/app/assets/javascripts/spin.min.js +0 -2
- data/app/assets/stylesheets/hydra/html_refactor.css +0 -79
- data/app/assets/stylesheets/hydra/hydrangea-split-button.css +0 -18
- data/app/assets/stylesheets/hydra/hydrangea.css +0 -288
- data/app/assets/stylesheets/hydra/ie-styles.css +0 -149
- data/app/assets/stylesheets/hydra/styles.css +0 -946
- data/app/assets/stylesheets/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_217bc0_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_469bdd_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/app/assets/stylesheets/redmond/jquery-ui-1.8.5.custom.css +0 -572
- data/app/controllers/downloads_controller.rb +0 -20
- data/app/controllers/hydra/application_controller.rb +0 -5
- data/app/controllers/hydra/assets_controller.rb +0 -12
- data/app/controllers/hydra/contributors_controller.rb +0 -115
- data/app/controllers/hydra/file_assets_controller.rb +0 -3
- data/app/controllers/hydra/permissions_controller.rb +0 -117
- data/app/controllers/user_sessions_controller.rb +0 -13
- data/app/helpers/application_helper.rb +0 -3
- data/app/helpers/article_metadata_helper.rb +0 -4
- data/app/helpers/blacklight_helper.rb +0 -4
- data/app/helpers/downloads_helper.rb +0 -4
- data/app/helpers/facets_helper.rb +0 -4
- data/app/helpers/generic_content_objects_helper.rb +0 -4
- data/app/helpers/hydra/application_helper_behavior.rb +0 -8
- data/app/helpers/hydra/article_metadata_helper_behavior.rb +0 -95
- data/app/helpers/hydra/blacklight_helper_behavior.rb +0 -128
- data/app/helpers/hydra/downloads_helper_behavior.rb +0 -24
- data/app/helpers/hydra/facets_helper_behavior.rb +0 -34
- data/app/helpers/hydra/generic_content_objects_helper_behavior.rb +0 -17
- data/app/helpers/hydra/hydra_assets_helper_behavior.rb +0 -76
- data/app/helpers/hydra/hydra_fedora_metadata_helper_behavior.rb +0 -379
- data/app/helpers/hydra/hydra_helper_behavior.rb +0 -195
- data/app/helpers/hydra/hydra_uploader_helper_behavior.rb +0 -23
- data/app/helpers/hydra/inline_editable_metadata_helper_behavior.rb +0 -21
- data/app/helpers/hydra/javascript_includes_helper_behavior.rb +0 -94
- data/app/helpers/hydra/personalization_helper_behavior.rb +0 -49
- data/app/helpers/hydra/release_process_helper_behavior.rb +0 -37
- data/app/helpers/hydra_assets_helper.rb +0 -4
- data/app/helpers/hydra_fedora_metadata_helper.rb +0 -4
- data/app/helpers/hydra_helper.rb +0 -4
- data/app/helpers/hydra_uploader_helper.rb +0 -4
- data/app/helpers/inline_editable_metadata_helper.rb +0 -4
- data/app/helpers/javascript_includes_helper.rb +0 -4
- data/app/helpers/personalization_helper.rb +0 -4
- data/app/helpers/release_process_helper.rb +0 -4
- data/app/models/file_asset.rb +0 -5
- data/app/models/generic_content.rb +0 -26
- data/app/models/generic_image.rb +0 -67
- data/app/models/hydra/datastream/properties.rb +0 -24
- data/app/models/mods_asset.rb +0 -24
- data/app/models/superuser.rb +0 -14
- data/app/models/user_attribute.rb +0 -37
- data/app/models/uses_default_partials.rb +0 -23
- data/app/views/_add_assets_links.html.erb +0 -14
- data/app/views/_flash_msg.html.erb +0 -5
- data/app/views/_user_util_links.html.erb +0 -31
- data/app/views/catalog/_citation.html.erb +0 -11
- data/app/views/catalog/_constraints_element.html.erb +0 -34
- data/app/views/catalog/_delete_partials/_default.html.erb +0 -22
- data/app/views/catalog/_document_list.html.erb +0 -11
- data/app/views/catalog/_edit_partials/_default.html.erb +0 -57
- data/app/views/catalog/_edit_partials/_default_details.html.erb +0 -13
- data/app/views/catalog/_facets.html.erb +0 -37
- data/app/views/catalog/_home.html.erb +0 -6
- data/app/views/catalog/_home_text.html.erb +0 -4
- data/app/views/catalog/_index_partials/_default.html.erb +0 -20
- data/app/views/catalog/_index_partials/_default_details.html.erb +0 -14
- data/app/views/catalog/_index_partials/_default_group.html.erb +0 -15
- data/app/views/catalog/_opensearch_response_metadata.html.erb +0 -2
- data/app/views/catalog/_show_partials/_default.html.erb +0 -21
- data/app/views/catalog/_show_partials/_default_details.html.erb +0 -15
- data/app/views/catalog/_show_partials/_facets.html.erb +0 -52
- data/app/views/catalog/_sms_form.html.erb +0 -21
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -23
- data/app/views/catalog/_uva_tabs.html.erb +0 -10
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/show.html.erb +0 -40
- data/app/views/contributors/_add_contributor_split_button.html.erb +0 -10
- data/app/views/contributors/_edit_conference.html.erb +0 -29
- data/app/views/contributors/_edit_organization.html.erb +0 -29
- data/app/views/contributors/_edit_person.html.erb +0 -39
- data/app/views/contributors/_index.html.erb +0 -11
- data/app/views/contributors/_new.html.erb +0 -10
- data/app/views/contributors/_show_conference.html.erb +0 -12
- data/app/views/contributors/_show_organization.html.erb +0 -21
- data/app/views/contributors/_show_person.html.erb +0 -17
- data/app/views/contributors/new.html.erb +0 -14
- data/app/views/downloads/index.html.erb +0 -1
- data/app/views/generic_content_objects/_contributor_form.html.erb +0 -11
- data/app/views/generic_content_objects/_description_form.html.erb +0 -7
- data/app/views/generic_content_objects/_edit_description.html.erb +0 -23
- data/app/views/generic_content_objects/_new.html.erb +0 -0
- data/app/views/generic_content_objects/_show_description.html.erb +0 -41
- data/app/views/generic_contents/_edit.html.erb +0 -10
- data/app/views/generic_contents/_index.html.erb +0 -21
- data/app/views/generic_contents/_show.html.erb +0 -6
- data/app/views/generic_contents/_show_content.html.erb +0 -7
- data/app/views/generic_images/_edit.html.erb +0 -36
- data/app/views/generic_images/_index.html.erb +0 -24
- data/app/views/generic_images/_show.html.erb +0 -13
- data/app/views/generic_images/_show_all.html.erb +0 -14
- data/app/views/generic_images/_show_content.html.erb +0 -7
- data/app/views/hydra/file_assets/_asset_saved_flash.html.erb +0 -2
- data/app/views/hydra/file_assets/_deletable_result.html.erb +0 -5
- data/app/views/hydra/file_assets/_file_assets_form.html.erb +0 -11
- data/app/views/hydra/file_assets/_index.html.erb +0 -29
- data/app/views/hydra/file_assets/_new.html.erb +0 -6
- data/app/views/hydra/file_assets/_result.html.erb +0 -11
- data/app/views/hydra/file_assets/index.html.erb +0 -5
- data/app/views/hydra/permissions/_edit_person_permissions.html.erb +0 -30
- data/app/views/hydra/permissions/_index.html.erb +0 -46
- data/app/views/hydra/permissions/_new.html.erb +0 -14
- data/app/views/hydra/permissions/_permissions_form.html.erb +0 -23
- data/app/views/hydra/permissions/index.html.erb +0 -1
- data/app/views/hydra/permissions/new.html.erb +0 -1
- data/app/views/layouts/hydra-head.html.erb +0 -47
- data/app/views/mods_assets/_additional_info_form.html.erb +0 -44
- data/app/views/mods_assets/_contributor_form.html.erb +0 -14
- data/app/views/mods_assets/_edit.html.erb +0 -10
- data/app/views/mods_assets/_edit_description.html.erb +0 -73
- data/app/views/mods_assets/_edit_journal.html.erb +0 -57
- data/app/views/mods_assets/_index.html.erb +0 -1
- data/app/views/mods_assets/_index_list.html.erb +0 -37
- data/app/views/mods_assets/_index_table.html.erb +0 -7
- data/app/views/mods_assets/_progress_box.html.erb +0 -82
- data/app/views/mods_assets/_publication_form.html.erb +0 -13
- data/app/views/mods_assets/_show.html.erb +0 -39
- data/app/views/mods_assets/_show_additional_info.html.erb +0 -17
- data/app/views/mods_assets/_show_contributors.html.erb +0 -7
- data/app/views/mods_assets/_show_description.html.erb +0 -35
- data/app/views/mods_assets/_show_file_assets.html.erb +0 -22
- data/app/views/mods_assets/_show_journal.html.erb +0 -42
- data/app/views/mods_assets/_show_permissions.html.erb +0 -15
- data/app/views/mods_assets/_show_publication.html.erb +0 -8
- data/app/views/shared/_delete_asset_confirmation.html.erb +0 -17
- data/app/views/user_sessions/_login_form.html.erb +0 -10
- data/app/views/user_sessions/logged_out.html.erb +0 -1
- data/config/fedora.yml +0 -15
- data/config/jetty.yml +0 -6
- data/config/locales/hydra.en.yml +0 -7
- data/config/role_map_cucumber.yml +0 -10
- data/config/role_map_development.yml +0 -12
- data/config/role_map_production.yml +0 -2
- data/config/role_map_test.yml +0 -14
- data/config/routes.rb +0 -12
- data/config/solr.yml +0 -9
- data/config/solr_mappings.yml +0 -22
- data/db/migrate/20101105214243_add_user_attributes_table.rb +0 -15
- data/db/migrate/20101108192527_create_superusers.rb +0 -12
- data/fedora_conf/conf/development/fedora.fcfg +0 -1021
- data/fedora_conf/conf/test/fedora.fcfg +0 -1021
- data/hydra-head.gemspec +0 -41
- data/init.rb +0 -4
- data/install.rb +0 -1
- data/lib/application_helper.rb +0 -3
- data/lib/generators/hydra/assets_generator.rb +0 -50
- data/lib/generators/hydra/cucumber_support_generator.rb +0 -29
- data/lib/generators/hydra/head_generator.rb +0 -165
- data/lib/generators/hydra/hyhead_fixtures_generator.rb +0 -27
- data/lib/generators/hydra/templates/catalog_controller.rb +0 -162
- data/lib/generators/hydra/templates/config/fedora.yml +0 -14
- data/lib/generators/hydra/templates/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
- data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +0 -44
- data/lib/generators/hydra/templates/config/role_map_cucumber.yml +0 -10
- data/lib/generators/hydra/templates/config/role_map_development.yml +0 -12
- data/lib/generators/hydra/templates/config/role_map_production.yml +0 -2
- data/lib/generators/hydra/templates/config/role_map_test.yml +0 -15
- data/lib/generators/hydra/templates/config/solr.yml +0 -10
- data/lib/generators/hydra/templates/config/solr_mappings.yml +0 -22
- data/lib/generators/hydra/templates/fedora_conf/conf/development/fedora.fcfg +0 -1021
- data/lib/generators/hydra/templates/fedora_conf/conf/test/fedora.fcfg +0 -1021
- data/lib/generators/hydra/templates/migrations/create_superusers.rb +0 -12
- data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +0 -124
- data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +0 -394
- data/lib/generators/hydra/templates/solr_conf/solr.xml +0 -35
- data/lib/hydra-head.rb +0 -29
- data/lib/hydra-head/controller.rb +0 -29
- data/lib/hydra-head/engine.rb +0 -29
- data/lib/hydra-head/routes.rb +0 -90
- data/lib/hydra-head/version.rb +0 -4
- data/lib/hydra.rb +0 -52
- data/lib/hydra/assets.rb +0 -7
- data/lib/hydra/assets_controller_helper.rb +0 -122
- data/lib/hydra/catalog.rb +0 -11
- data/lib/hydra/controller.rb +0 -26
- data/lib/hydra/controller/assets_controller_behavior.rb +0 -143
- data/lib/hydra/controller/catalog_controller_behavior.rb +0 -56
- data/lib/hydra/controller/controller_behavior.rb +0 -59
- data/lib/hydra/controller/file_assets_behavior.rb +0 -144
- data/lib/hydra/controller/repository_controller_behavior.rb +0 -119
- data/lib/hydra/controller/upload_behavior.rb +0 -139
- data/lib/hydra/file_assets.rb +0 -11
- data/lib/hydra/file_assets_helper.rb +0 -12
- data/lib/hydra/generic_content.rb +0 -130
- data/lib/hydra/generic_image.rb +0 -112
- data/lib/hydra/generic_user_attributes.rb +0 -41
- data/lib/hydra/global_configurable.rb +0 -46
- data/lib/hydra/model_methods.rb +0 -104
- data/lib/hydra/model_mixins.rb +0 -8
- data/lib/hydra/model_mixins/common_metadata.rb +0 -25
- data/lib/hydra/model_mixins/solr_document_extension.rb +0 -24
- data/lib/hydra/models/file_asset.rb +0 -78
- data/lib/hydra/repository_controller.rb +0 -28
- data/lib/hydra/rights_metadata.rb +0 -194
- data/lib/hydra/solr.rb +0 -9
- data/lib/hydra/submission_workflow.rb +0 -138
- data/lib/hydra/superuser_attributes.rb +0 -19
- data/lib/hydra/ui.rb +0 -6
- data/lib/hydra/ui/controller.rb +0 -46
- data/lib/hydra/workflow.rb +0 -5
- data/lib/hydra/workflow/controller.rb +0 -3
- data/lib/mediashelf/active_fedora_helper.rb +0 -73
- data/lib/prev_next_links.rb +0 -33
- data/lib/railties/active-fedora.rake +0 -1
- data/lib/railties/hydra-fixtures.rake +0 -50
- data/lib/railties/hydra_jetty.rake +0 -53
- data/lib/user_attributes_loader.rb +0 -26
- data/solr/conf/schema.xml +0 -116
- data/solr/conf/solrconfig.xml +0 -311
- data/solr/solr.xml +0 -35
- data/solr_conf/conf/schema.xml +0 -124
- data/solr_conf/conf/solrconfig.xml +0 -394
- data/solr_conf/solr.xml +0 -35
- data/tasks/active-fedora.rake +0 -1
- data/tasks/hydra-head-fixtures.rake +0 -58
- data/tasks/hydra-head.rake +0 -209
- data/tasks/hydra_jetty.rake +0 -53
- data/tasks/hyhead_rspec.rake +0 -57
- data/tasks/replicator.rake +0 -27
- data/tasks/solrizer-fedora.rake +0 -53
- data/tasks/solrizer.rake +0 -13
- data/test_support/etc/Gemfile +0 -46
- data/test_support/etc/common_metadata_asset.rb +0 -18
- data/test_support/features/absent_model_edit.feature +0 -27
- data/test_support/features/absent_model_search_result.feature +0 -18
- data/test_support/features/absent_model_show.feature +0 -27
- data/test_support/features/button_add_assets.feature +0 -22
- data/test_support/features/button_add_generic_content.feature +0 -11
- data/test_support/features/button_add_image.feature +0 -11
- data/test_support/features/button_add_mods_asset.feature +0 -11
- data/test_support/features/button_delete_asset.feature +0 -13
- data/test_support/features/contributor_add.feature +0 -44
- data/test_support/features/default_partials_edit.feature +0 -27
- data/test_support/features/default_partials_search_result.feature +0 -22
- data/test_support/features/default_partials_show.feature +0 -24
- data/test_support/features/file_upload.feature +0 -80
- data/test_support/features/generic_content_create.feature +0 -7
- data/test_support/features/generic_content_edit.feature +0 -21
- data/test_support/features/generic_content_search_result.feature +0 -22
- data/test_support/features/generic_content_show.feature +0 -20
- data/test_support/features/generic_image_create.feature +0 -7
- data/test_support/features/generic_image_edit.feature +0 -21
- data/test_support/features/generic_image_search_result.feature +0 -22
- data/test_support/features/generic_image_show.feature +0 -20
- data/test_support/features/home_page.feature +0 -9
- data/test_support/features/html_validity.feature +0 -43
- data/test_support/features/mods_asset_contributors_edit.feature +0 -88
- data/test_support/features/mods_asset_create.feature +0 -17
- data/test_support/features/mods_asset_edit.feature +0 -65
- data/test_support/features/mods_asset_edit_without_permission.feature +0 -15
- data/test_support/features/mods_asset_search_result.feature +0 -24
- data/test_support/features/mods_asset_show.feature +0 -90
- data/test_support/features/nonexistent_object_show.feature +0 -9
- data/test_support/features/permissions_add.feature +0 -16
- data/test_support/features/permissions_edit.feature +0 -65
- data/test_support/features/step_definitions/catalog_index_steps.rb +0 -14
- data/test_support/features/step_definitions/create_asset_steps.rb +0 -3
- data/test_support/features/step_definitions/edit_metadata_steps.rb +0 -72
- data/test_support/features/step_definitions/file_list_steps.rb +0 -36
- data/test_support/features/step_definitions/html_validity_steps.rb +0 -64
- data/test_support/features/step_definitions/hydra_metadata_steps.rb +0 -3
- data/test_support/features/step_definitions/hydra_steps.rb +0 -8
- data/test_support/features/step_definitions/inline_editable_edit_steps.rb +0 -77
- data/test_support/features/step_definitions/search_steps.rb +0 -88
- data/test_support/features/step_definitions/searching_steps.rb +0 -22
- data/test_support/features/step_definitions/show_document_steps.rb +0 -89
- data/test_support/features/step_definitions/user_steps.rb +0 -42
- data/test_support/features/step_definitions/web_steps.rb +0 -223
- data/test_support/features/support/env.rb +0 -57
- data/test_support/features/support/paths.rb +0 -85
- data/test_support/features/switch_users.feature +0 -14
- data/test_support/features/view_catalog_index.feature +0 -18
- data/test_support/fixtures/empty_file.txt +0 -0
- data/test_support/fixtures/hydra_test_default_partials.foxml.xml +0 -80
- data/test_support/fixtures/hydra_test_generic_content.foxml.xml +0 -138
- data/test_support/fixtures/hydra_test_generic_image.foxml.xml +0 -395
- data/test_support/fixtures/hydra_test_no_model.foxml.xml +0 -79
- data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +0 -1212
- data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +0 -4946
- data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +0 -234
- data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +0 -177
- data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +0 -170
- data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +0 -187
- data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +0 -676
- data/test_support/fixtures/hydrus_admin_class1.foxml.xml +0 -176
- data/test_support/fixtures/image.jp2 +0 -0
- data/test_support/fixtures/libra-oa_1.foxml.xml +0 -2324
- data/test_support/fixtures/libra-oa_2.foxml.xml +0 -2422
- data/test_support/fixtures/libra-oa_7.foxml.xml +0 -1735
- data/test_support/fixtures/small_file.txt +0 -1
- data/test_support/spec/controllers/catalog_controller_spec.rb +0 -138
- data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +0 -67
- data/test_support/spec/controllers/catalog_valid_html_spec.rb +0 -123
- data/test_support/spec/controllers/contributors_controller_spec.rb +0 -67
- data/test_support/spec/controllers/file_assets_controller_spec.rb +0 -194
- data/test_support/spec/controllers/hydra-assets_controller_spec.rb +0 -151
- data/test_support/spec/controllers/hydra_controller_spec.rb +0 -43
- data/test_support/spec/controllers/hydra_ui_controller_spec.rb +0 -21
- data/test_support/spec/controllers/permissions_controller_spec.rb +0 -39
- data/test_support/spec/controllers/user_sessions_controller_spec.rb +0 -35
- data/test_support/spec/factories.rb +0 -11
- data/test_support/spec/helpers/access_controls_enforcement_spec.rb +0 -119
- data/test_support/spec/helpers/access_controls_evaluation_spec.rb +0 -26
- data/test_support/spec/helpers/assets_controller_helper_spec.rb +0 -63
- data/test_support/spec/helpers/blacklight_helper_spec.rb +0 -60
- data/test_support/spec/helpers/file_assets_helper_spec.rb +0 -116
- data/test_support/spec/helpers/generic_content_objects_helper_spec.rb +0 -17
- data/test_support/spec/helpers/hydra-repository_controller_spec.rb +0 -54
- data/test_support/spec/helpers/hydra_assets_helper_spec.rb +0 -143
- data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +0 -255
- data/test_support/spec/helpers/hydra_helper_spec.rb +0 -105
- data/test_support/spec/helpers/hydra_model_methods_spec.rb +0 -88
- data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +0 -26
- data/test_support/spec/helpers/javascript_includes_helper_spec.rb +0 -51
- data/test_support/spec/integration/file_asset_spec.rb +0 -68
- data/test_support/spec/lib/catalog_spec.rb +0 -23
- data/test_support/spec/lib/global_configurable_spec.rb +0 -98
- data/test_support/spec/lib/hydra_submission_workflow_spec.rb +0 -141
- data/test_support/spec/lib/model_methods_spec.rb +0 -29
- data/test_support/spec/models/file_asset_spec.rb +0 -25
- data/test_support/spec/models/generic_content_spec.rb +0 -39
- data/test_support/spec/models/generic_image_spec.rb +0 -75
- data/test_support/spec/models/mods_asset_spec.rb +0 -20
- data/test_support/spec/models/solr_document_spec.rb +0 -17
- data/test_support/spec/models/user_spec.rb +0 -94
- data/test_support/spec/rcov.opts +0 -3
- data/test_support/spec/spec.opts +0 -4
- data/test_support/spec/spec_helper.rb +0 -63
- data/test_support/spec/support/matchers/helper_matcher.rb +0 -14
- data/test_support/spec/support/matchers/solr_matchers.rb +0 -60
- data/test_support/spec/unit/hydra-head-engine_spec.rb +0 -8
- data/test_support/spec/unit/hydra-head_spec.rb +0 -8
@@ -1,9 +0,0 @@
|
|
1
|
-
Feature: Non-existent Objects - Show View
|
2
|
-
I want to see a 404 for the show view for objects not in fedora or solr
|
3
|
-
Scenario: an object exists for an id
|
4
|
-
Given I am on the show document page for hydra:test_no_model
|
5
|
-
Then I should get a status code 200
|
6
|
-
Scenario: no object exists for an id
|
7
|
-
Given I am on the show document page for hydra:test_no_exist
|
8
|
-
Then I should get a status code 404
|
9
|
-
And I should see "Sorry, you have requested a record that doesn't exist."
|
@@ -1,16 +0,0 @@
|
|
1
|
-
@permissions
|
2
|
-
Feature: Add Individual Permissions
|
3
|
-
As a user with edit permissions
|
4
|
-
In order to edit who has which levels of access to a document
|
5
|
-
I want to see and edit the object-level permissions for users and groups
|
6
|
-
|
7
|
-
Scenario: Editing group permissions
|
8
|
-
Given I am logged in as "archivist1@example.com"
|
9
|
-
And I am on the edit permissions page for hydrangea:fixture_mods_article1
|
10
|
-
When I press "Add Additional Permissions"
|
11
|
-
And I fill in "permission_actor_id" with "cucumber_user"
|
12
|
-
And I select "Read & Download" from "permission_level"
|
13
|
-
When I press "Continue"
|
14
|
-
Then I should see "cucumber_user has been granted read permissions for hydrangea:fixture_mods_article1"
|
15
|
-
When I am on the edit permissions page for hydrangea:fixture_mods_article1
|
16
|
-
Then "Read & Download" should be selected from "cucumber_user" within "form#permissions_metadata"
|
@@ -1,65 +0,0 @@
|
|
1
|
-
@permissions
|
2
|
-
Feature: Edit Permissions
|
3
|
-
|
4
|
-
As a user with edit permissions
|
5
|
-
In order to edit who has which levels of access to a document
|
6
|
-
I want to see and edit the object-level permissions for users and groups
|
7
|
-
|
8
|
-
Background:
|
9
|
-
Given that "hydrangea:fixture_mods_article1" has been loaded into fedora
|
10
|
-
|
11
|
-
Scenario: Viewing group & individual permissions
|
12
|
-
Given I am logged in as "archivist1@example.com"
|
13
|
-
Given I am on the edit permissions page for hydrangea:fixture_mods_article1
|
14
|
-
Then the following should be selected within "form#permissions_metadata"
|
15
|
-
|Archivist | Edit & Upload |
|
16
|
-
|Researcher | No Access |
|
17
|
-
|researcher1 | Edit & Upload |
|
18
|
-
|Admin_policy_object_editor | No Access |
|
19
|
-
|Public | Discover |
|
20
|
-
|
21
|
-
Scenario: Editing group permissions on article edit page
|
22
|
-
Given I am logged in as "archivist1@example.com"
|
23
|
-
When I am on the edit permissions page for hydrangea:fixture_mods_article1
|
24
|
-
And the following should be selected within "form#permissions_metadata"
|
25
|
-
|Archivist | Edit & Upload |
|
26
|
-
|researcher1 | Edit & Upload |
|
27
|
-
|Admin_policy_object_editor | No Access |
|
28
|
-
|Public | Discover |
|
29
|
-
When I select the following within "form#permissions_metadata"
|
30
|
-
|Archivist | Edit & Upload |
|
31
|
-
|Admin_policy_object_editor | Discover |
|
32
|
-
|Patron | Edit |
|
33
|
-
And I press "Continue"
|
34
|
-
Then I should see "The permissions have been updated."
|
35
|
-
When I am on the edit permissions page for hydrangea:fixture_mods_article1
|
36
|
-
Then the following should be selected within "form#permissions_metadata"
|
37
|
-
|Archivist | Edit & Upload |
|
38
|
-
|Admin_policy_object_editor | Discover |
|
39
|
-
|Patron | Edit |
|
40
|
-
|Public | Discover |
|
41
|
-
|
42
|
-
Scenario: Editing group permissions on permissions index page
|
43
|
-
Given I am logged in as "archivist1@example.com"
|
44
|
-
And I am on the edit permissions page for hydrangea:fixture_mods_dataset1
|
45
|
-
When I select the following within "form#permissions_metadata"
|
46
|
-
|Archivist | Edit & Upload |
|
47
|
-
|Admin_policy_object_editor | Discover |
|
48
|
-
|Patron | Edit |
|
49
|
-
And I press "Continue"
|
50
|
-
Then I should see "The permissions have been updated."
|
51
|
-
When I am on the edit permissions page for hydrangea:fixture_mods_dataset1
|
52
|
-
Then the following should be selected within "form#permissions_metadata"
|
53
|
-
|Archivist | Edit & Upload |
|
54
|
-
|Admin_policy_object_editor | Discover |
|
55
|
-
|Patron | Edit |
|
56
|
-
|
57
|
-
Scenario: Viewing individual permissions with your own permissions hidden
|
58
|
-
Given I am logged in as "researcher1@example.com"
|
59
|
-
And I am on the edit document page for hydrangea:fixture_mods_article1
|
60
|
-
##
|
61
|
-
## This one fails because Capybara's selectors can't find "#individual_permissions"
|
62
|
-
##
|
63
|
-
# Then I should not see "researcher1" within "form#permissions_metadata"
|
64
|
-
|
65
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Given /^the following catalog_indices:$/ do |catalog_indices|
|
2
|
-
CatalogIndex.create!(catalog_indices.hashes)
|
3
|
-
end
|
4
|
-
|
5
|
-
When /^I delete the (\d+)(?:st|nd|rd|th) catalog_index$/ do |pos|
|
6
|
-
visit catalog_indices_url
|
7
|
-
within("table tr:nth-child(#{pos.to_i+1})") do
|
8
|
-
click_link "Destroy"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
Then /^I should see the following catalog_indices:$/ do |expected_catalog_indices_table|
|
13
|
-
expected_catalog_indices_table.diff!(tableish('table tr', 'td,th'))
|
14
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# This is the post-submission complement to "I fill in the following" from web_steps.rb
|
2
|
-
Then /^the following (should contain|contain|should not contain|do not contain):$/ do |bool,table|
|
3
|
-
# table is a Cucumber::Ast::Table
|
4
|
-
if bool == "should contain" || bool == "contain"
|
5
|
-
table.rows_hash.each do |name, value|
|
6
|
-
step %{the "#{name}" field should contain "#{value}"}
|
7
|
-
end
|
8
|
-
elsif bool == "should not contain" || bool == "do not contain"
|
9
|
-
table.rows_hash.each do |name, value|
|
10
|
-
step %{the "#{name}" field should not contain "#{value}"}
|
11
|
-
end
|
12
|
-
else
|
13
|
-
pending
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
When /^I select the following(?: within "([^"]*)")?$/ do |scope_selector, table|
|
18
|
-
# table is a Cucumber::Ast::Table
|
19
|
-
table.rows_hash.each do |field_selector, value|
|
20
|
-
step %{I select "#{value}" from "#{field_selector}" within "#{scope_selector}"}
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
Then /^the following should be selected(?: within "([^"]*)")?$/ do |scope_selector, table|
|
25
|
-
# table is a Cucumber::Ast::Table
|
26
|
-
table.rows_hash.each do |field_selector, value|
|
27
|
-
step %{"#{value}" should be selected from "#{field_selector}" within "#{scope_selector}"}
|
28
|
-
# Then %{the "#{field_selector}" field within "#{scope_selector}" should contain "#{value}"}
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
Then /^"([^"]*)" should be selected from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field_selector, scope_selector|
|
33
|
-
# table is a Cucumber::Ast::Table
|
34
|
-
with_scope(scope_selector) do
|
35
|
-
find_and_check_selected_value(field_selector, value)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
Then /^I should see a "([^"]*)" button(?: within "([^"]*)")?$/ do |button_locator, scope_selector|
|
40
|
-
with_scope(scope_selector) do
|
41
|
-
begin
|
42
|
-
find_button(button_locator)
|
43
|
-
rescue
|
44
|
-
raise "no button with value or id or text '#{button_locator}' found"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
Given /^that "([^"]*)" has been loaded into fedora$/ do |pid|
|
50
|
-
ActiveFedora::FixtureLoader.new(File.dirname(__FILE__) + '/../../fixtures').reload(pid)
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
|
55
|
-
# Find a select tag on the page
|
56
|
-
# @param [String] locator Capybara locator
|
57
|
-
# @return [Capybara::Node]
|
58
|
-
def find_select(locator)
|
59
|
-
no_select_msg = "no select box with id, name, or label '#{locator}' found"
|
60
|
-
select = find(:xpath, XPath::HTML.select(locator), :message => no_select_msg)
|
61
|
-
return select
|
62
|
-
end
|
63
|
-
|
64
|
-
# Find a select tag on the page and test whether the given value is selected within it
|
65
|
-
# @param [String] locator Capybara locator for the select tag
|
66
|
-
# @param [String] value the value that should be selected
|
67
|
-
def find_and_check_selected_value(locator, value)
|
68
|
-
select = find_select(locator)
|
69
|
-
no_option_msg = "no option with text '#{value}' in select box '#{locator}'"
|
70
|
-
option = select.find(:xpath, XPath::HTML.option(value), :message => no_option_msg)
|
71
|
-
option.should be_selected
|
72
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
|
2
|
-
Then /^I (should|should not) see "([^"]*)" in the file assets list$/ do |bool, arg|
|
3
|
-
with_scope("#file_assets") do
|
4
|
-
if bool == "should"
|
5
|
-
step %{I should see "#{arg}"}
|
6
|
-
else
|
7
|
-
step %{I should not see "#{arg}"}
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
|
13
|
-
Then /^I should see a link to "([^"]*)" in the file assets list$/ do |link_name|
|
14
|
-
with_scope("#file_assets") do
|
15
|
-
step %{I should see a link called "#{link_name}"}
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
Then /^I (should|should not) see a link to "([^"]*)" with label "([^"]*)" in the file assets list$/ do |bool, link_name, label_name|
|
21
|
-
with_scope("#file_assets") do
|
22
|
-
if bool == "should"
|
23
|
-
step %{I should see a link to "#{link_name}" with label "#{label_name}"}
|
24
|
-
else
|
25
|
-
step %{I should not see a link to "#{link_name}" with label "#{label_name}"}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
Then /^I should receive an? "([^"]*)" file named "([^"]*)"$/ do |content_type, file|
|
31
|
-
result = page.response_headers['Content-Type'].should == content_type
|
32
|
-
if result
|
33
|
-
result = page.response_headers['Content-Disposition'].should =~ /filename="#{file}"/
|
34
|
-
end
|
35
|
-
result
|
36
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "nokogiri"
|
3
|
-
require 'rest_client'
|
4
|
-
|
5
|
-
Then /^the page should be HTML5 valid$/ do
|
6
|
-
response_is_html_valid?(page.source).should be_true
|
7
|
-
end
|
8
|
-
|
9
|
-
class Html5Validator
|
10
|
-
BASE_URI = 'http://html5.validator.nu'
|
11
|
-
HEADERS = { 'Content-Type' => 'text/html; charset=utf-8', 'Content-Encoding' => 'UTF-8' }
|
12
|
-
|
13
|
-
def initialize(text)
|
14
|
-
@text = text
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
def valid?
|
19
|
-
errors.empty?
|
20
|
-
end
|
21
|
-
|
22
|
-
def errors
|
23
|
-
validation['messages'].select { |msg| msg['type'] == 'error' }
|
24
|
-
end
|
25
|
-
|
26
|
-
def validation
|
27
|
-
@validation ||= validate!
|
28
|
-
end
|
29
|
-
|
30
|
-
def inspect
|
31
|
-
str = "\n#{validator.errors.length} HTML5 Validation Error(s):\n"
|
32
|
-
errors.each_with_index do |error,i|
|
33
|
-
str << " #{i+1}) #{ error['message'] }\n"
|
34
|
-
end
|
35
|
-
|
36
|
-
str
|
37
|
-
end
|
38
|
-
|
39
|
-
private
|
40
|
-
def validate!
|
41
|
-
response = RestClient.post "#{BASE_URI}/?out=json", @text, HEADERS
|
42
|
-
JSON.parse(response.body)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
private
|
47
|
-
|
48
|
-
def response_is_html_valid?(resp)
|
49
|
-
begin
|
50
|
-
# http://validator.w3.org/docs/api.html says to sleep for at least 1 second between requests. Just making sure we don't get throttled.
|
51
|
-
sleep(1.0)
|
52
|
-
validator = Html5Validator.new(resp)
|
53
|
-
return true if validator.valid?
|
54
|
-
rescue SocketError, RestClient::BadGateway #meaning we're either not connected to the internet or we were throttled by the validator.
|
55
|
-
puts "WARNING: No connection to W3C validator. Page may not be HTML5 valid!"
|
56
|
-
return true
|
57
|
-
rescue RestClient::RequestTimeout
|
58
|
-
puts "WARNING: Timeout connecting to W3C validator. Page may not be HTML5 valid!"
|
59
|
-
return true
|
60
|
-
end
|
61
|
-
|
62
|
-
puts validator.inspect
|
63
|
-
return false
|
64
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# This is borrowed from blacklight's record_view_steps.rb
|
2
|
-
Then /^I (should|should not) see an? "([^\"]*)" element containing "([^\"]*)"$/ do |bool,elem,content|
|
3
|
-
if bool == "should"
|
4
|
-
page.should have_selector("#{elem}",:content => content)
|
5
|
-
else
|
6
|
-
page.should_not have_selector("#{elem}",:content => content)
|
7
|
-
end
|
8
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
|
2
|
-
|
3
|
-
Then /^I should see an inline edit containing "([^"]*)"$/ do |arg1|
|
4
|
-
page.should have_selector(".editable-text", :content=>arg1)
|
5
|
-
end
|
6
|
-
|
7
|
-
Then /^the "([^\"]*)" inline edit should contain "([^\"]*)"$/ do |arg1, arg2|
|
8
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
9
|
-
dt.each do |term|
|
10
|
-
term.next_element.should have_selector("dd span") do |editable|
|
11
|
-
editable.should have_selector(".editable-text", :content=>arg2)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
Then /^the "([^\"]*)" inline edit should be empty$/ do |arg1|
|
18
|
-
page.should have_selector("dt", :text=>arg1) do |dt|
|
19
|
-
dt.each do |term|
|
20
|
-
term.next_element.should have_selector("dd .editable-container") do |editable|
|
21
|
-
editable.should have_selector(".editable-edit", :content=>nil)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
Then /^the "([^\"]*)" inline date edit should contain "([^\"]*)"$/ do |arg1, arg2|
|
28
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
29
|
-
dt.each do |term|
|
30
|
-
term.next_element.should have_selector("dd div.date-select") do |editable_date_picker|
|
31
|
-
editable_date_picker.should have_selector("input.controlled-date-part", :value=>arg2)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# This was failing on some computers that displayed "selected" instead of "selected='selected'", so we made it an option in the next step definition
|
38
|
-
Then /^the "([^\"]*)" dropdown edit should be set to "([^\"]*)"$/ do |arg1, arg2|
|
39
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
40
|
-
dt.each do |term|
|
41
|
-
term.next_element.should have_selector("select") do |dropdown|
|
42
|
-
dropdown.should have_selector("option", :content=>arg2, :selected=>"selected")
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
Then /^the "([^\"]*)" dropdown edit should contain "([^\"]*)" as an option$/ do |arg1, arg2|
|
49
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
50
|
-
dt.each do |term|
|
51
|
-
term.next_element.should have_selector("select") do |dropdown|
|
52
|
-
dropdown.should have_selector("option", :content=>arg2)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
Then /^the "([^\"]*)" inline textarea edit should contain "([^\"]*)"$/ do |arg1, arg2|
|
59
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
60
|
-
dt.each do |term|
|
61
|
-
term.next_element.should have_selector("dd ol li.editable_textarea") do |editable_textarea|
|
62
|
-
editable_textarea.should have_selector(".flc-inlineEdit-text", :content=>arg2)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
Then /^the "([^\"]*)" inline textarea edit should be empty$/ do |arg1|
|
69
|
-
page.should have_selector("dt", :content=>arg1) do |dt|
|
70
|
-
dt.each do |term|
|
71
|
-
term.next_element.should have_selector("dd ol li.editable_textarea") do |editable_textarea|
|
72
|
-
editable_textarea.should have_selector(".flc-inlineEdit-text", :content=>nil)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
@@ -1,88 +0,0 @@
|
|
1
|
-
# User added
|
2
|
-
Then /^I should see a search field$/ do
|
3
|
-
page.should have_tag("input#q")
|
4
|
-
end
|
5
|
-
|
6
|
-
Then /^I should see a selectable list with field choices$/ do
|
7
|
-
page.should have_tag("select#search_field")
|
8
|
-
end
|
9
|
-
|
10
|
-
Then /^I should see a selectable list with per page choices$/ do
|
11
|
-
page.should have_tag("select#per_page")
|
12
|
-
end
|
13
|
-
|
14
|
-
# Using the same step definition from edit_metadata_steps.rb
|
15
|
-
#
|
16
|
-
# Then /^I should see a "([^\"]*)" button$/ do |label|
|
17
|
-
# page.should have_tag("input[type=?][value=?]", 'submit', label)
|
18
|
-
# end
|
19
|
-
|
20
|
-
Then /^I should not see the "([^\"]*)" element$/ do |id|
|
21
|
-
page.should_not have_tag("##{id}")
|
22
|
-
end
|
23
|
-
|
24
|
-
Then /^I should see the "([^\"]*)" element$/ do |id|
|
25
|
-
page.should have_tag("##{id}")
|
26
|
-
end
|
27
|
-
|
28
|
-
Given /^the application is configured to have searchable fields "([^\"]*)" with values "([^\"]*)"$/ do |fields, values|
|
29
|
-
labels = fields.split(", ")
|
30
|
-
values = values.split(", ")
|
31
|
-
combined = labels.zip(values)
|
32
|
-
Blacklight.config[:search_fields] = []
|
33
|
-
combined.each do |pair|
|
34
|
-
Blacklight.config[:search_fields] << pair
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
Then /^I should see select list "([^\"]*)" with field labels "([^\"]*)"$/ do |list_css, names|
|
39
|
-
page.should have_tag(list_css) do
|
40
|
-
labels = names.split(", ")
|
41
|
-
labels.each do |label|
|
42
|
-
with_tag('option', label)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
Then /^I should see select list "([^\"]*)" with "([^\"]*)" selected$/ do |list_css, label|
|
48
|
-
page.should have_tag(list_css) do |e|
|
49
|
-
with_tag("[selected=selected]", {:count => 1}) do
|
50
|
-
with_tag("option", {:count => 1, :text => label})
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# Results Page
|
56
|
-
Given /^the application is configured to have sort fields "([^\"]*)" with values "([^\"]*)"$/ do |fields, values|
|
57
|
-
labels = fields.split(", ")
|
58
|
-
values = values.split(", ")
|
59
|
-
combined = labels.zip(values)
|
60
|
-
Blacklight.config[:sort_fields] = []
|
61
|
-
combined.each do |pair|
|
62
|
-
Blacklight.config[:sort_fields] << pair
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
Then /^I should get results$/ do
|
67
|
-
page.should have_selector("div.document")
|
68
|
-
end
|
69
|
-
|
70
|
-
Then /^I should not get results$/ do
|
71
|
-
page.should_not have_selector("div.document")
|
72
|
-
end
|
73
|
-
|
74
|
-
Then /^I should see the applied filter "([^\"]*)" with the value "([^\"]*)"$/ do |filter, text|
|
75
|
-
page.should have_tag("div#facets div") do |node|
|
76
|
-
node.should have_selector("h3", :content => filter)
|
77
|
-
node.should have_selector("span.selected", :content => text)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
# Then /^I should see the applied filter "([^\"]*)" with the value
|
82
|
-
# "([^\"]*)"$/ do |filter, text|
|
83
|
-
# page.should have_tag("div#facets div") do |node|
|
84
|
-
# node.should have_selector("h3", :content => filter)
|
85
|
-
# node.should have_selector("span.selected", :content => /#{text}.*/)
|
86
|
-
# end
|
87
|
-
# end
|
88
|
-
|