hydra-head 3.0.0pre3 → 3.0.0pre4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (352) hide show
  1. data/.gitmodules +0 -3
  2. data/.rvmrc +6 -0
  3. data/BLACKLIGHT_CONFIG.textile +76 -0
  4. data/CREATE_RAILS_APP.textile +323 -0
  5. data/DEVELOP_PLUGIN.textile +90 -0
  6. data/GIT_WORKFLOW.textile +84 -0
  7. data/Gemfile.lock +82 -66
  8. data/HISTORY.textile +7 -0
  9. data/HOW_DO_I.textile +107 -0
  10. data/HOW_TO_DEFINE_A_HYDRA_CONTROLLER.textile +21 -0
  11. data/HOW_TO_DEFINE_A_HYDRA_MODEL.textile +64 -0
  12. data/HOW_TO_GET_STARTED.textile +100 -76
  13. data/INITIAL_APP_MODS.textile +60 -76
  14. data/INSTALL_PREREQ.textile +19 -0
  15. data/LICENSE +14 -0
  16. data/README.textile +89 -17
  17. data/README_RAKE_TASKS.textile +107 -0
  18. data/README_SUBTREE.textile +87 -0
  19. data/README_TERSE.textile +92 -0
  20. data/TESTING_PLUGIN.textile +134 -0
  21. data/app/controllers/assets_controller.rb +34 -4
  22. data/app/controllers/contributors_controller.rb +49 -1
  23. data/app/controllers/downloads_controller.rb +36 -0
  24. data/app/controllers/file_assets_controller.rb +43 -21
  25. data/app/controllers/generic_content_objects_controller.rb +38 -0
  26. data/app/controllers/get_controller.rb +39 -0
  27. data/app/controllers/permissions_controller.rb +33 -4
  28. data/app/controllers/user_sessions_controller.rb +0 -1
  29. data/app/helpers/application_helper.rb +183 -0
  30. data/app/helpers/blacklight_helper.rb +13 -8
  31. data/app/helpers/hydra_assets_helper.rb +6 -15
  32. data/app/helpers/hydra_fedora_metadata_helper.rb +51 -67
  33. data/app/helpers/hydra_helper.rb +35 -11
  34. data/app/helpers/javascript_includes_helper.rb +2 -4
  35. data/app/helpers/personalization_helper.rb +44 -0
  36. data/app/models/generic_content.rb +6 -3
  37. data/app/models/generic_image.rb +3 -1
  38. data/app/models/mods_asset.rb +12 -1
  39. data/app/models/user_attribute.rb +25 -0
  40. data/app/models/uses_default_partials.rb +14 -0
  41. data/app/views/_add_assets_links.html.erb +1 -0
  42. data/app/views/catalog/_edit_partials/_default.html.erb +5 -5
  43. data/app/views/catalog/_home_text.html.erb +2 -2
  44. data/app/views/catalog/_index_partials/_default_details.html.erb +10 -7
  45. data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -0
  46. data/app/views/catalog/_search_form.html.erb +1 -1
  47. data/app/views/catalog/_show_partials/_default.html.erb +4 -2
  48. data/app/views/catalog/_show_partials/_default_details.html.erb +10 -7
  49. data/app/views/catalog/show.html.erb +20 -28
  50. data/app/views/contributors/_edit_person.html.erb +26 -29
  51. data/app/views/contributors/_index.html.erb +6 -7
  52. data/app/views/contributors/_show_conference.html.erb +5 -15
  53. data/app/views/contributors/_show_organization.html.erb +8 -16
  54. data/app/views/file_assets/_file_assets_form.html.erb +11 -0
  55. data/app/views/file_assets/_index.html.erb +21 -6
  56. data/app/views/file_assets/_new.html.erb +6 -2
  57. data/app/views/file_assets/_result.html.erb +2 -2
  58. data/app/views/fluid_infusion/_uploader.html.erb +4 -5
  59. data/app/views/generic_content_objects/_contributor_form.html.erb +11 -0
  60. data/app/views/generic_content_objects/_description_form.html.erb +7 -0
  61. data/app/views/generic_content_objects/_edit_description.html.erb +14 -41
  62. data/app/views/generic_content_objects/_show_description.html.erb +38 -63
  63. data/app/views/generic_contents/_edit.html.erb +1 -45
  64. data/app/views/generic_contents/_edit.html.erb_ +39 -0
  65. data/app/views/generic_contents/_index.html.erb +1 -3
  66. data/app/views/generic_contents/_show.html.erb +4 -14
  67. data/app/views/generic_contents/_show_content.html.erb +7 -4
  68. data/app/views/generic_images/_edit.html.erb +26 -32
  69. data/app/views/generic_images/_show.html.erb +7 -10
  70. data/app/views/generic_images/_show_all.html.erb +1 -1
  71. data/app/views/generic_images/_show_content.html.erb +7 -7
  72. data/app/views/layouts/application.html.erb +33 -41
  73. data/app/views/layouts/hydra-head.html.erb +52 -7
  74. data/app/views/mods_assets/_additional_info_form.html.erb +44 -0
  75. data/app/views/mods_assets/_contributor_form.html.erb +14 -0
  76. data/app/views/mods_assets/_edit.html.erb +8 -32
  77. data/app/views/mods_assets/_edit.html.erb_ +63 -0
  78. data/app/views/mods_assets/_edit_description.html.erb +52 -61
  79. data/app/views/mods_assets/_edit_journal.html.erb +49 -64
  80. data/app/views/mods_assets/_publication_form.html.erb +13 -0
  81. data/app/views/mods_assets/_show.html.erb +18 -23
  82. data/app/views/mods_assets/_show_additional_info.html.erb +17 -0
  83. data/app/views/mods_assets/_show_contributors.html.erb +7 -0
  84. data/app/views/mods_assets/_show_description.html.erb +3 -13
  85. data/app/views/mods_assets/_show_file_assets.html.erb +22 -0
  86. data/app/views/mods_assets/_show_journal.html.erb +3 -3
  87. data/app/views/mods_assets/_show_permissions.html.erb +1 -0
  88. data/app/views/mods_assets/_show_publication.html.erb +8 -0
  89. data/app/views/permissions/_edit_person_permissions.html.erb +4 -9
  90. data/app/views/permissions/_index.html.erb +9 -18
  91. data/app/views/permissions/_new.html.erb +13 -17
  92. data/app/views/permissions/_permissions_form.html.erb +24 -0
  93. data/app/views/user_sessions/_login_form.html.erb +1 -1
  94. data/assets/images/hydra/powered_by_hydra.png +0 -0
  95. data/assets/images/hydra/search-button.png +0 -0
  96. data/assets/javascripts/date-picker/booking/index.html +368 -0
  97. data/assets/javascripts/date-picker/calendarHTML.txt +84 -0
  98. data/assets/javascripts/date-picker/css/datepicker.css +511 -0
  99. data/assets/javascripts/date-picker/css/demo.css +229 -0
  100. data/assets/javascripts/date-picker/index.html +798 -0
  101. data/assets/javascripts/date-picker/js/datepicker.js +2898 -0
  102. data/assets/javascripts/date-picker/js/datepicker.packed.js +1 -0
  103. data/assets/javascripts/date-picker/js/lang/ar.js +9 -0
  104. data/assets/javascripts/date-picker/js/lang/cs.js +9 -0
  105. data/assets/javascripts/date-picker/js/lang/da.js +10 -0
  106. data/assets/javascripts/date-picker/js/lang/de.js +10 -0
  107. data/assets/javascripts/date-picker/js/lang/en.js +9 -0
  108. data/assets/javascripts/date-picker/js/lang/eo.js +13 -0
  109. data/assets/javascripts/date-picker/js/lang/es.js +9 -0
  110. data/assets/javascripts/date-picker/js/lang/et.js +23 -0
  111. data/assets/javascripts/date-picker/js/lang/fi.js +7 -0
  112. data/assets/javascripts/date-picker/js/lang/fr.js +69 -0
  113. data/assets/javascripts/date-picker/js/lang/he.js +9 -0
  114. data/assets/javascripts/date-picker/js/lang/hu.js +9 -0
  115. data/assets/javascripts/date-picker/js/lang/id.js +9 -0
  116. data/assets/javascripts/date-picker/js/lang/it.js +11 -0
  117. data/assets/javascripts/date-picker/js/lang/kr.js +9 -0
  118. data/assets/javascripts/date-picker/js/lang/lt.js +8 -0
  119. data/assets/javascripts/date-picker/js/lang/lv.js +9 -0
  120. data/assets/javascripts/date-picker/js/lang/nl.js +9 -0
  121. data/assets/javascripts/date-picker/js/lang/no.js +9 -0
  122. data/assets/javascripts/date-picker/js/lang/pl.js +10 -0
  123. data/assets/javascripts/date-picker/js/lang/pt-br.js +11 -0
  124. data/assets/javascripts/date-picker/js/lang/pt.js +9 -0
  125. data/assets/javascripts/date-picker/js/lang/ru.js +11 -0
  126. data/assets/javascripts/date-picker/js/lang/se.js +9 -0
  127. data/assets/javascripts/date-picker/js/lang/si.js +9 -0
  128. data/assets/javascripts/date-picker/js/lang/tr.js +9 -0
  129. data/assets/javascripts/date-picker/language/index.html +240 -0
  130. data/assets/javascripts/date-picker/media/Thumbs.db +0 -0
  131. data/assets/javascripts/date-picker/media/backstripes.gif +0 -0
  132. data/assets/javascripts/date-picker/media/bg_header.jpg +0 -0
  133. data/assets/javascripts/date-picker/media/bullet1.gif +0 -0
  134. data/assets/javascripts/date-picker/media/bullet2.gif +0 -0
  135. data/assets/javascripts/date-picker/media/cal-grey.gif +0 -0
  136. data/assets/javascripts/date-picker/media/cal.gif +0 -0
  137. data/assets/javascripts/date-picker/media/gradient-e5e5e5-ffffff.gif +0 -0
  138. data/assets/javascripts/hydra/hydra-head.js +195 -0
  139. data/assets/javascripts/hydra/mediashelf.datepicker.js +39 -0
  140. data/assets/javascripts/hydra/mediashelf.placeholder.js +67 -0
  141. data/assets/javascripts/jquery.form.js +675 -0
  142. data/assets/javascripts/jquery.ui.datepicker.js +1793 -0
  143. data/assets/javascripts/spin.min.js +2 -0
  144. data/assets/stylesheets/hydra/html_refactor.css +115 -0
  145. data/assets/stylesheets/hydra/hydrangea-split-button.css +18 -0
  146. data/assets/stylesheets/hydra/hydrangea.css +292 -0
  147. data/assets/stylesheets/hydra/ie-styles.css +240 -0
  148. data/assets/stylesheets/hydra/styles.css +2224 -0
  149. data/assets/stylesheets/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  150. data/assets/stylesheets/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  151. data/assets/stylesheets/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  152. data/assets/stylesheets/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  153. data/assets/stylesheets/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  154. data/assets/stylesheets/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  155. data/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  156. data/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  157. data/assets/stylesheets/redmond/images/ui-icons_217bc0_256x240.png +0 -0
  158. data/assets/stylesheets/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
  159. data/assets/stylesheets/redmond/images/ui-icons_469bdd_256x240.png +0 -0
  160. data/assets/stylesheets/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
  161. data/assets/stylesheets/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
  162. data/assets/stylesheets/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
  163. data/assets/stylesheets/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
  164. data/assets/stylesheets/redmond/jquery-ui-1.8.5.custom.css +572 -0
  165. data/config/fedora.yml +17 -0
  166. data/config/role_map_cucumber.yml +10 -0
  167. data/config/role_map_development.yml +12 -0
  168. data/config/role_map_production.yml +2 -0
  169. data/config/role_map_test.yml +14 -0
  170. data/config/solr.yml +10 -0
  171. data/config/solr_mappings.yml +22 -0
  172. data/db/migrate/20101105214243_add_user_attributes_table.rb +15 -0
  173. data/db/migrate/20101108192527_create_superusers.rb +12 -0
  174. data/fedora/conf/fedora.fcfg +1021 -0
  175. data/hydra-head.gemspec +7 -4
  176. data/init.rb +4 -0
  177. data/install.rb +1 -0
  178. data/lib/blacklight/catalog_helper.rb +44 -0
  179. data/lib/blacklight.rb +40 -0
  180. data/lib/block_mapper.rb +52 -0
  181. data/lib/djatoka.rb +59 -0
  182. data/lib/ead_mapper.rb +7 -0
  183. data/lib/field_maps.rb +507 -0
  184. data/lib/generators/hydra/assets_generator.rb +51 -0
  185. data/lib/generators/hydra/head_generator.rb +23 -4
  186. data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +2 -2
  187. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +26 -0
  188. data/lib/hydra/access_controls_enforcement.rb +3 -2
  189. data/lib/hydra/assets_controller_helper.rb +6 -0
  190. data/lib/hydra/catalog.rb +7 -3
  191. data/lib/hydra/controller.rb +27 -0
  192. data/lib/hydra/file_assets_helper.rb +25 -8
  193. data/lib/hydra/generic_user_attributes.rb +34 -0
  194. data/lib/hydra/model_methods.rb +4 -2
  195. data/lib/hydra/mods_article.rb +5 -2
  196. data/lib/hydra/submission_workflow.rb +137 -0
  197. data/lib/hydra-head/controller.rb +30 -0
  198. data/lib/hydra-head/engine.rb +22 -1
  199. data/lib/hydra-head/routes.rb +14 -3
  200. data/lib/hydra-head/version.rb +1 -1
  201. data/lib/hydra-head.rb +3 -3
  202. data/lib/hydra.rb +1 -1
  203. data/lib/jetty_cleaner.rb +27 -0
  204. data/lib/marc_mapper.rb +131 -0
  205. data/lib/marc_record_ext.rb +97 -0
  206. data/lib/mediashelf/active_fedora_helper.rb +7 -1
  207. data/lib/prev_next_links.rb +22 -0
  208. data/lib/railties/hydra-fixtures.rake +6 -1
  209. data/lib/railties/hyhead_cucumber.rake +1 -2
  210. data/lib/railties/hyhead_rspec.rake +7 -7
  211. data/lib/stanford_blacklight_extensions.rb +6 -0
  212. data/lib/user_attributes_loader.rb +17 -0
  213. data/solr/conf/schema.xml +116 -0
  214. data/solr/conf/solrconfig.xml +311 -0
  215. data/solr/solr.xml +35 -0
  216. data/spec/controllers/catalog_valid_html_spec.rb +128 -0
  217. data/spec-rails2/helpers/hydra_fedora_metadata_helper_spec.rb +219 -0
  218. data/spec-rails2/spec_helper.rb +88 -0
  219. data/tasks/hydra-head.rake +2 -4
  220. data/test_support/etc/Gemfile +6 -5
  221. data/test_support/features/absent_model_edit.feature +27 -0
  222. data/test_support/features/absent_model_search_result.feature +24 -0
  223. data/test_support/features/absent_model_show.feature +27 -0
  224. data/test_support/features/button_add_assets.feature +2 -2
  225. data/test_support/features/contributor_add.feature +21 -16
  226. data/test_support/features/default_partials_edit.feature +27 -0
  227. data/test_support/features/default_partials_search_result.feature +22 -0
  228. data/test_support/features/default_partials_show.feature +24 -0
  229. data/test_support/features/file_upload.feature +55 -22
  230. data/test_support/features/generic_content_create.feature +7 -0
  231. data/test_support/features/generic_content_edit.feature +21 -0
  232. data/test_support/features/generic_content_search_result.feature +22 -0
  233. data/test_support/features/generic_content_show.feature +20 -0
  234. data/test_support/features/generic_image_create.feature +7 -0
  235. data/test_support/features/generic_image_edit.feature +21 -0
  236. data/test_support/features/generic_image_search_result.feature +22 -0
  237. data/test_support/features/generic_image_show.feature +20 -0
  238. data/test_support/features/html_validity.feature +43 -0
  239. data/test_support/features/mods_asset_contributors_edit.feature +27 -19
  240. data/test_support/features/mods_asset_create.feature +13 -8
  241. data/test_support/features/mods_asset_edit.feature +48 -16
  242. data/test_support/features/mods_asset_edit_without_permission.feature +6 -1
  243. data/test_support/features/mods_asset_search_result.feature +15 -15
  244. data/test_support/features/mods_asset_show.feature +56 -5
  245. data/test_support/features/permissions_add.feature +5 -4
  246. data/test_support/features/permissions_edit.feature +9 -7
  247. data/test_support/features/step_definitions/html_validity_steps.rb +57 -0
  248. data/test_support/features/step_definitions/show_document_steps.rb +1 -1
  249. data/test_support/features/step_definitions/user_steps.rb +4 -4
  250. data/test_support/features/support/paths.rb +4 -1
  251. data/test_support/fixtures/hydra_test_default_partials.foxml.xml +80 -0
  252. data/test_support/fixtures/hydra_test_generic_content.foxml.xml +138 -0
  253. data/test_support/fixtures/hydra_test_generic_image.foxml.xml +395 -0
  254. data/test_support/fixtures/hydra_test_no_model.foxml.xml +79 -0
  255. data/test_support/fixtures/hydrus_admin_class1.foxml.xml +176 -0
  256. data/test_support/fixtures/libra-oa_7.foxml.xml +1735 -0
  257. data/test_support/spec/controllers/assets_controller_spec.rb +5 -4
  258. data/test_support/spec/controllers/catalog_controller_spec.rb +2 -2
  259. data/test_support/spec/controllers/file_assets_controller_spec.rb +16 -10
  260. data/test_support/spec/controllers/hydra_controller_spec.rb +2 -0
  261. data/test_support/spec/controllers/permissions_controller_spec.rb +1 -1
  262. data/test_support/spec/helpers/access_controls_enforcement_spec.rb +20 -219
  263. data/test_support/spec/helpers/blacklight_helper_spec.rb +3 -1
  264. data/test_support/spec/helpers/file_assets_helper_spec.rb +13 -10
  265. data/test_support/spec/helpers/hydra_assets_helper_spec.rb +5 -1
  266. data/test_support/spec/helpers/hydra_djatoka_helper_spec.rb +3 -1
  267. data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +102 -69
  268. data/test_support/spec/helpers/hydra_helper_spec.rb +15 -0
  269. data/test_support/spec/lib/hydra_submission_workflow_spec.rb +141 -0
  270. data/test_support/spec/models/generic_image_spec.rb +6 -1
  271. data/uninstall.rb +1 -0
  272. data/vendor/cache/actionmailer-3.0.10.gem +0 -0
  273. data/vendor/cache/actionpack-3.0.10.gem +0 -0
  274. data/vendor/cache/activemodel-3.0.10.gem +0 -0
  275. data/vendor/cache/activerecord-3.0.10.gem +0 -0
  276. data/vendor/cache/activeresource-3.0.10.gem +0 -0
  277. data/vendor/cache/activesupport-3.0.10.gem +0 -0
  278. data/vendor/cache/capybara-1.1.1.gem +0 -0
  279. data/vendor/cache/childprocess-0.2.2.gem +0 -0
  280. data/vendor/cache/crack-0.3.1.gem +0 -0
  281. data/vendor/cache/cucumber-1.1.0.gem +0 -0
  282. data/vendor/cache/cucumber-rails-1.1.1.gem +0 -0
  283. data/vendor/cache/diff-lcs-1.1.3.gem +0 -0
  284. data/vendor/cache/equivalent-xml-0.2.8.gem +0 -0
  285. data/vendor/cache/factory_girl-2.1.2.gem +0 -0
  286. data/vendor/cache/gherkin-2.5.2.gem +0 -0
  287. data/vendor/cache/haml-3.1.3.gem +0 -0
  288. data/vendor/cache/httparty-0.8.1.gem +0 -0
  289. data/vendor/cache/json-1.6.1.gem +0 -0
  290. data/vendor/cache/json_pure-1.6.1.gem +0 -0
  291. data/vendor/cache/launchy-2.0.5.gem +0 -0
  292. data/vendor/cache/mediashelf-loggable-0.4.7.gem +0 -0
  293. data/vendor/cache/metaclass-0.0.1.gem +0 -0
  294. data/vendor/cache/mocha-0.10.0.gem +0 -0
  295. data/vendor/cache/multi_json-1.0.3.gem +0 -0
  296. data/vendor/cache/multi_xml-0.4.1.gem +0 -0
  297. data/vendor/cache/om-1.4.2.gem +0 -0
  298. data/vendor/cache/polyglot-0.3.2.gem +0 -0
  299. data/vendor/cache/rack-1.2.4.gem +0 -0
  300. data/vendor/cache/{rails-3.0.9.gem → rails-3.0.10.gem} +0 -0
  301. data/vendor/cache/railties-3.0.10.gem +0 -0
  302. data/vendor/cache/rcov-0.9.11.gem +0 -0
  303. data/vendor/cache/rdoc-3.10.gem +0 -0
  304. data/vendor/cache/rest-client-1.6.7.gem +0 -0
  305. data/vendor/cache/selenium-webdriver-2.8.0.gem +0 -0
  306. data/vendor/cache/solrizer-1.1.2.gem +0 -0
  307. data/vendor/cache/solrizer-fedora-1.1.2.gem +0 -0
  308. data/vendor/cache/sqlite3-1.3.4.gem +0 -0
  309. data/vendor/cache/term-ansicolor-1.0.7.gem +0 -0
  310. data/vendor/cache/treetop-1.4.10.gem +0 -0
  311. data/vendor/cache/tzinfo-0.3.30.gem +0 -0
  312. data/vendor/cache/will_paginate-3.0.2.gem +0 -0
  313. data/vendor/cache/xml-simple-1.1.1.gem +0 -0
  314. metadata +351 -121
  315. data/lib/engine.rb +0 -30
  316. data/test_support/features/file_assets_list.feature +0 -32
  317. data/vendor/cache/actionmailer-3.0.9.gem +0 -0
  318. data/vendor/cache/actionpack-3.0.9.gem +0 -0
  319. data/vendor/cache/activemodel-3.0.9.gem +0 -0
  320. data/vendor/cache/activerecord-3.0.9.gem +0 -0
  321. data/vendor/cache/activeresource-3.0.9.gem +0 -0
  322. data/vendor/cache/activesupport-3.0.9.gem +0 -0
  323. data/vendor/cache/capybara-1.0.0.gem +0 -0
  324. data/vendor/cache/childprocess-0.2.0.gem +0 -0
  325. data/vendor/cache/crack-0.1.8.gem +0 -0
  326. data/vendor/cache/cucumber-1.0.2.gem +0 -0
  327. data/vendor/cache/cucumber-rails-1.0.2.gem +0 -0
  328. data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
  329. data/vendor/cache/equivalent-xml-0.2.7.gem +0 -0
  330. data/vendor/cache/factory_girl-1.3.3.gem +0 -0
  331. data/vendor/cache/gherkin-2.4.5.gem +0 -0
  332. data/vendor/cache/haml-3.1.2.gem +0 -0
  333. data/vendor/cache/httparty-0.7.8.gem +0 -0
  334. data/vendor/cache/json-1.5.3.gem +0 -0
  335. data/vendor/cache/json_pure-1.5.3.gem +0 -0
  336. data/vendor/cache/launchy-2.0.4.gem +0 -0
  337. data/vendor/cache/mediashelf-loggable-0.4.3.gem +0 -0
  338. data/vendor/cache/mocha-0.9.12.gem +0 -0
  339. data/vendor/cache/om-1.2.5.gem +0 -0
  340. data/vendor/cache/polyglot-0.3.1.gem +0 -0
  341. data/vendor/cache/rack-1.2.3.gem +0 -0
  342. data/vendor/cache/railties-3.0.9.gem +0 -0
  343. data/vendor/cache/rcov-0.9.9.gem +0 -0
  344. data/vendor/cache/rdoc-3.8.gem +0 -0
  345. data/vendor/cache/selenium-webdriver-0.2.2.gem +0 -0
  346. data/vendor/cache/solrizer-1.1.0.gem +0 -0
  347. data/vendor/cache/solrizer-fedora-1.1.0.gem +0 -0
  348. data/vendor/cache/term-ansicolor-1.0.5.gem +0 -0
  349. data/vendor/cache/treetop-1.4.9.gem +0 -0
  350. data/vendor/cache/tzinfo-0.3.29.gem +0 -0
  351. data/vendor/cache/will_paginate-2.3.15.gem +0 -0
  352. data/vendor/cache/xml-simple-1.1.0.gem +0 -0
@@ -10,15 +10,19 @@ Feature: Add a Contributor
10
10
  @nojs
11
11
  Scenario: Add a person without javascript
12
12
  Given I am logged in as "archivist1@example.com"
13
- And I am on the edit document page for hydrangea:fixture_mods_article1
14
- When I follow "Add a Person"
15
- And I fill in the following:
16
- | Computing ID | 098556 |
17
- | First Name | Myra |
18
- | Last Name | Breckenridge |
19
- | Department | Posture and Empathy |
20
- | Institution | Academy for Aspiring Young Actors and Actresses |
21
- # And I press "Add Person"
13
+ #When I am on the edit document page for hydrangea:fixture_mods_article1
14
+ When I am on the edit contributor page for hydrangea:fixture_mods_article1
15
+ And I press "Add Another Author"
16
+ # When I fill in the following:
17
+ Then I fill in "person_2_computing_id" with "098556"
18
+ And I fill in "person_2_first_name" with "Myra"
19
+ And I fill in "person_2_last_name" with "Breckenridge"
20
+ And I fill in "person_2_description" with "Posture and Empathy"
21
+ And I fill in "person_2_institution" with "Academy for Aspiring Young Actors and Actresses"
22
+ And I press "Continue"
23
+ Then I should see "Your changes have been saved."
24
+ And I should see "Breckenridge"
25
+ # Then I should see "The First and Last names are required for all authors."
22
26
  # Then I should be on the edit document page for hydrus:test_object1
23
27
  # And the following should contain:
24
28
  # | Computing ID | 098556 |
@@ -26,13 +30,14 @@ Feature: Add a Contributor
26
30
  # | Last Name | Breckenridge |
27
31
  # | Department | Posture and Empathy |
28
32
  # | Institution | Academy for Aspiring Young Actors and Actresses |
29
-
30
- @nojs
31
- Scenario: Add an organization without javascript
32
- Given I am logged in as "archivist1@example.com"
33
- And I am on the edit document page for hydrangea:fixture_mods_article1
34
- When I follow "Add an Organization"
35
- And I fill in "Organization" with "American Film Academy"
33
+
34
+ # need to figure out the deal w/ organizations. Not in spec.
35
+ # @nojs
36
+ # Scenario: Add an organization without javascript
37
+ # Given I am logged in as "archivist1@example.com"
38
+ # And I am on the edit document page for hydrangea:fixture_mods_article1
39
+ # When I follow "Add an Organization"
40
+ # And I fill in "Organization" with "American Film Academy"
36
41
  # And I press "Add Organization"
37
42
  # Then I should be on the edit document page for hydrus:test_object1
38
43
  # And the "Organization" field should contain "American Film Academy"
@@ -0,0 +1,27 @@
1
+ Feature: Default Partials - Edit View
2
+ I want to see appropriate information in the edit view for (active) fedora objects that use the default partials
3
+
4
+ Scenario: In Edit View for Object Using Default Partials
5
+ Given I am logged in as "archivist1@example.com"
6
+ When I am on the edit document page for hydra:test_default_partials
7
+ Then I should see "hydra:test_default_partials"
8
+ And I should see "descMetadata"
9
+ And I should see "rightsMetadata"
10
+
11
+ Scenario: html5 valid - unauthenticated
12
+ When I am on the edit document page for hydra:test_default_partials
13
+ Then I should see "do not have sufficient privileges"
14
+ And the page should be HTML5 valid
15
+
16
+ Scenario: html5 valid - authenticated (read)
17
+ Given I am logged in as "public@nopermissions.com"
18
+ When I am on the edit document page for hydra:test_default_partials
19
+ Then I should see "do not have sufficient privileges"
20
+ And the page should be HTML5 valid
21
+
22
+ Scenario: html5 valid - authenticated (edit)
23
+ Given I am logged in as "archivist1@example.com"
24
+ When I am on the edit document page for hydra:test_default_partials
25
+ Then I should see "descMetadata"
26
+ And the page should be HTML5 valid
27
+
@@ -0,0 +1,22 @@
1
+ Feature: Default Partials in Search Results
2
+ I want to see appropriate information in search results for (active)fedora objects that use the default partials
3
+
4
+ Scenario: Have a Search Result that is an Object That Uses Default Partials
5
+ Given I am on the home page
6
+ And I fill in "q" with "default"
7
+ When I press "submit"
8
+ Then I should see a link to "the show document page for hydra:test_default_partials"
9
+
10
+ Scenario: html5 valid - unauthenticated
11
+ Given I am on the home page
12
+ And I fill in "q" with "default"
13
+ When I press "submit"
14
+ Then the page should be HTML5 valid
15
+
16
+ Scenario: html5 valid - authenticated
17
+ Given I am logged in as "archivist1@example.com"
18
+ And I am on the home page
19
+ And I fill in "q" with "default"
20
+ When I press "submit"
21
+ Then I should see a link to "the show document page for hydra:test_default_partials"
22
+ And the page should be HTML5 valid
@@ -0,0 +1,24 @@
1
+ Feature: Default Partials - Show View
2
+ I want to see appropriate information in the show view for objects that use the default partials
3
+
4
+ Scenario: In Show View for Object Using Default Partials
5
+ When I am on the show document page for hydra:test_default_partials
6
+ Then I should see "ID"
7
+ And I should see "Download"
8
+ And I should see "hydra:test_default_partials"
9
+
10
+ Scenario: html5 valid - unauthenticated
11
+ When I am on the show document page for hydra:test_default_partials
12
+ And the page should be HTML5 valid
13
+
14
+ Scenario: html5 valid - authenticated (read)
15
+ Given I am logged in as "public@nopermissions.com"
16
+ When I am on the show document page for hydra:test_default_partials
17
+ Then I should see "Download"
18
+ And the page should be HTML5 valid
19
+
20
+ Scenario: html5 valid - authenticated (edit)
21
+ Given I am logged in as "archivist1@example.com"
22
+ When I am on the show document page for hydra:test_default_partials
23
+ Then I should see "Download"
24
+ And the page should be HTML5 valid
@@ -7,34 +7,67 @@ Feature: Upload file into a document
7
7
  @nojs
8
8
  Scenario: Upload files on dataset edit page
9
9
  Given I am logged in as "archivist1@example.com"
10
- And I am on the edit document page for hydrangea:fixture_mods_dataset1
11
- And I attach the file "test_support/fixtures/image.jp2" to "Filedata"
12
- When I press "Upload File"
10
+ When I am on the edit files page for hydrangea:fixture_mods_dataset1
11
+ And I select "1" from "number_of_files"
12
+ And I press "Continue"
13
+ When I attach the file "test_support/fixtures/image.jp2" to "Filedata[]"
14
+ And I press "Upload File"
13
15
  Then I should see "The file image.jp2 has been saved"
14
- And I should see a link to "image.jp2" in the file assets list
16
+ # we shouldn't have to have the step below once we're displaying the contents of the previous steps.
17
+ When I follow "Switch to browse view"
18
+ Then I should see a link to "image.jp2" in the file assets list
15
19
 
16
20
  Scenario: Upload files on article edit page
17
21
  Given I am logged in as "archivist1@example.com"
18
- And I am on the edit document page for hydrangea:fixture_mods_article1
19
- And I attach the file "test_support/fixtures/image.jp2" to "Filedata"
20
- When I press "Upload File"
22
+ When I am on the edit files page for hydrangea:fixture_mods_article1
23
+ Then I select "1" from "number_of_files"
24
+ And I press "Continue"
25
+ When I attach the file "test_support/fixtures/image.jp2" to "Filedata[]"
26
+ And I press "Upload File"
21
27
  Then I should see "The file image.jp2 has been saved"
22
- And I should see a link to "image.jp2" in the file assets list
23
-
24
- @nojs
25
- Scenario: Upload files on file assets list page
28
+ # we shouldn't have to have the step below once we're displaying the contents of the previous steps.
29
+ When I follow "Switch to browse view"
30
+ Then I should see a link to "image.jp2" in the file assets list
31
+
32
+ Scenario: Not uploading files
26
33
  Given I am logged in as "archivist1@example.com"
27
- And I am on the file asset list page for hydrangea:fixture_mods_dataset1
28
- #Then show me the page
29
- And I attach the file "test_support/fixtures/image.jp2" to "Filedata"
30
- When I press "Upload File"
31
- Then I should see "The file image.jp2 has been saved"
32
- And I should see a link to "image.jp2" in the file assets list
34
+ When I am on the edit files page for hydrangea:fixture_mods_article1
35
+ Then I select "0" from "number_of_files"
36
+ And I press "Continue"
37
+ Then I should see "Group Permissions"
33
38
 
34
- Scenario: Upload files on file asset creation page
39
+ Scenario: html5 valid uploading files on edit page
35
40
  Given I am logged in as "archivist1@example.com"
36
- And I am on the file asset creation page for hydrangea:fixture_mods_dataset1
37
- And I attach the file "test_support/fixtures/image.jp2" to "Filedata"
41
+ When I am on the edit files page for hydrangea:fixture_mods_article1
42
+ Then the page should be HTML5 valid
43
+ And I select "1" from "number_of_files"
44
+ Then I press "Continue"
45
+ Then the page should be HTML5 valid
46
+ And I attach the file "test_support/fixtures/image.jp2" to "Filedata[]"
38
47
  When I press "Upload File"
39
- Then I should see "The file image.jp2 has been saved"
40
- And I should see a link to "image.jp2" in the file assets list
48
+ Then the page should be HTML5 valid
49
+
50
+ # Not sure if the file asset list is valid. Will the user ever actually be here?
51
+ # @nojs
52
+ # Scenario: Upload files on file assets list page
53
+ # Given I am logged in as "archivist1@example.com"
54
+ # And I am on the file asset list page for hydrangea:fixture_mods_dataset1
55
+ # And I attach the file "spec/fixtures/image.jp2" to "Filedata[]"
56
+ # When I press "Upload File"
57
+ # Then I should see "The file image.jp2 has been saved"
58
+ # And I should see a link to "image.jp2" in the file assets list
59
+ #
60
+ # Scenario: Upload files on file asset creation page
61
+ # Given I am logged in as "archivist1@example.com"
62
+ # And I am on the file asset creation page for hydrangea:fixture_mods_dataset1
63
+ # And I attach the file "spec/fixtures/image.jp2" to "Filedata[]"
64
+ # When I press "Upload File"
65
+ # Then I should see "The file image.jp2 has been saved"
66
+ # And I should see a link to "image.jp2" in the file assets list
67
+ #
68
+ # Scenario: html5 valid uploading files on file assets list page
69
+ # Given I am logged in as "archivist1@example.com"
70
+ # And I am on the file asset creation page for hydrangea:fixture_mods_article1
71
+ # And I attach the file "spec/fixtures/image.jp2" to "Filedata[]"
72
+ # When I press "Upload File"
73
+ # Then the page should be HTML5 valid
@@ -0,0 +1,7 @@
1
+ Feature: GenericContent Create View
2
+ I want to see appropriate information for creating GenericContent objects
3
+
4
+ Scenario: html5 valid
5
+ Given I am logged in as "archivist1@example.com"
6
+ When I create a new generic_content
7
+ Then the page should be HTML5 valid
@@ -0,0 +1,21 @@
1
+ Feature: GenericContent Edit View
2
+ I want to see appropriate information for editing GenericContent objects
3
+
4
+ Scenario: In Edit View for GenericContent object
5
+ When I am on the edit document page for hydra:test_generic_content
6
+ Then I should see "A test object using the GenericContent (active)fedora model"
7
+
8
+ Scenario: html5 valid - unauthenticated
9
+ When I am on the edit document page for hydra:test_generic_content
10
+ Then the page should be HTML5 valid
11
+
12
+ Scenario: html5 valid - authenticated (read)
13
+ Given I am logged in as "public@nopermissions.com"
14
+ When I am on the edit document page for hydra:test_generic_content
15
+ Then the page should be HTML5 valid
16
+
17
+ Scenario: html5 valid - authenticated (edit)
18
+ Given I am logged in as "archivist1@example.com"
19
+ When I am on the edit document page for hydra:test_generic_content
20
+ Then the page should be HTML5 valid
21
+
@@ -0,0 +1,22 @@
1
+ Feature: GenericContent Search Results
2
+ I want to see appropriate information for GenericContent objects in a search result
3
+
4
+ Scenario: Have a GenericContent Search Result
5
+ Given I am on the home page
6
+ And I fill in "q" with "generic content"
7
+ When I press "submit"
8
+ Then I should see a link to "the show document page for hydra:test_generic_content"
9
+
10
+ Scenario: html5 valid - unauthenticated
11
+ Given I am on the home page
12
+ And I fill in "q" with "generic content"
13
+ When I press "submit"
14
+ Then the page should be HTML5 valid
15
+
16
+ Scenario: html5 valid - authenticated
17
+ Given I am logged in as "archivist1@example.com"
18
+ And I am on the home page
19
+ And I fill in "q" with "generic content"
20
+ When I press "submit"
21
+ Then the page should be HTML5 valid
22
+
@@ -0,0 +1,20 @@
1
+ Feature: GenericContent Show View
2
+ I want to see appropriate information for GenericContent objects in the show view
3
+
4
+ Scenario: In Show View for GenericContent Object
5
+ When I am on the show document page for hydra:test_generic_content
6
+ Then I should see "A test object using the GenericContent (active)fedora model"
7
+
8
+ Scenario: html5 valid - unauthenticated
9
+ When I am on the show document page for hydra:test_generic_content
10
+ Then the page should be HTML5 valid
11
+
12
+ Scenario: html5 valid - authenticated (read)
13
+ Given I am logged in as "public@nopermissions.com"
14
+ When I am on the show document page for hydra:test_generic_content
15
+ Then the page should be HTML5 valid
16
+
17
+ Scenario: html5 valid - authenticated (edit)
18
+ Given I am logged in as "archivist1@example.com"
19
+ When I am on the show document page for hydra:test_generic_content
20
+ Then the page should be HTML5 valid
@@ -0,0 +1,7 @@
1
+ Feature: GenericImage Create View
2
+ I want to see appropriate information for creating GenericImage objects
3
+
4
+ Scenario: html5 valid
5
+ Given I am logged in as "archivist1@example.com"
6
+ When I create a new generic_image
7
+ Then the page should be HTML5 valid
@@ -0,0 +1,21 @@
1
+ Feature: GenericImage Edit View
2
+ I want to see appropriate information for editing GenericImage objects
3
+
4
+ Scenario: In Edit View for GenericImage Object
5
+ When I am on the edit document page for hydra:test_generic_image
6
+ Then I should see "A test object using the GenericImage (active)fedora model"
7
+
8
+ Scenario: html5 valid - unauthenticated
9
+ When I am on the edit document page for hydra:test_generic_image
10
+ Then the page should be HTML5 valid
11
+
12
+ Scenario: html5 valid - authenticated (read)
13
+ Given I am logged in as "public@nopermissions.com"
14
+ When I am on the edit document page for hydra:test_generic_image
15
+ Then the page should be HTML5 valid
16
+
17
+ Scenario: html5 valid - authenticated (edit)
18
+ Given I am logged in as "archivist1@example.com"
19
+ When I am on the edit document page for hydra:test_generic_image
20
+ Then the page should be HTML5 valid
21
+
@@ -0,0 +1,22 @@
1
+ Feature: GenericImage Search Results
2
+ I want to see appropriate information for GenericImage objects in a search result
3
+
4
+ Scenario: Have a GenericImage Search Result
5
+ Given I am on the home page
6
+ And I fill in "q" with "generic image"
7
+ When I press "submit"
8
+ Then I should see a link to "the show document page for hydra:test_generic_image"
9
+
10
+ Scenario: html5 valid - unauthenticated
11
+ Given I am on the home page
12
+ And I fill in "q" with "generic image"
13
+ When I press "submit"
14
+ Then the page should be HTML5 valid
15
+
16
+ Scenario: html5 valid - authenticated
17
+ Given I am logged in as "archivist1@example.com"
18
+ And I am on the home page
19
+ And I fill in "q" with "generic image"
20
+ When I press "submit"
21
+ Then the page should be HTML5 valid
22
+
@@ -0,0 +1,20 @@
1
+ Feature: GenericImage Show View
2
+ I want to see appropriate information for GenericImage objects in the show view
3
+
4
+ Scenario: In Show View for GenericImage Object
5
+ When I am on the show document page for hydra:test_generic_image
6
+ Then I should see "A test object using the GenericImage (active)fedora model"
7
+
8
+ Scenario: html5 valid - unauthenticated
9
+ When I am on the show document page for hydra:test_generic_image
10
+ Then the page should be HTML5 valid
11
+
12
+ Scenario: html5 valid - authenticated (read)
13
+ Given I am logged in as "public@nopermissions.com"
14
+ When I am on the show document page for hydra:test_generic_image
15
+ Then the page should be HTML5 valid
16
+
17
+ Scenario: html5 valid - authenticated (edit)
18
+ Given I am logged in as "archivist1@example.com"
19
+ When I am on the show document page for hydra:test_generic_image
20
+ Then the page should be HTML5 valid
@@ -0,0 +1,43 @@
1
+ Feature: HTML validity
2
+ In order to verify that the application in HTML5 valid
3
+ As a user
4
+ I want to the pages to conform to the W3C HTML5 validation
5
+
6
+ Scenario: Home page (unauthenticated)
7
+ When I am on the home page
8
+ Then the page should be HTML5 valid
9
+
10
+ Scenario: Home page (authenticated)
11
+ Given I am logged in as "archivist1@example.com"
12
+ When I am on the home page
13
+ Then the page should be HTML5 valid
14
+
15
+ Scenario: Search Results (unauthenticated)
16
+ Given I am on the home page
17
+ When I follow "Article"
18
+ Then I should see "TITLE OF HOST JOURNAL"
19
+ And the page should be HTML5 valid
20
+
21
+ Scenario: Search Results (authenticated)
22
+ Given I am logged in as "archivist1@example.com"
23
+ When I am on the home page
24
+ And I follow "Article"
25
+ Then I should see "TITLE OF HOST JOURNAL"
26
+ And the page should be HTML5 valid
27
+
28
+ Scenario: Record view browse (unauthenticated)
29
+ Given I am on the show document page for hydrangea:fixture_mods_article2
30
+ Then I should see "TITLE OF HOST JOURNAL"
31
+ And the page should be HTML5 valid
32
+
33
+ Scenario: Record view browse (authenticated)
34
+ Given I am logged in as "archivist1@example.com"
35
+ When I am on the show document page for hydrangea:fixture_mods_article2
36
+ Then I should see "TITLE OF HOST JOURNAL"
37
+ And the page should be HTML5 valid
38
+
39
+ Scenario: Record view edit (authenticated)
40
+ Given I am logged in as "archivist1@example.com"
41
+ When I am on the edit publication page for hydrangea:fixture_mods_article1
42
+ Then the "journal_0_title_info_main_title" field should contain "TITLE OF HOST JOURNAL"
43
+ And the page should be HTML5 valid
@@ -18,19 +18,11 @@ Feature: Edit Article Contributors
18
18
  # And the "Last Name" field for "person_1" should contain "Lacks"
19
19
  # And the "Role" field for "person_1" should contain "Contributor"
20
20
  # And the "Institution" field for "person_1" should contain "Baltimore"
21
- Then I should see "Henrietta"
22
- And I should see "Lacks"
21
+ Then the "First Name" field within "#person_1" should contain "Henrietta"
22
+ And the "Last Name" field within "#person_1" should contain "Lacks"
23
23
  # And I should see "Contributor" within "select[rel=person_1_role_text]" # Author roles are implicit
24
- And I should see "Baltimore"
24
+ And the "Institution" field within "#person_1" should contain "Baltimore"
25
25
  And I should see a delete contributor button for "the 2nd person entry in hydrangea:fixture_mods_article1"
26
-
27
- Then I should see "NSF"
28
- And I should see "Funder" within "select[rel=organization_0_role_text]"
29
- And I should see a delete contributor button for "the 1st organization entry in hydrangea:fixture_mods_article1"
30
-
31
- Then I should see "some conference"
32
- And I should see "Host" within "select[rel=conference_0_role_text]"
33
- And I should see a delete contributor button for "the 1st conference entry in hydrangea:fixture_mods_article1"
34
26
 
35
27
  @local
36
28
  Scenario: Viewing contributors in edit mode
@@ -60,13 +52,14 @@ Feature: Edit Article Contributors
60
52
  And I should see "Baltimore"
61
53
  And I should not see a delete contributor button for "the 2nd person entry in hydrangea:fixture_mods_article1"
62
54
 
63
- Then I should see "NSF"
64
- And I should see "Funder" within "#organization_0"
65
- And I should not see a delete contributor button for "the 1st organization entry in hydrangea:fixture_mods_article1"
55
+ # The following 6 lines are commented out due to the organization being removed from the contributors forms in the Mods Asset Workflow document
56
+ #Then the "organization_0_namePart" field should contain "NSF"
57
+ #And I should see "Funder" within "#organization_0"
58
+ #And I should not see a delete contributor button for "the 1st organization entry in hydrangea:fixture_mods_article1"
66
59
 
67
- Then I should see "some conference"
68
- And I should see "Host" within "#conference_0"
69
- And I should not see a delete contributor button for "the 1st conference entry in hydrangea:fixture_mods_article1"
60
+ #Then I should see "some conference"
61
+ #And I should see "Host" within "#conference_0"
62
+ #And I should not see a delete contributor button for "the 1st conference entry in hydrangea:fixture_mods_article1"
70
63
 
71
64
  @local
72
65
  Scenario: Viewing contributors in browse mode
@@ -76,5 +69,20 @@ Feature: Edit Article Contributors
76
69
  And I should see "Author" within ".contributor_role"
77
70
  And I should see "University of Virginia" within "#contributors_list"
78
71
  And I should not see a delete contributor button for "the 1st person entry in libra-oa:1"
79
-
80
-
72
+
73
+ Scenario: Deleting contributors
74
+ Given I am logged in as "archivist1@example.com"
75
+ When I am on the edit contributor page for libra-oa:1
76
+ And I press "Add Another Author"
77
+ When I fill in "person_1_computing_id" with "012345"
78
+ And I fill in "person_1_first_name" with "Jane"
79
+ And I fill in "person_1_last_name" with "Dough"
80
+ Then the "person_1_last_name" field within "#person_1" should contain "Dough"
81
+ And I fill in "person_1_description" with "Pizza Chef"
82
+ And I fill in "person_1_institution" with "Academy for Aspiring Young Pizza Chefs"
83
+ When I press "Continue"
84
+ And I am on the edit contributor page for libra-oa:1
85
+ Then the "person_1_last_name" field within "#person_1" should contain "Dough"
86
+ When I follow "Delete"
87
+ And I press "Continue"
88
+ Then I should not see "Dough"
@@ -1,12 +1,17 @@
1
1
  @new @dataset
2
- Feature: Add a new Dataset
3
- In order to publish a Dataset
2
+ Feature: ModsAsset Create View
4
3
  As a Depositor
5
- I want to submit a new MODS Asset
4
+ I want to see appropriate information for creating ModsAsset objects
5
+ In order to submit a new MODS Asset
6
6
 
7
- Scenario: Visit New MODS Asset Page
7
+ Scenario: Create Workflow for New ModsAsset Object
8
8
  Given I am logged in as "archivist1@example.com"
9
- And I am on the home page
10
- And I create a new mods_asset
11
- Then I should see "Describe the Asset"
12
- And the "title_info_main_title" field should contain ""
9
+ When I create a new mods_asset
10
+ Then I should see "Created a Mods Asset"
11
+ And I should see "Now it's ready to be edited."
12
+ And the "person_0_first_name" field should contain ""
13
+
14
+ Scenario: html5 valid
15
+ Given I am logged in as "archivist1@example.com"
16
+ When I create a new mods_asset
17
+ Then the page should be HTML5 valid
@@ -1,33 +1,65 @@
1
1
  @edit @articles
2
- Feature: Edit a document
3
- In order to [goal]
4
- [stakeholder]
5
- wants [behaviour]
2
+ Feature: Edit a ModsAsset object
3
+ As a Depositor
4
+ I want to see appropriate information for editing ModsAsset objects
6
5
 
7
- Scenario: Visit Document Edit Page
6
+ Scenario: Edit Page for Mods Asset
8
7
  Given I am logged in as "archivist1@example.com"
9
8
  And I am on the edit document page for hydrangea:fixture_mods_article1
10
- Then I should see "ARTICLE TITLE" within "#title_fieldset"
11
- And I should see a "Save Description" button
9
+ Then the "person_0_first_name" field should contain "GIVEN NAMES"
10
+ And I should see a "Continue" button
12
11
 
13
12
  Scenario: Visit Document Edit Page and see the file assets
14
13
  Given I am logged in as "archivist1@example.com"
15
- And I am on the edit document page for libra-oa:1
16
- Then I should see "The Smallest Victims of the " within "#title_fieldset"
14
+ And I am on the edit files page for libra-oa:1
15
+ And I select "1" from "number_of_files"
16
+ And I press "Continue"
17
+ # Then the "title_info_main_title" field should contain "The Smallest Victims of the "
17
18
  Then I should see "gibson.pdf" within "tr.file_asset"
18
- And I should see a delete button for "libra-oa:1"
19
+ And I should see "Delete" in the file assets list
19
20
 
20
21
  Scenario: Viewing browse/edit buttons
21
22
  Given I am logged in as "archivist1@example.com"
22
- And I am on the edit document page for hydrangea:fixture_mods_article1
23
- Then I should see a "span" tag with a "class" attribute of "edit-browse"
23
+ When I am on the edit document page for hydrangea:fixture_mods_article1
24
+ Then I should see a "div" tag with a "class" attribute of "edit-browse"
25
+
26
+ Scenario: Entering a non-valid embargo date
27
+ Given I am logged in as "archivist1@example.com"
28
+ When I am on the edit additional_info page for hydrangea:fixture_mods_article1
29
+ And I fill in "embargo_embargo_release_date" with "25-25-25"
30
+ And I press "Continue"
31
+ Then I should see "You must enter a valid release date."
32
+
33
+ Scenario: Entering different date formats for embargo
34
+ Given I am logged in as "archivist1@example.com"
35
+ When I am on the edit additional_info page for hydrangea:fixture_mods_article1
36
+ And I fill in "embargo_embargo_release_date" with "11/1/2010"
37
+ When I press "Continue"
38
+ And I am on the edit additional_info page for hydrangea:fixture_mods_article1
39
+ Then the "embargo_embargo_release_date" field within "#release_date_field" should contain "2010-11-01"
40
+ When I fill in "embargo_embargo_release_date" with "November 1st 2010"
41
+ And I press "Continue"
42
+ When I am on the edit additional_info page for hydrangea:fixture_mods_article1
43
+ Then the "embargo_embargo_release_date" field within "#release_date_field" should contain "2010-11-01"
44
+ # The last 2 lines are just clean up.
45
+ Then I fill in "embargo_embargo_release_date" with ""
46
+ And I press "Continue"
47
+
48
+ Scenario: Save and Finish
49
+ Given I am logged in as "archivist1@example.com"
50
+ When I am on the edit additional_info page for hydrangea:fixture_mods_article1
51
+ When I press "Save and Finish"
52
+ Then I should see "Switch to edit view"
53
+ And I should see "Your object has been saved"
24
54
 
55
+ Scenario: html5 valid
56
+ Given I am logged in as "archivist1@example.com"
57
+ When I am on the edit document page for hydrangea:fixture_mods_article1
58
+ Then the page should be HTML5 valid
25
59
 
26
60
  # the mockups for Libra did not have a delete confirmation
27
61
  @overwritten
28
62
  Scenario: Delete Confirmation on Edit Page
29
63
  Given I am logged in as "archivist1@example.com"
30
- And I am on the edit document page for hydrangea:fixture_mods_article1
31
- Then I should see a "div" tag with an "id" attribute of "delete_dialog_container"
32
- And I should see "Permanently delete"
33
-
64
+ When I am on the edit document page for hydrangea:fixture_mods_article1
65
+ Then I should see a "div" tag with a "class" attribute of "delete-asset"
@@ -6,5 +6,10 @@ Feature: Edit an article without permission
6
6
 
7
7
  Scenario: Visit Document Edit Page
8
8
  Given I am logged in as "archivist1@example.com"
9
- And I am on the edit document page for hydrangea:fixture_mods_article2
9
+ When I am on the edit document page for hydrangea:fixture_mods_article2
10
10
  Then I should see a "div" tag with a "class" attribute of "notice"
11
+
12
+ Scenario: Authenticated but not Authorized to Edit
13
+ Given I am logged in as "archivist1@example.com"
14
+ When I am on the edit document page for hydrangea:fixture_mods_article2
15
+ Then the page should be HTML5 valid