atrium 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (382) hide show
  1. data/.gitignore +9 -1
  2. data/.rspec +2 -0
  3. data/.rvmrc +1 -1
  4. data/CONTRIBUTING.md +73 -0
  5. data/Gemfile +27 -2
  6. data/Gemfile.lock +122 -246
  7. data/Guardfile +40 -10
  8. data/LICENSE +14 -0
  9. data/README.mkd +23 -39
  10. data/ROADMAP.mkd +41 -9
  11. data/Rakefile +39 -4
  12. data/app/assets/images/atrium/remove.png +0 -0
  13. data/app/assets/images/atrium/white-arrow.png +0 -0
  14. data/app/assets/javascripts/{atrium/atrium.js → atrium.js} +8 -153
  15. data/app/assets/stylesheets/{atrium/atrium.css → atrium.css} +110 -37
  16. data/app/assets/stylesheets/atrium/collections.css +4 -0
  17. data/app/assets/stylesheets/atrium/descriptions.css +4 -0
  18. data/app/assets/stylesheets/atrium/exhibits.css +4 -0
  19. data/app/assets/stylesheets/atrium/reset.css +69 -0
  20. data/app/assets/stylesheets/atrium/showcases.css +4 -0
  21. data/app/assets/stylesheets/atrium/theme.css +248 -0
  22. data/app/controllers/atrium/application_controller.rb +12 -0
  23. data/app/controllers/atrium/browse_levels_controller.rb +22 -0
  24. data/app/controllers/atrium/collections_controller.rb +42 -138
  25. data/app/controllers/atrium/descriptions_controller.rb +27 -146
  26. data/app/controllers/atrium/exhibits_controller.rb +51 -77
  27. data/app/controllers/atrium/order_controller.rb +74 -0
  28. data/app/controllers/atrium/showcases_controller.rb +96 -117
  29. data/app/helpers/atrium/application_helper.rb +8 -0
  30. data/app/helpers/atrium/collections_helper.rb +44 -0
  31. data/app/helpers/atrium/descriptions_helper.rb +4 -0
  32. data/app/helpers/atrium/exhibits_helper.rb +4 -0
  33. data/app/helpers/atrium/showcases_helper.rb +34 -0
  34. data/app/models/atrium/browse_level.rb +21 -11
  35. data/app/models/atrium/collection.rb +70 -36
  36. data/app/models/atrium/configuration.rb +66 -0
  37. data/app/models/atrium/description.rb +39 -88
  38. data/app/models/atrium/essay.rb +4 -5
  39. data/app/models/atrium/exhibit.rb +28 -19
  40. data/app/models/atrium/is_showcased_mixin.rb +34 -0
  41. data/app/models/atrium/query_param_mixin.rb +105 -0
  42. data/app/models/atrium/search/facet.rb +14 -25
  43. data/app/models/atrium/search/facet_selection.rb +10 -12
  44. data/app/models/atrium/showcase.rb +105 -95
  45. data/app/models/atrium/showcase/facet_selection.rb +18 -18
  46. data/app/models/atrium/showcase/featured_selection.rb +15 -0
  47. data/app/services/browse_level_evaluation_service.rb +131 -0
  48. data/app/services/current_filter_query_params_extraction_service.rb +91 -0
  49. data/app/services/navigation_tree.rb +13 -0
  50. data/app/services/params_adaptor_for_filter.rb +18 -0
  51. data/app/views/atrium/collections/_form.html.erb +149 -72
  52. data/app/views/atrium/collections/_head.html.erb +3 -0
  53. data/app/views/atrium/collections/edit.html.erb +1 -4
  54. data/app/views/atrium/collections/index.html.erb +14 -0
  55. data/app/views/atrium/collections/new.html.erb +2 -5
  56. data/app/views/atrium/collections/show.html.erb +11 -29
  57. data/app/views/atrium/descriptions/_form.html.erb +47 -49
  58. data/app/views/atrium/descriptions/edit.html.erb +1 -2
  59. data/app/views/atrium/descriptions/index.html.erb +2 -8
  60. data/app/views/atrium/descriptions/new.html.erb +2 -1
  61. data/app/views/atrium/descriptions/show.html.erb +2 -20
  62. data/app/views/atrium/exhibits/_exhibit.html.erb +1 -0
  63. data/app/views/atrium/exhibits/_form.html.erb +143 -96
  64. data/app/views/atrium/exhibits/edit.html.erb +1 -8
  65. data/app/views/atrium/exhibits/index.html.erb +2 -0
  66. data/app/views/atrium/exhibits/new.html.erb +0 -5
  67. data/app/views/atrium/exhibits/show.html.erb +2 -34
  68. data/app/views/atrium/showcases/_configure_menu.html.erb +55 -0
  69. data/app/views/atrium/showcases/_form.html.erb +40 -0
  70. data/app/views/atrium/showcases/edit.html.erb +3 -0
  71. data/app/views/atrium/showcases/index.html.erb +32 -0
  72. data/app/views/atrium/showcases/new.html.erb +3 -0
  73. data/app/views/atrium/showcases/show.html.erb +2 -1
  74. data/app/views/layouts/atrium.html.erb +16 -24
  75. data/app/views/layouts/atrium/application.html.erb +49 -0
  76. data/app/views/layouts/atrium/themes/default.html.erb +15 -0
  77. data/app/views/shared/_list_searchs.html.erb +4 -0
  78. data/app/views/shared/_navigation.html.erb +19 -0
  79. data/atrium.gemspec +31 -64
  80. data/config/routes.rb +40 -10
  81. data/{lib/generators/atrium/templates/migrations/create_atrium_collections.rb → db/migrate/20120730170406_create_atrium_collections.rb} +2 -1
  82. data/{lib/generators/atrium/templates/migrations/create_atrium_showcases.rb → db/migrate/20120731134846_create_atrium_showcases.rb} +3 -4
  83. data/{lib/generators/atrium/templates/migrations/create_atrium_exhibits.rb → db/migrate/20120731134856_create_atrium_exhibits.rb} +2 -1
  84. data/{lib/generators/atrium/templates/migrations/create_atrium_descriptions.rb → db/migrate/20120731134904_create_atrium_descriptions.rb} +2 -1
  85. data/{lib/generators/atrium/templates/migrations/create_atrium_essays.rb → db/migrate/20120731135534_create_atrium_essays.rb} +3 -2
  86. data/{lib/generators/atrium/templates/migrations/create_atrium_search_facets.rb → db/migrate/20120731135721_create_atrium_search_facets.rb} +1 -1
  87. data/{lib/generators/atrium/templates/migrations/create_atrium_showcase_facet_selections.rb → db/migrate/20120731140621_create_atrium_showcase_facet_selections.rb} +6 -2
  88. data/{lib/generators/atrium/templates/migrations/create_atrium_browse_levels.rb → db/migrate/20120801145241_create_atrium_browse_levels.rb} +1 -1
  89. data/db/migrate/20120820183808_create_selected_items.rb +16 -0
  90. data/db/migrate/20120823135716_update_atrium_collection_indices.rb +13 -0
  91. data/db/migrate/20120823143315_add_lookup_indices_as_required.rb +11 -0
  92. data/lib/atrium.rb +40 -36
  93. data/lib/atrium/engine.rb +4 -8
  94. data/lib/atrium/exceptions.rb +10 -0
  95. data/lib/atrium/version.rb +2 -2
  96. data/lib/generators/atrium/install/USAGE +8 -0
  97. data/lib/generators/atrium/install/install_generator.rb +86 -0
  98. data/lib/generators/atrium/install/templates/atrium_initializer.rb +21 -0
  99. data/lib/generators/atrium/install/templates/controllers/atrium_base_controller.rb +18 -0
  100. data/lib/generators/atrium/install/templates/controllers/collections_controller.rb +40 -0
  101. data/lib/generators/atrium/install/templates/controllers/descriptions_controller.rb +36 -0
  102. data/lib/generators/atrium/install/templates/controllers/exhibits_controller.rb +47 -0
  103. data/lib/generators/atrium/install/templates/controllers/selected_items_controller.rb +26 -0
  104. data/lib/generators/atrium/install/templates/helpers/application_helper.rb +42 -0
  105. data/lib/generators/atrium/install/templates/helpers/collections_helper.rb +15 -0
  106. data/lib/generators/atrium/install/templates/helpers/navigation_helper.rb +62 -0
  107. data/lib/generators/atrium/install/templates/helpers/solr_helper.rb +138 -0
  108. data/lib/generators/atrium/install/templates/models/selected_item.rb +7 -0
  109. data/lib/generators/atrium/install/templates/views/collections/_document.html.erb +19 -0
  110. data/lib/generators/atrium/install/templates/views/collections/_exhibits.html.erb +3 -0
  111. data/lib/generators/atrium/install/templates/views/collections/_pagination.html.erb +6 -0
  112. data/lib/generators/atrium/install/templates/views/collections/browse.html.erb +16 -0
  113. data/lib/generators/atrium/install/templates/views/collections/show.html.erb +19 -0
  114. data/lib/generators/atrium/install/templates/views/descriptions/show.html.erb +8 -0
  115. data/lib/generators/atrium/install/templates/views/exhibits/_document.html.erb +19 -0
  116. data/lib/generators/atrium/install/templates/views/exhibits/_pagination.html.erb +6 -0
  117. data/lib/generators/atrium/install/templates/views/exhibits/show.html.erb +28 -0
  118. data/lib/generators/atrium/install/templates/views/folder/_selected_items_form.html.erb +8 -0
  119. data/lib/generators/atrium/install/templates/views/folder/index.html.erb +45 -0
  120. data/lib/generators/atrium/install/templates/views/shared/_document_list.html.erb +14 -0
  121. data/lib/generators/atrium/install/templates/views/shared/_featured_sources.html.erb +19 -0
  122. data/lib/generators/atrium/install/templates/views/shared/_list_descriptions.html.erb +25 -0
  123. data/lib/generators/atrium/install/templates/views/shared/_masthead.html.erb +19 -0
  124. data/lib/generators/atrium/install/templates/views/shared/_navigation_browse_level.html.erb +34 -0
  125. data/lib/generators/atrium/install/templates/views/shared/_showcases.html.erb +12 -0
  126. data/lib/generators/atrium/install/templates/views/shared/_side_bar_navigation.html.erb +20 -0
  127. data/lib/generators/atrium/service/USAGE +9 -0
  128. data/lib/generators/atrium/service/service_generator.rb +16 -0
  129. data/lib/generators/atrium/service/templates/service.rb.erb +2 -0
  130. data/lib/generators/atrium/service/templates/service_spec.rb.erb +4 -0
  131. data/lib/generators/atrium/theme/USAGE +8 -0
  132. data/lib/generators/atrium/theme/templates/theme.html.erb +14 -0
  133. data/lib/generators/atrium/theme/theme_generator.rb +11 -0
  134. data/lib/tasks/atrium_tasks.rake +4 -0
  135. data/script/rails +10 -0
  136. data/spec/atrium_spec.rb +10 -0
  137. data/spec/controllers/atrium/application_controller_spec.rb +7 -0
  138. data/spec/controllers/atrium/collections_controller_spec.rb +125 -0
  139. data/spec/controllers/atrium/descriptions_controller_spec.rb +142 -0
  140. data/spec/controllers/atrium/exhibits_controller_spec.rb +102 -0
  141. data/spec/controllers/atrium/order_controller_spec.rb +100 -0
  142. data/spec/controllers/atrium/showcases_controller_spec.rb +217 -0
  143. data/spec/dummy/README.rdoc +261 -0
  144. data/spec/dummy/Rakefile +7 -0
  145. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  146. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  147. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  148. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  149. data/spec/dummy/app/mailers/.gitkeep +0 -0
  150. data/spec/dummy/app/models/.gitkeep +0 -0
  151. data/spec/dummy/app/models/collection.rb +3 -0
  152. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  153. data/spec/dummy/config.ru +4 -0
  154. data/spec/dummy/config/application.rb +59 -0
  155. data/spec/dummy/config/boot.rb +10 -0
  156. data/spec/dummy/config/database.yml +25 -0
  157. data/spec/dummy/config/environment.rb +5 -0
  158. data/spec/dummy/config/environments/development.rb +37 -0
  159. data/spec/dummy/config/environments/production.rb +67 -0
  160. data/spec/dummy/config/environments/test.rb +37 -0
  161. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  162. data/spec/dummy/config/initializers/inflections.rb +15 -0
  163. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  164. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  165. data/spec/dummy/config/initializers/session_store.rb +8 -0
  166. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  167. data/spec/dummy/config/locales/en.yml +5 -0
  168. data/spec/dummy/config/routes.rb +4 -0
  169. data/spec/dummy/db/schema.rb +124 -0
  170. data/spec/dummy/lib/assets/.gitkeep +0 -0
  171. data/spec/dummy/log/.gitkeep +0 -0
  172. data/spec/dummy/public/404.html +26 -0
  173. data/spec/dummy/public/422.html +26 -0
  174. data/spec/dummy/public/500.html +25 -0
  175. data/spec/dummy/public/favicon.ico +0 -0
  176. data/spec/dummy/script/rails +6 -0
  177. data/spec/dummy/test/fixtures/collections.yml +11 -0
  178. data/spec/dummy/test/unit/collection_test.rb +7 -0
  179. data/spec/factories/atrium_collections.rb +8 -0
  180. data/spec/factories/atrium_exhibits.rb +9 -0
  181. data/spec/factories/atrium_search_facets.rb +8 -0
  182. data/spec/factories/atrium_showcases.rb +25 -0
  183. data/spec/helpers/atrium/collections_helper_spec.rb +57 -0
  184. data/spec/helpers/atrium/showcases_helper_spec.rb +56 -0
  185. data/spec/models/atrium/browse_level_spec.rb +56 -0
  186. data/spec/models/atrium/collection_spec.rb +76 -0
  187. data/spec/models/atrium/configuration_spec.rb +114 -0
  188. data/spec/models/atrium/description_spec.rb +56 -0
  189. data/spec/models/atrium/essay_spec.rb +16 -0
  190. data/spec/models/atrium/exhibit_spec.rb +90 -0
  191. data/spec/models/atrium/search/facet_selection_spec.rb +23 -0
  192. data/{test_support/spec → spec}/models/atrium/search/facet_spec.rb +2 -4
  193. data/{test_support/spec → spec}/models/atrium/showcase/facet_selection_spec.rb +5 -5
  194. data/spec/models/atrium/showcase/featured_selection_spec.rb +18 -0
  195. data/spec/models/atrium/showcase_spec.rb +97 -0
  196. data/spec/services/browse_level_evaluation_service_spec.rb +33 -0
  197. data/spec/services/current_filter_query_params_extraction_service_spec.rb +34 -0
  198. data/spec/services/navigation_tree_spec.rb +18 -0
  199. data/spec/services/params_adaptor_for_filter_spec.rb +8 -0
  200. data/spec/spec_helper.rb +39 -0
  201. data/spec/support/accept_nested_attributes_for.rb +39 -0
  202. data/{test_support/spec → spec}/support/be_accessible_matcher.rb +0 -0
  203. data/{test_support/spec → spec}/support/be_routed_mixin.rb +0 -0
  204. data/spec/support/controller_hacks.rb +35 -0
  205. data/spec/support/routes.rb +5 -0
  206. data/spec/support/shared_examples/is_showcased_mixin.rb +20 -0
  207. data/spec/support/shared_examples/query_param_mixin.rb +179 -0
  208. data/{app/assets/stylesheets/atrium → vendor/assets/images}/chosen-sprite.png +0 -0
  209. data/{app → vendor}/assets/javascripts/chosen.jquery.js +0 -0
  210. data/{app → vendor}/assets/javascripts/ckeditor.warning.js +0 -0
  211. data/{app → vendor}/assets/javascripts/ckeditor/config.js.coffee +0 -0
  212. data/{app → vendor}/assets/javascripts/ckeditor/jquery.generateId.js +0 -0
  213. data/{app → vendor}/assets/javascripts/ckeditor/jquery.jeditable.ckeditor.js +0 -0
  214. data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/application_link.png +0 -0
  215. data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/dialogs/linkItem.js +0 -0
  216. data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/plugin.js +0 -0
  217. data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/ui_toolbar_pencil.png +0 -0
  218. data/vendor/assets/javascripts/jquery-ui-1.8.23.custom.min.js +41 -0
  219. data/vendor/assets/javascripts/jquery-ui-build.txt +8 -0
  220. data/{app → vendor}/assets/javascripts/jquery.jeditable.js +0 -0
  221. data/{app/assets/stylesheets/atrium → vendor/assets/stylesheets}/chosen.css +4 -4
  222. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  223. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  224. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  225. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  226. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  227. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  228. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  229. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  230. data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  231. data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  232. data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  233. data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  234. data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  235. data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  236. data/vendor/assets/stylesheets/ui-lightness/jquery-ui-1.8.23.custom.css +334 -0
  237. metadata +431 -949
  238. data/GETTING_STARTED.textile +0 -102
  239. data/app/assets/images/atrium/ajax-loader.gif +0 -0
  240. data/app/assets/images/atrium/lightbox-ico-loading.gif +0 -0
  241. data/app/assets/images/atrium/logo.png +0 -0
  242. data/app/assets/javascripts/jquery.colorbox.js +0 -864
  243. data/app/assets/stylesheets/colorbox.css +0 -42
  244. data/app/assets/stylesheets/controls.png +0 -0
  245. data/app/assets/stylesheets/loading.gif +0 -0
  246. data/app/controllers/atrium/base_controller.rb +0 -25
  247. data/app/controllers/atrium/collection_exhibit_order_controller.rb +0 -21
  248. data/app/controllers/atrium/customization_controller.rb +0 -41
  249. data/app/controllers/atrium/exhibit_facet_order_controller.rb +0 -19
  250. data/app/helpers/atrium/base_helper.rb +0 -6
  251. data/app/models/ability.rb +0 -14
  252. data/app/models/atrium/showcase/item.rb +0 -19
  253. data/app/models/role_mapper.rb +0 -23
  254. data/app/views/_user_util_links.html.erb +0 -25
  255. data/app/views/atrium/collections/_bookmark_control.html.erb +0 -25
  256. data/app/views/atrium/collections/_browse_index.html.erb +0 -20
  257. data/app/views/atrium/collections/_collection_items_index.html.erb +0 -10
  258. data/app/views/atrium/collections/_document.html.erb +0 -24
  259. data/app/views/atrium/collections/_document_list.html.erb +0 -6
  260. data/app/views/atrium/collections/_edit_navigation.html.erb +0 -20
  261. data/app/views/atrium/collections/_folder_control.html.erb +0 -12
  262. data/app/views/atrium/collections/_listing.html.erb +0 -18
  263. data/app/views/atrium/collections/_navigation.html.erb +0 -50
  264. data/app/views/atrium/collections/_results_pagination.html.erb +0 -9
  265. data/app/views/atrium/collections/_sort_and_per_page.html.erb +0 -23
  266. data/app/views/atrium/exhibits/_bookmark_control.html.erb +0 -25
  267. data/app/views/atrium/exhibits/_folder_control.html.erb +0 -12
  268. data/app/views/atrium/exhibits/_navigation.html.erb +0 -30
  269. data/app/views/atrium/showcases/_showcase_navigation.html.erb +0 -23
  270. data/app/views/catalog/_collection_home_text.html.erb +0 -6
  271. data/app/views/catalog/_constraints.html.erb +0 -9
  272. data/app/views/catalog/_default_collection_text.html.erb +0 -18
  273. data/app/views/catalog/_default_home_text.html.erb +0 -6
  274. data/app/views/catalog/_home_text.html.erb +0 -6
  275. data/app/views/catalog/_index_partials/_description.html.erb +0 -8
  276. data/app/views/catalog/_search_form.html.erb +0 -66
  277. data/app/views/catalog/_show_partials/_description.html.erb +0 -15
  278. data/app/views/catalog/browse_show.html.erb +0 -18
  279. data/app/views/catalog/index.html.erb +0 -41
  280. data/app/views/catalog/list_description.html.erb +0 -24
  281. data/app/views/catalog/list_item.html.erb +0 -3
  282. data/app/views/layouts/atrium_themes/default.html.erb +0 -4
  283. data/app/views/layouts/item_listing.html.erb +0 -36
  284. data/app/views/listing/_document.html.erb +0 -27
  285. data/app/views/listing/_document_list.html.erb +0 -3
  286. data/app/views/listing/_item_search.html.erb +0 -27
  287. data/app/views/shared/_banner.html.erb +0 -5
  288. data/app/views/shared/_collection_complete_list.html.erb +0 -33
  289. data/app/views/shared/_collection_search_form.html.erb +0 -12
  290. data/app/views/shared/_collection_title_header.html.erb +0 -3
  291. data/app/views/shared/_featured_sources.html.erb +0 -23
  292. data/app/views/shared/_list_descriptions.html.erb +0 -39
  293. data/app/views/shared/_navigation_browse_levels.html.erb +0 -34
  294. data/app/views/shared/_showcase_configure_menu.html.erb +0 -22
  295. data/app/views/shared/_top_navigation.html.erb +0 -9
  296. data/init.rb +0 -3
  297. data/lib/application_controller.rb +0 -24
  298. data/lib/atrium/application_helper.rb +0 -24
  299. data/lib/atrium/atrium_helper_behavior.rb +0 -159
  300. data/lib/atrium/catalog.rb +0 -203
  301. data/lib/atrium/collections_helper.rb +0 -172
  302. data/lib/atrium/controller.rb +0 -10
  303. data/lib/atrium/descriptions_helper.rb +0 -27
  304. data/lib/atrium/layout_helper.rb +0 -13
  305. data/lib/atrium/routes.rb +0 -100
  306. data/lib/atrium/solr_helper.rb +0 -440
  307. data/lib/generators/atrium/assets_generator.rb +0 -44
  308. data/lib/generators/atrium/atrium_generator.rb +0 -149
  309. data/lib/generators/atrium/cucumber_support_generator.rb +0 -29
  310. data/lib/generators/atrium/templates/config/role_map_cucumber.yml +0 -2
  311. data/lib/generators/atrium/templates/config/role_map_development.yml +0 -2
  312. data/lib/generators/atrium/templates/config/role_map_production.yml +0 -2
  313. data/lib/generators/atrium/templates/config/role_map_test.yml +0 -2
  314. data/lib/generators/atrium/templates/config/solr.yml +0 -10
  315. data/lib/generators/atrium/templates/db/seeds.rb +0 -87
  316. data/lib/generators/atrium/templates/migrations/create_atrium_showcase_items.rb +0 -17
  317. data/lib/generators/atrium/templates/themes/example.html.erb +0 -21
  318. data/lib/railties/all_tests.rake +0 -23
  319. data/lib/railties/atrium_cucumber.rake +0 -121
  320. data/lib/railties/index.rake +0 -37
  321. data/tasks/atrium.rake +0 -268
  322. data/tasks/atrium_rspec.rake +0 -91
  323. data/test_support/etc/Gemfile +0 -33
  324. data/test_support/etc/bundle_config +0 -3
  325. data/test_support/etc/rvmrc +0 -32
  326. data/test_support/features/atrium_collections.feature +0 -162
  327. data/test_support/features/atrium_exhibits.feature +0 -164
  328. data/test_support/features/step_definitions/atrium_collection_steps.rb +0 -102
  329. data/test_support/features/step_definitions/atrium_exhibit_steps.rb +0 -53
  330. data/test_support/features/step_definitions/bookmarks_steps.rb +0 -6
  331. data/test_support/features/step_definitions/error_steps.rb +0 -5
  332. data/test_support/features/step_definitions/folder_steps.rb +0 -27
  333. data/test_support/features/step_definitions/general_steps.rb +0 -50
  334. data/test_support/features/step_definitions/record_view_steps.rb +0 -12
  335. data/test_support/features/step_definitions/saved_searches_steps.rb +0 -22
  336. data/test_support/features/step_definitions/search_facets_steps.rb +0 -29
  337. data/test_support/features/step_definitions/search_history_steps.rb +0 -9
  338. data/test_support/features/step_definitions/search_result_steps.rb +0 -114
  339. data/test_support/features/step_definitions/search_steps.rb +0 -103
  340. data/test_support/features/step_definitions/user_steps.rb +0 -5
  341. data/test_support/features/step_definitions/web_steps.rb +0 -213
  342. data/test_support/features/support/env.rb +0 -67
  343. data/test_support/features/support/paths.rb +0 -76
  344. data/test_support/features/support/selectors.rb +0 -40
  345. data/test_support/fixtures/atrium_exhibits.yml +0 -3
  346. data/test_support/spec/controllers/atrium/base_controller_spec.rb +0 -13
  347. data/test_support/spec/controllers/atrium/collection_exhibit_order_controller_spec.rb +0 -29
  348. data/test_support/spec/controllers/atrium/collections_controller_spec.rb +0 -185
  349. data/test_support/spec/controllers/atrium/customization_controller_spec.rb +0 -38
  350. data/test_support/spec/controllers/atrium/descriptions_controller_spec.rb +0 -150
  351. data/test_support/spec/controllers/atrium/exhibit_facet_order_controller_spec.rb +0 -36
  352. data/test_support/spec/controllers/atrium/exhibits_controller_spec.rb +0 -192
  353. data/test_support/spec/controllers/atrium/showcases_controller_spec.rb +0 -219
  354. data/test_support/spec/helpers/atrium_collections_helper_spec.rb +0 -147
  355. data/test_support/spec/helpers/atrium_description_helper_spec.rb +0 -47
  356. data/test_support/spec/helpers/atrium_solr_helper_spec.rb +0 -522
  357. data/test_support/spec/models/atrium/browse_level_spec.rb +0 -31
  358. data/test_support/spec/models/atrium/collection_spec.rb +0 -30
  359. data/test_support/spec/models/atrium/description_spec.rb +0 -67
  360. data/test_support/spec/models/atrium/essay_spec.rb +0 -12
  361. data/test_support/spec/models/atrium/exhibit_spec.rb +0 -76
  362. data/test_support/spec/models/atrium/search/facet_selection_spec.rb +0 -24
  363. data/test_support/spec/models/atrium/search_facet_spec.rb +0 -54
  364. data/test_support/spec/models/atrium/showcase/item_spec.rb +0 -12
  365. data/test_support/spec/models/atrium/showcase_facet_selection_spec.rb +0 -65
  366. data/test_support/spec/models/atrium/showcase_spec.rb +0 -134
  367. data/test_support/spec/rcov.opts +0 -3
  368. data/test_support/spec/routing/atrium/collections_routing_spec.rb +0 -33
  369. data/test_support/spec/spec.opts +0 -4
  370. data/test_support/spec/spec_helper.rb +0 -47
  371. data/test_support/tmp/step_definitions/catalog_index_steps.rb +0 -14
  372. data/test_support/tmp/step_definitions/edit_document_steps.rb +0 -67
  373. data/test_support/tmp/step_definitions/hydra_metadata_steps.rb +0 -3
  374. data/test_support/tmp/step_definitions/hydra_steps.rb +0 -8
  375. data/test_support/tmp/step_definitions/search_steps.rb +0 -86
  376. data/test_support/tmp/step_definitions/searching_steps.rb +0 -22
  377. data/test_support/tmp/step_definitions/select_steps.rb +0 -8
  378. data/test_support/tmp/step_definitions/show_document_steps.rb +0 -73
  379. data/test_support/tmp/step_definitions/user_steps.rb +0 -15
  380. data/test_support/tmp/step_definitions/web_steps.rb +0 -273
  381. data/test_support/tmp/support/env.rb +0 -54
  382. data/test_support/tmp/support/paths.rb +0 -57
@@ -1,162 +0,0 @@
1
- @atrium_collections,@atrium_showcase
2
-
3
- Feature: Collections
4
- In order to create a custom browse of a collection
5
- As as user
6
- I want to create and configure an collection
7
-
8
- Scenario: Listing collections in home page
9
- Given User exists with a login of "test"
10
- Given I am on the home page
11
- #TODO how to handle if we have seeded collection
12
- Then I should see "Unnamed Collection"
13
-
14
- Scenario: Editor views the search results page and sees the add collection button
15
- Given User exists with a login of "test"
16
- Given I am on the home page
17
- Then I should see a "Create New Collection" button
18
-
19
- Scenario: Adding an Collection
20
- Given User exists with a login of "test"
21
- Given I am on the home page
22
- When I press "Create New Collection"
23
- Then I should be on the edit collection page for id 3
24
- And I should see a "h1" element containing "Editing Collection"
25
-
26
- Scenario: Configure a Collection
27
- Given User exists with a login of "test"
28
- Given "collection" exists with id 2
29
- And I am on the edit collection page for id 2
30
- And I fill in "atrium_collection_title" with "My Test Title"
31
- And I select "Format" from "atrium_collection_search_facet_names"
32
- And I press "Update Collection Configuration"
33
- Then I should see "My Test Title"
34
- And I should see select list "select#atrium_collection_search_facet_names" with "Format" selected
35
- When I am on the collection search page for id 2
36
- Then I should see a "h3" element containing "Format"
37
- And I should have "div.facet_limit" containing only 1 "h3"
38
-
39
-
40
- Scenario: Visiting collection scope page
41
- Given User exists with a login of "test"
42
- Given "collection" exists with id 1
43
- And I am on the edit collection page for id 1
44
- And I follow "Set Collection Scope"
45
- Then I should be on the catalog page
46
- And I should see a "div" tag with a "class" attribute of "ui-state-highlight"
47
- And I should see a "Set Collection Scope to Here" button
48
-
49
- Scenario: Adding a Scope to an collection
50
- Given User exists with a login of "test"
51
- Given "collection" exists with id 2
52
- And I am on the edit collection page for id 2
53
- And I follow "Set Collection Scope"
54
- And I should see a "Set Collection Scope to Here" button
55
- Then show me the page
56
- And I follow "Book"
57
- And I press "Set Collection Scope to Here"
58
- Then I should be on the edit collection page for id 2
59
- And I should see a "li" element containing "formatBook"
60
-
61
- Scenario: Adding Exhibit to Collection
62
- Given User exists with a login of "test"
63
- Given "collection" exists with id 1
64
- And I am on the edit collection page for id 1
65
- And I press "Add a Exhibit to this Collection"
66
- #TODO id will be different if we have seed data
67
- Then I should see "Exhibit 2"
68
- And I should see "Configure" link
69
-
70
- Scenario: Deleting Scope From collection
71
- Pending
72
-
73
- Scenario: Remove a Search Facet from existing collection
74
- pending
75
-
76
- Scenario: Follow Show collection Link from Configure collection Page
77
- Given User exists with a login of "test"
78
- Given "collection" exists with id 1
79
- And I am on the edit collection page for id 1
80
- And I follow "View Collection"
81
- Then I am on the collection home page for id 1
82
-
83
- Scenario: Validate Collection home page
84
- Given User exists with a login of "test"
85
- Given "collection" exists with id 1
86
- And I am on the collection home page for id 1
87
- Then I should see "Customize this page" link
88
- And I should see "Configure Collection" link
89
- And I should see a search field
90
- And I should see a "Search" button
91
-
92
- Scenario: Adding Showcase to Collection
93
- Given User exists with a login of "test"
94
- Given "collection" exists with id 1
95
- And I am on the collection home page for id 1
96
- And I follow "Customize this page"
97
- Then I should have showcase for collection with id 1
98
- And I should see "View this page" link
99
- And I should see "Select Featured Items" link
100
- And I should see "Add New Description" link
101
- And I should see "Stop Editing" link
102
-
103
- Scenario: Adding new description
104
- Given User exists with a login of "test"
105
- And I am on the collection home page for id 1
106
- And I follow "Customize this page"
107
- And I follow "Add New Description"
108
- Then I should have "essay" field
109
- And I should have "summary" field
110
- When I add "essay" with content "this is new description" to the collection with id "1"
111
- And "showcase" exists with id 1
112
- Then I am on the collection page with id 1 having showcase with id 1
113
- And I should see "Edit Description" link
114
- And I should see "Delete this description" link
115
- When I follow "Stop Editing"
116
- And I should see "this is new description"
117
-
118
- Scenario: Delete description
119
- Given User exists with a login of "test"
120
- Given "collection" exists with id 1
121
- And I am on the collection home page for id 1
122
- And I follow "Customize this page"
123
- And I follow "Add New Description"
124
- When I add "essay" with content "this is new description" to the collection with id "1"
125
- And I follow "Delete this description"
126
- When I follow "Stop Editing"
127
- And I should not see "essay"
128
-
129
- Scenario: Adding featured items to Collection
130
- Given User exists with a login of "test"
131
- Given "collection" exists with id 1
132
- And I am on the collection home page for id 1
133
- And I follow "Customize this page"
134
- And I follow "Select Featured Items"
135
- Then I should see a "h1" element containing "Select Featured Items"
136
- When I add record "2009373513" to featured to the "collection" with id "1" and facet ""
137
- Then I am on the collection page with id 1 having showcase with id 1
138
- Then show me the page
139
- And I should have link to "ci-an-zhou-bian" in featured list
140
- #
141
- Scenario: Adding description to Collection from solr items
142
- Given User exists with a login of "test"
143
- Given "collection" exists with id 1
144
- And I am on the collection home page for id 1
145
- And I follow "Customize this page"
146
- Then I should have showcase for collection with id 1
147
- When I follow "Add Description From Solr"
148
- Then I should see a "h1" element containing "Select Existing Description"
149
- When I add description with id "desc_solr:1" to collection with id "1" and facet ""
150
- Then I am on the collection page with id 1 having showcase with id 1
151
- And I should see description with title "Land Office Bank Currency" in description list
152
- When I follow "View this page"
153
- And I should see "Land Office Bank Currency"
154
-
155
- Scenario: Modifying featured items from Collection
156
- Pending
157
-
158
- Scenario: Delete Collection
159
- Given User exists with a login of "test"
160
- Given "collection" exists with id 1
161
- And I am on the edit collection page for id 1
162
- And I should see "Delete this Collection" link
@@ -1,164 +0,0 @@
1
- @atrium_exhibits
2
-
3
- Feature: Exhibits
4
- In order to create a custom browse exhibit
5
- As as user
6
- I want to create and configure an Exhibit within collection
7
-
8
- Scenario: Editing a title in a exhibit
9
- Given User exists with a login of "test"
10
- Given "collection" exists with id 2
11
- Given "exhibit" exists with id 2
12
- And I am on the edit collection page for id 2
13
- And I follow the "Configure" link for exhibit with id 2
14
- Then I am on the exhibit edit page for id 2
15
- When I fill in "atrium_exhibit_label" with "My Test Exhibit"
16
- And I press "Update Exhibit and Facets"
17
- Then I should see "My Test Exhibit"
18
-
19
- Scenario: Visiting exhibit scope page
20
- Given User exists with a login of "test"
21
- And I am on the exhibit edit page for id 2
22
- And I follow "Set Exhibit Scope"
23
- Then I should be on the catalog page
24
- And I should see a "div" tag with a "class" attribute of "ui-state-highlight"
25
- And I should see a "Set Exhibit Scope to Here" button
26
-
27
- ## this scenario requires Format facet to be set as Collection Search Facet
28
- Scenario: Adding a Scope to an Exhibit
29
- Given User exists with a login of "test"
30
- And I am on the exhibit edit page for id 1
31
- And I follow "Set Exhibit Scope"
32
- And I should see a "Set Exhibit Scope to Here" button
33
- And I follow "Book"
34
- And I press "Set Exhibit Scope to Here"
35
- Then I am on the exhibit edit page for id 1
36
- And I should see a "li" element containing "formatBook"
37
-
38
- Scenario: Add and Remove a Scope from exhibit
39
- Given User exists with a login of "test"
40
- And I am on the exhibit edit page for id 1
41
- And I follow "Set Exhibit Scope"
42
- And I should see a "Set Exhibit Scope to Here" button
43
- And I follow "Book"
44
- And I press "Set Exhibit Scope to Here"
45
- Then I should see a "li" element containing "formatBook"
46
- And I follow "Remove Exhibit Scope"
47
- Then I should not see a "li" element containing "formatBook"
48
-
49
- Scenario: Adding a solr facet to exhibit
50
- Given User exists with a login of "test"
51
- And I am on the exhibit edit page for id 2
52
- And I select "Language" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
53
- And I press "Add Facet"
54
- Then "Language" should not be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
55
- And "Format" should be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
56
-
57
- Scenario: Adding more than one solr facet to exhibit
58
- Given User exists with a login of "test"
59
- And I am on the exhibit edit page for id 2
60
- And I select "Language" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
61
- And I press "Add Facet"
62
- Then "Language" should not be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
63
- When I select "Format" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
64
- And I press "Add Facet"
65
- And "Format" should not be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
66
-
67
- # Need pre-defined exhibits with publication year facet selected, Right now it is part of the scenario
68
- Scenario: View exhibit in collection home page
69
- Given User exists with a login of "test"
70
- And I am on the exhibit edit page for id 2
71
- And I select "Publication Year" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
72
- And I press "Add Facet"
73
- When I am on the collection home page for id 2
74
- Then I should see a "div" tag with a "class" attribute of "facet-list"
75
- And I should see a "h3" element containing "Publication Year"
76
- And I should have "div.facet-list" containing only 2 "h3"
77
- When I follow "2008"
78
- Then I should have the applied solr facet "Publication Year" with the value "2008"
79
-
80
- Scenario: Browsing Nested Solr Facets on Exhibit from collection home page
81
- Given User exists with a login of "test"
82
- And I am on the exhibit edit page for id 2
83
- And I select "Publication Year" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
84
- And I press "Add Facet"
85
- Then "Publication Year" should not be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
86
- When I select "Language" from "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
87
- And I press "Add Facet"
88
- And "Language" should not be an option for "atrium_exhibit_browse_levels_attributes_0_solr_facet_name"
89
- When I am on the collection home page for id 2
90
- Then I should see a "div" tag with a "class" attribute of "facet-list"
91
- And I should see a "h3" element containing "Publication Year"
92
- When I follow "2008"
93
- Then I should have the applied solr facet "Publication Year" with the value "2008"
94
- And I should have "Language" facet inside "2008" facet
95
- When I follow "Tibetan"
96
- Then I should have the applied solr facet "Language" with the value "Tibetan"
97
-
98
- Scenario: Adding Showcase to selected facet
99
- Given User exists with a login of "test"
100
- When I am on the collection home page for id 1
101
- And I follow "2008"
102
- Then I should have the applied solr facet "Publication Year" with the value "2008"
103
- When I follow "Customize this page"
104
- Then I should have showcase for exhibit with id "1" and facet "2008"
105
- And I should see "View this page" link
106
- And I should see "Select Featured Items" link
107
- And I should see "Add New Description" link
108
- And I should see "Stop Editing" link
109
-
110
- Scenario: Adding description to Showcase of the selected facet
111
- Given User exists with a login of "test"
112
- When I am on the collection home page for id 1
113
- And I follow "2008"
114
- Then I should have the applied solr facet "Publication Year" with the value "2008"
115
- When I follow "Customize this page"
116
- Then I should have showcase for exhibit with id "1" and facet "2008"
117
- And I follow "Add New Description"
118
- Then I should have "essay" field
119
- And I should have "summary" field
120
- When I add "essay" with content "this is exhibit description for facet 2008" to the exhibit with id "2" and facet "2008"
121
- Then I am on the exhibit home page for id 1 with facet "2008"
122
- And I should see "Edit Description" link
123
- And I should see "Delete this description" link
124
- When I follow "Stop Editing"
125
- And I should see "this is exhibit description for facet 2008" within "blockquote.intro"
126
-
127
- Scenario: Adding featured to Showcase of the selected facet
128
- Given User exists with a login of "test"
129
- When I am on the collection home page for id 1
130
- And I follow "2008"
131
- Then I should have the applied solr facet "Publication Year" with the value "2008"
132
- When I follow "Customize this page"
133
- And I follow "Select Featured Items"
134
- Then I should see a "h1" element containing "Select Featured Items"
135
- When I add record "2007020969" to featured to the "Exhibit" with id "1" and facet "2008"
136
- Then I am on the exhibit home page for id 1 with facet "2008"
137
- And I should have link to "Strong Medicine speaks" in featured list
138
-
139
- #TODO this scenario is not clear to me
140
- Scenario: Add group by filter to facet in exhibit
141
- Pending
142
- #Given User exists with a login of "test"
143
- #And I am on the exhibit edit page for id 1
144
- #And I follow "Set Exhibit Scope"
145
- #And I should see a "Set Browse Level Scope to Here" button
146
- #And I follow "Book"
147
- #And I press "Set Browse Level Scope to Here"
148
-
149
- Scenario: Remove a exhibit
150
- pending
151
-
152
- Scenario: Add another exhibit
153
- pending
154
-
155
- Scenario: Toggle between view on one exhibit and another exhibit
156
- pending
157
-
158
-
159
-
160
- Scenario: View Exhibit with facet selected and showcase defined
161
-
162
-
163
-
164
-
@@ -1,102 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
2
-
3
- Given /^"([^"]*)" exists with id (\d+)$/ do |model_str, model_id|
4
- model_str = "atrium/"+model_str.gsub(/\s/, '_').singularize
5
- klass = eval(model_str.camelize)
6
- klass.find(model_id).should_not be_nil
7
- end
8
-
9
-
10
- Then /^I should see "([^"]*)" link(?: within "([^"]*)")?$/ do |link_locator, scope_selector|
11
- with_scope(scope_selector) do
12
- begin
13
- find_link(link_locator)
14
- rescue
15
- raise "no link with value or id or text '#{link_locator}' found"
16
- end
17
- end
18
- end
19
-
20
- Then /^I (should not|should) see an? "([^\"]*)" tag with an? "([^\"]*)" attribute of "([^\"]*)"$/ do |bool,tag,attribute,value|
21
- if bool == "should not"
22
- page.should_not have_xpath("//#{tag}[contains(@#{attribute}, #{value})]")
23
- else
24
- page.should have_xpath("//#{tag}[contains(@#{attribute}, #{value})]")
25
- end
26
- end
27
-
28
- Given /^User exists with a login of "([^\"]*)"$/ do |login|
29
- email = "#{login}@#{login}.com"
30
- User.find_by_email(email).should_not be_nil
31
- visit destroy_user_session_path
32
- visit new_user_session_path
33
- fill_in "Email", :with => email
34
- fill_in "Password", :with => "password"
35
- click_button "Sign in"
36
- step %{I should see "Log Out"}
37
- end
38
-
39
- Then /^I should have showcase for collection with id (\d+)$/ do |collection_id|
40
- collection= Atrium::Collection.find(collection_id)
41
- showcase= Atrium::Showcase.with_selected_facets(collection_id,collection.class.name, nil).first
42
- showcase.should_not be nil
43
- end
44
-
45
- Then /^I should have "([^\"]*)" field$/ do |field_name|
46
- page.should have_selector("textarea#atrium_description_#{field_name}_attributes_content")
47
- end
48
-
49
- When /^I add "([^"]*)" with content "([^"]*)" to the collection with id "([^"]*)"$/ do |field, content, collection_id|
50
- collection= Atrium::Collection.find(collection_id)
51
- showcase= Atrium::Showcase.with_selected_facets(collection_id,collection.class.name, nil).first
52
- fill_in "atrium_description_#{field}_attributes_content", :with => content
53
- click_button "Save"
54
- page.should have_content(content)
55
- visit atrium_collection_showcase_path(collection.id, showcase.id, nil)
56
- end
57
-
58
- When /^I (add|remove) record (.+) (to|from) featured for showcase with id (.+)$/ do |add_or_remove, id, wording,showcase_id|
59
- click_button("folder_submit_#{id}")
60
- showcase= Atrium::Showcase.find(showcase_id)
61
- asset= showcase.showcases_type.find(showcase.showcases_id)
62
- visit atrium_collection_atrium_showcases_path(asset, :showcase_id => showcase.id)
63
- end
64
-
65
- Then /^I should have link to "([^"]*)" in featured list$/ do |name|
66
- #puts "#{page.find("span#show_selected div#documents div.document h3.index_title a")['href'].inspect}"
67
- page.should have_selector("div#show-selected div#documents div.document h3.index_title", :content => name)
68
- end
69
-
70
- When /^I add record "([^"]*)" to featured to the "([^"]*)" with id "([^"]*)" and facet "([^"]*)"$/ do |record_id, collection_or_exhibit, id, facet|
71
- click_button("folder_submit_#{record_id}")
72
- asset= collection_or_exhibit.eql?("collection") ? Atrium::Collection.find(id) : Atrium::Exhibit.find(id)
73
- selected_facet= collection_or_exhibit.eql?("collection") ? nil : {"pub_date"=>["#{facet}"]}
74
- showcase= Atrium::Showcase.with_selected_facets(asset.id, asset.class.name, selected_facet).first
75
- showcase.should_not be nil
76
- @atrium_showcase=showcase
77
- @atrium_collection = collection_or_exhibit.eql?("collection") ? asset : Atrium::Collection.find(asset.atrium_collection_id)
78
- puts @atrium_collection.inspect
79
- puts @atrium_showcase.inspect
80
- path = collection_or_exhibit.eql?("collection") ? atrium_collection_showcase_path(asset, :showcase_id => showcase.id) : atrium_exhibit_path(asset.id, :f => selected_facet)
81
- puts path.inspect
82
- visit path
83
- end
84
-
85
- When /^I add description with id "([^"]*)" to (collection|exhibit) with id "([^"]*)" and facet "([^"]*)"$/ do |id, collection_or_exhibit, asset_id, facet|
86
- click_button("folder_submit_#{id}")
87
- asset= collection_or_exhibit.eql?("collection") ? Atrium::Collection.find(asset_id) : Atrium::Exhibit.find(asset_id)
88
- #puts asset.inspect
89
- selected_facet= collection_or_exhibit.eql?("collection") ? nil : {"pub_date"=>["#{facet}"]}
90
- showcase= Atrium::Showcase.with_selected_facets(asset.id, asset.class.name, selected_facet).first
91
- showcase.should_not be nil
92
- #puts showcase.inspect
93
- path = atrium_descriptions_link_path(:showcase_id=>showcase.id)
94
- visit path
95
- end
96
-
97
- Then /^I should see description with title "([^"]*)" in description list$/ do |title|
98
- content="Essay: #{title}"
99
- page.should have_selector("div#show-description h3", :content => content)
100
- end
101
-
102
-
@@ -1,53 +0,0 @@
1
-
2
- Then /^"([^"]*)" should( not)? be an option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, negate, field, selector|
3
- with_scope(selector) do
4
- expectation = negate ? :should_not : :should
5
- field_labeled(field).first(:xpath, ".//option[text() = '#{value}']").send(expectation, be_present)
6
- end
7
- end
8
-
9
- Given /^I follow the "([^"]*)" link for exhibit with id (\d+)$/ do |link, id|
10
- page.find(:xpath, ".//li[@data-id = #{id}]/span[@class='controls']/a[text()='#{link}']").click
11
- end
12
-
13
-
14
-
15
- Then /^I should have "([^"]*)" containing only (\d+) "([^"]*)"$/ do |selector, count, element |
16
- page.should have_css("#{selector} #{element}", :count => count.to_i)
17
- end
18
-
19
- Then /^I should have the applied solr facet "([^\"]*)" with the value "([^\"]*)"$/ do |filter, text|
20
- page.should have_selector("div.facet-list") do |node|
21
- node.should have_selector("h3", :content => filter)
22
- node.should have_selector("span.selected", :content => text)
23
- end
24
- end
25
-
26
- Then /^I should have "([^\"]*)" facet inside "([^\"]*)" facet$/ do |string, filter|
27
- #page.should have_selector("li.#{filter}") do |node|
28
- # node.should have_selector("h3.facet-heading", :content => filter)
29
- #end
30
- page.should have_selector("span.selected", :content => filter)
31
- step %{I should see "#{string}" within "li h3.facet-heading"}
32
-
33
- end
34
-
35
- Then /^I should have showcase for exhibit with id "([^"]*)" and facet "([^"]*)"$/ do |exhibit_id, facet|
36
- exhibit= Atrium::Exhibit.find(exhibit_id)
37
- showcase= Atrium::Showcase.with_selected_facets(exhibit_id,exhibit.class.name, {"pub_date"=>["#{facet}"]}).first
38
- #puts "Showcase: #{showcase.inspect}"
39
- showcase.should_not be nil
40
- end
41
-
42
-
43
- When /^I add "([^"]*)" with content "([^"]*)" to the exhibit with id "([^"]*)" and facet "([^"]*)"$/ do |field, content, id, facet|
44
- exhibit= Atrium::Exhibit.find(id)
45
- showcase= Atrium::Showcase.with_selected_facets(id,exhibit.class.name, {"pub_date"=>["#{facet}"]}).first
46
- fill_in "atrium_description_#{field}_attributes_content", :with => content
47
- click_button "Save"
48
- page.should have_content(content)
49
- visit atrium_exhibit_path(exhibit.id, :f=>{"pub_date"=>["#{facet}"]})
50
- end
51
-
52
-
53
-