atrium 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +13 -0
- data/.gitmodules +3 -0
- data/.rvmrc +32 -0
- data/GETTING_STARTED.textile +109 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +320 -0
- data/Guardfile +10 -0
- data/README.mkd +56 -0
- data/Rakefile +6 -0
- data/app/assets/images/atrium/ajax-loader.gif +0 -0
- data/app/assets/images/atrium/lightbox-ico-loading.gif +0 -0
- data/app/assets/images/atrium/logo.png +0 -0
- data/app/assets/javascripts/atrium/atrium.js +281 -0
- data/app/assets/javascripts/chosen.jquery.js +899 -0
- data/app/assets/javascripts/ckeditor.warning.js +65 -0
- data/app/assets/javascripts/ckeditor/config.js.coffee +6 -0
- data/app/assets/javascripts/ckeditor/jquery.generateId.js +13 -0
- data/app/assets/javascripts/ckeditor/jquery.jeditable.ckeditor.js +59 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/application_link.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/dialogs/linkItem.js +1470 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/plugin.js +16 -0
- data/app/assets/javascripts/ckeditor/plugins/linkItem/ui_toolbar_pencil.png +0 -0
- data/app/assets/javascripts/jquery.colorbox.js +864 -0
- data/app/assets/javascripts/jquery.jeditable.js +543 -0
- data/app/assets/stylesheets/atrium/atrium.css +216 -0
- data/app/assets/stylesheets/atrium/chosen-sprite.png +0 -0
- data/app/assets/stylesheets/atrium/chosen.css +367 -0
- data/app/assets/stylesheets/colorbox.css +42 -0
- data/app/assets/stylesheets/controls.png +0 -0
- data/app/assets/stylesheets/loading.gif +0 -0
- data/app/controllers/atrium/base_controller.rb +25 -0
- data/app/controllers/atrium/collection_exhibit_order_controller.rb +21 -0
- data/app/controllers/atrium/collections_controller.rb +165 -0
- data/app/controllers/atrium/customization_controller.rb +41 -0
- data/app/controllers/atrium/descriptions_controller.rb +177 -0
- data/app/controllers/atrium/exhibit_facet_order_controller.rb +19 -0
- data/app/controllers/atrium/exhibits_controller.rb +108 -0
- data/app/controllers/atrium/showcases_controller.rb +193 -0
- data/app/helpers/atrium/base_helper.rb +6 -0
- data/app/models/ability.rb +14 -0
- data/app/models/atrium/browse_level.rb +41 -0
- data/app/models/atrium/collection.rb +121 -0
- data/app/models/atrium/description.rb +128 -0
- data/app/models/atrium/essay.rb +21 -0
- data/app/models/atrium/exhibit.rb +58 -0
- data/app/models/atrium/search/facet.rb +29 -0
- data/app/models/atrium/search/facet_selection.rb +17 -0
- data/app/models/atrium/showcase.rb +173 -0
- data/app/models/atrium/showcase/facet_selection.rb +21 -0
- data/app/models/atrium/showcase/item.rb +19 -0
- data/app/models/role_mapper.rb +23 -0
- data/app/views/_user_util_links.html.erb +25 -0
- data/app/views/atrium/collections/_bookmark_control.html.erb +25 -0
- data/app/views/atrium/collections/_browse_index.html.erb +20 -0
- data/app/views/atrium/collections/_collection_items_index.html.erb +10 -0
- data/app/views/atrium/collections/_document.html.erb +24 -0
- data/app/views/atrium/collections/_document_list.html.erb +6 -0
- data/app/views/atrium/collections/_edit_navigation.html.erb +20 -0
- data/app/views/atrium/collections/_folder_control.html.erb +12 -0
- data/app/views/atrium/collections/_form.html.erb +93 -0
- data/app/views/atrium/collections/_listing.html.erb +18 -0
- data/app/views/atrium/collections/_navigation.html.erb +45 -0
- data/app/views/atrium/collections/_results_pagination.html.erb +9 -0
- data/app/views/atrium/collections/_sort_and_per_page.html.erb +23 -0
- data/app/views/atrium/collections/edit.html.erb +5 -0
- data/app/views/atrium/collections/new.html.erb +6 -0
- data/app/views/atrium/collections/show.html.erb +22 -0
- data/app/views/atrium/descriptions/_form.html.erb +64 -0
- data/app/views/atrium/descriptions/edit.html.erb +4 -0
- data/app/views/atrium/descriptions/index.html.erb +4 -0
- data/app/views/atrium/descriptions/new.html.erb +2 -0
- data/app/views/atrium/descriptions/show.html.erb +20 -0
- data/app/views/atrium/exhibits/_bookmark_control.html.erb +25 -0
- data/app/views/atrium/exhibits/_folder_control.html.erb +12 -0
- data/app/views/atrium/exhibits/_form.html.erb +108 -0
- data/app/views/atrium/exhibits/edit.html.erb +9 -0
- data/app/views/atrium/exhibits/new.html.erb +6 -0
- data/app/views/atrium/exhibits/show.html.erb +26 -0
- data/app/views/atrium/showcases/_showcase_navigation.html.erb +23 -0
- data/app/views/atrium/showcases/show.html.erb +1 -0
- data/app/views/catalog/_collection_home_text.html.erb +6 -0
- data/app/views/catalog/_constraints.html.erb +9 -0
- data/app/views/catalog/_default_collection_text.html.erb +18 -0
- data/app/views/catalog/_default_home_text.html.erb +6 -0
- data/app/views/catalog/_home_text.html.erb +6 -0
- data/app/views/catalog/_index_partials/_description.html.erb +8 -0
- data/app/views/catalog/_search_form.html.erb +66 -0
- data/app/views/catalog/_show_partials/_description.html.erb +15 -0
- data/app/views/catalog/browse_show.html.erb +18 -0
- data/app/views/catalog/index.html.erb +35 -0
- data/app/views/catalog/list_description.html.erb +24 -0
- data/app/views/catalog/list_item.html.erb +3 -0
- data/app/views/layouts/atrium.html.erb +86 -0
- data/app/views/layouts/atrium_themes/default.html.erb +4 -0
- data/app/views/layouts/item_listing.html.erb +36 -0
- data/app/views/listing/_document.html.erb +27 -0
- data/app/views/listing/_document_list.html.erb +3 -0
- data/app/views/listing/_item_search.html.erb +27 -0
- data/app/views/shared/_banner.html.erb +5 -0
- data/app/views/shared/_collection_complete_list.html.erb +33 -0
- data/app/views/shared/_collection_search_form.html.erb +12 -0
- data/app/views/shared/_collection_title_header.html.erb +3 -0
- data/app/views/shared/_featured_sources.html.erb +20 -0
- data/app/views/shared/_list_descriptions.html.erb +38 -0
- data/app/views/shared/_navigation_browse_levels.html.erb +34 -0
- data/app/views/shared/_showcase_configure_menu.html.erb +22 -0
- data/app/views/shared/_top_navigation.html.erb +9 -0
- data/atrium.gemspec +76 -0
- data/config/routes.rb +12 -0
- data/init.rb +3 -0
- data/lib/application_controller.rb +24 -0
- data/lib/atrium.rb +42 -0
- data/lib/atrium/application_helper.rb +24 -0
- data/lib/atrium/atrium_helper_behavior.rb +162 -0
- data/lib/atrium/catalog.rb +203 -0
- data/lib/atrium/collections_helper.rb +139 -0
- data/lib/atrium/controller.rb +10 -0
- data/lib/atrium/descriptions_helper.rb +23 -0
- data/lib/atrium/engine.rb +12 -0
- data/lib/atrium/layout_helper.rb +13 -0
- data/lib/atrium/routes.rb +99 -0
- data/lib/atrium/solr_helper.rb +440 -0
- data/lib/atrium/version.rb +3 -0
- data/lib/generators/atrium/assets_generator.rb +44 -0
- data/lib/generators/atrium/atrium_generator.rb +149 -0
- data/lib/generators/atrium/cucumber_support_generator.rb +29 -0
- data/lib/generators/atrium/templates/config/role_map_cucumber.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_development.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_production.yml +2 -0
- data/lib/generators/atrium/templates/config/role_map_test.yml +2 -0
- data/lib/generators/atrium/templates/config/solr.yml +10 -0
- data/lib/generators/atrium/templates/db/seeds.rb +87 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_browse_levels.rb +18 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_collections.rb +20 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_descriptions.rb +16 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_essays.rb +15 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_exhibits.rb +16 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_search_facets.rb +14 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcase_facet_selections.rb +15 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcase_items.rb +17 -0
- data/lib/generators/atrium/templates/migrations/create_atrium_showcases.rb +16 -0
- data/lib/generators/atrium/templates/themes/example.html.erb +21 -0
- data/lib/railties/all_tests.rake +23 -0
- data/lib/railties/atrium_cucumber.rake +121 -0
- data/lib/railties/index.rake +37 -0
- data/tasks/atrium.rake +268 -0
- data/tasks/atrium_rspec.rake +91 -0
- data/test_support/etc/Gemfile +33 -0
- data/test_support/etc/bundle_config +3 -0
- data/test_support/etc/rvmrc +32 -0
- data/test_support/features/atrium_collections.feature +162 -0
- data/test_support/features/atrium_exhibits.feature +164 -0
- data/test_support/features/step_definitions/atrium_collection_steps.rb +102 -0
- data/test_support/features/step_definitions/atrium_exhibit_steps.rb +53 -0
- data/test_support/features/step_definitions/bookmarks_steps.rb +6 -0
- data/test_support/features/step_definitions/error_steps.rb +5 -0
- data/test_support/features/step_definitions/folder_steps.rb +27 -0
- data/test_support/features/step_definitions/general_steps.rb +50 -0
- data/test_support/features/step_definitions/record_view_steps.rb +12 -0
- data/test_support/features/step_definitions/saved_searches_steps.rb +22 -0
- data/test_support/features/step_definitions/search_facets_steps.rb +29 -0
- data/test_support/features/step_definitions/search_history_steps.rb +9 -0
- data/test_support/features/step_definitions/search_result_steps.rb +114 -0
- data/test_support/features/step_definitions/search_steps.rb +103 -0
- data/test_support/features/step_definitions/user_steps.rb +5 -0
- data/test_support/features/step_definitions/web_steps.rb +213 -0
- data/test_support/features/support/env.rb +67 -0
- data/test_support/features/support/paths.rb +76 -0
- data/test_support/features/support/selectors.rb +40 -0
- data/test_support/fixtures/atrium_exhibits.yml +3 -0
- data/test_support/spec/controllers/atrium/base_controller_spec.rb +13 -0
- data/test_support/spec/controllers/atrium/collection_exhibit_order_controller_spec.rb +29 -0
- data/test_support/spec/controllers/atrium/collections_controller_spec.rb +185 -0
- data/test_support/spec/controllers/atrium/customization_controller_spec.rb +38 -0
- data/test_support/spec/controllers/atrium/descriptions_controller_spec.rb +150 -0
- data/test_support/spec/controllers/atrium/exhibit_facet_order_controller_spec.rb +36 -0
- data/test_support/spec/controllers/atrium/exhibits_controller_spec.rb +192 -0
- data/test_support/spec/controllers/atrium/showcases_controller_spec.rb +185 -0
- data/test_support/spec/helpers/atrium_collections_helper_spec.rb +147 -0
- data/test_support/spec/helpers/atrium_description_helper_spec.rb +47 -0
- data/test_support/spec/helpers/atrium_solr_helper_spec.rb +512 -0
- data/test_support/spec/models/atrium/browse_level_spec.rb +31 -0
- data/test_support/spec/models/atrium/collection_spec.rb +30 -0
- data/test_support/spec/models/atrium/description_spec.rb +67 -0
- data/test_support/spec/models/atrium/essay_spec.rb +12 -0
- data/test_support/spec/models/atrium/exhibit_spec.rb +76 -0
- data/test_support/spec/models/atrium/search/facet_selection_spec.rb +24 -0
- data/test_support/spec/models/atrium/search/facet_spec.rb +11 -0
- data/test_support/spec/models/atrium/search_facet_spec.rb +54 -0
- data/test_support/spec/models/atrium/showcase/facet_selection_spec.rb +15 -0
- data/test_support/spec/models/atrium/showcase/item_spec.rb +12 -0
- data/test_support/spec/models/atrium/showcase_facet_selection_spec.rb +65 -0
- data/test_support/spec/models/atrium/showcase_spec.rb +134 -0
- data/test_support/spec/rcov.opts +3 -0
- data/test_support/spec/routing/atrium/collections_routing_spec.rb +33 -0
- data/test_support/spec/spec.opts +4 -0
- data/test_support/spec/spec_helper.rb +47 -0
- data/test_support/spec/support/be_accessible_matcher.rb +8 -0
- data/test_support/spec/support/be_routed_mixin.rb +7 -0
- data/test_support/tmp/step_definitions/catalog_index_steps.rb +14 -0
- data/test_support/tmp/step_definitions/edit_document_steps.rb +67 -0
- data/test_support/tmp/step_definitions/hydra_metadata_steps.rb +3 -0
- data/test_support/tmp/step_definitions/hydra_steps.rb +8 -0
- data/test_support/tmp/step_definitions/search_steps.rb +86 -0
- data/test_support/tmp/step_definitions/searching_steps.rb +22 -0
- data/test_support/tmp/step_definitions/select_steps.rb +8 -0
- data/test_support/tmp/step_definitions/show_document_steps.rb +73 -0
- data/test_support/tmp/step_definitions/user_steps.rb +15 -0
- data/test_support/tmp/step_definitions/web_steps.rb +273 -0
- data/test_support/tmp/support/env.rb +54 -0
- data/test_support/tmp/support/paths.rb +57 -0
- metadata +1047 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
# Atrium customization of the Rake tasks that come with rspec-2, to run
|
2
|
+
# specs located in alternate location (inside the Atrium plugin), and to provide
|
3
|
+
# rake tasks for jetty/solr wrapping.
|
4
|
+
#
|
5
|
+
# Same tasks as in ordinary rspec, but prefixed with atrium:.
|
6
|
+
#
|
7
|
+
# rspec2 keeps it's rake tasks inside it's own code, it doesn't generate them.
|
8
|
+
# We had to copy them from there and modify, may have to be done again
|
9
|
+
# if rspec2 changes a lot, but this code looks relatively cleanish.
|
10
|
+
begin
|
11
|
+
require 'rspec/core'
|
12
|
+
require 'rspec/core/rake_task'
|
13
|
+
if default = Rake.application.instance_variable_get('@tasks')['default']
|
14
|
+
default.prerequisites.delete('test')
|
15
|
+
end
|
16
|
+
|
17
|
+
spec_prereq = "atrium:test:prepare"
|
18
|
+
atrium_spec = File.expand_path("../test_support/spec",File.dirname(__FILE__))
|
19
|
+
directories_to_test = [
|
20
|
+
:controllers,
|
21
|
+
# :generators,
|
22
|
+
:helpers,
|
23
|
+
# :integration,
|
24
|
+
# :lib,
|
25
|
+
# :mailers,
|
26
|
+
:models,
|
27
|
+
# :requests,
|
28
|
+
:routing,
|
29
|
+
# :unit,
|
30
|
+
# :utilities,
|
31
|
+
# :views
|
32
|
+
]
|
33
|
+
|
34
|
+
# Set env variable to tell our spec/spec_helper.rb where we really are,
|
35
|
+
# so it doesn't have to guess with relative path, which will be wrong
|
36
|
+
# since we allow spec_dir to be in a remote location. spec_helper.rb
|
37
|
+
# needs it before Rails.root is defined there, even though we can
|
38
|
+
# oddly get it here, i dunno.
|
39
|
+
#ENV['RAILS_ROOT'] = Rails.root.to_s
|
40
|
+
|
41
|
+
namespace :atrium do
|
42
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
43
|
+
RSpec::Core::RakeTask.new(:spec => spec_prereq) do |t|
|
44
|
+
# the user might not have run rspec generator because they don't
|
45
|
+
# actually need it, but without an ./.rspec they won't get color,
|
46
|
+
# let's insist.
|
47
|
+
t.rspec_opts = "--colour"
|
48
|
+
|
49
|
+
# pattern directory name defaults to ./**/*_spec.rb, but has a more concise command line echo
|
50
|
+
t.pattern = "#{atrium_spec}"
|
51
|
+
end
|
52
|
+
|
53
|
+
# Don't understand what this does or how to make it use our remote stats_directory
|
54
|
+
#task :stats => "spec:statsetup"
|
55
|
+
namespace :spec do
|
56
|
+
directories_to_test.each do |sub|
|
57
|
+
desc "Run the code examples in spec/#{sub}"
|
58
|
+
RSpec::Core::RakeTask.new(sub => spec_prereq) do |t|
|
59
|
+
#RSpec::Core::RakeTask.new(sub) do |t|
|
60
|
+
# the user might not have run rspec generator because they don't
|
61
|
+
# actually need it, but without an ./.rspec they won't get color,
|
62
|
+
# let's insist.
|
63
|
+
t.rspec_opts = "--colour"
|
64
|
+
|
65
|
+
# pattern directory name defaults to ./**/*_spec.rb, but has a more concise command line echo
|
66
|
+
t.pattern = "#{atrium_spec}/#{sub}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
desc "Run all atrium:spec:* tasks"
|
72
|
+
task :spec => directories_to_test.collect{|sym| "atrium:spec:#{sym}"}
|
73
|
+
|
74
|
+
desc "Generate code coverage via rcov"
|
75
|
+
RSpec::Core::RakeTask.new('rcov' => [spec_prereq, 'atrium:setup_test_app'].flatten.compact) do |t|
|
76
|
+
t.rcov = true
|
77
|
+
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/}
|
78
|
+
t.pattern = "#{atrium_spec}/**/*spec.rb"
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
rescue LoadError
|
83
|
+
# This rescue pattern stolen from cucumber; rspec didn't need it before since
|
84
|
+
# tasks only lived in rspec gem itself, but for Atrium since we're copying
|
85
|
+
# these tasks into Atrium, we use the rescue so you can still run Atrium (without
|
86
|
+
# these tasks) even if you don't have rspec installed.
|
87
|
+
desc 'rspec rake tasks not available (rspec not installed)'
|
88
|
+
task :spec do
|
89
|
+
abort 'Rspec rake tasks not available. Be sure to install rspec gems. '
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This Gemfile comes from hydra-head/test_support/etc/Gemfile
|
2
|
+
# It's copied into the atrium test app by the rake atrium:setup_test_app task
|
3
|
+
|
4
|
+
source 'http://rubygems.org'
|
5
|
+
|
6
|
+
gem 'rails', '~> 3.2'
|
7
|
+
gem 'blacklight', '~> 3.3'
|
8
|
+
gem 'atrium', :path => '../../'
|
9
|
+
|
10
|
+
gem 'cancan'
|
11
|
+
gem 'jquery-rails'
|
12
|
+
gem 'json'
|
13
|
+
|
14
|
+
group :assets do
|
15
|
+
gem 'coffee-rails', '~> 3.2.1'
|
16
|
+
gem 'sass-rails', '~> 3.2.3'
|
17
|
+
gem 'therubyracer', :platforms => :ruby
|
18
|
+
gem 'uglifier', '>= 1.0.3'
|
19
|
+
end
|
20
|
+
|
21
|
+
# For testing
|
22
|
+
group :development, :test do
|
23
|
+
gem 'bcrypt-ruby'
|
24
|
+
gem 'capybara'
|
25
|
+
gem 'cucumber-rails'
|
26
|
+
gem 'database_cleaner'
|
27
|
+
gem 'factory_girl', '~> 1.1'
|
28
|
+
gem 'mocha'
|
29
|
+
gem 'rspec'
|
30
|
+
gem 'rspec-rails', '>=2.5.0'
|
31
|
+
gem 'ruby-debug'
|
32
|
+
gem 'sqlite3'
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
+
# development environment upon cd'ing into the directory
|
5
|
+
|
6
|
+
ruby_string="ree-1.8.7"
|
7
|
+
gemset_name="atrium-testapp"
|
8
|
+
|
9
|
+
# Install rubies when used instead of only displaying a warning and exiting
|
10
|
+
rvm_install_on_use_flag=1
|
11
|
+
|
12
|
+
# Specify our desired <ruby>[@<gemset>], the @gemset name is optional.
|
13
|
+
environment_id="${ruby_string}@${gemset_name}"
|
14
|
+
|
15
|
+
# First, attempt to load the desired environment directly from the environment
|
16
|
+
# file. This is very fast and efficient compared to running through the entire
|
17
|
+
# CLI and selector. If you want feedback on which environment was used then
|
18
|
+
# insert the word 'use' after --create as this triggers verbose mode.
|
19
|
+
#
|
20
|
+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
21
|
+
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
|
22
|
+
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
23
|
+
else
|
24
|
+
# If the environment file has not yet been created, use the RVM CLI to select.
|
25
|
+
rvm --create "$environment_id"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Ensure that Bundler is installed, install it if it is not.
|
29
|
+
if ! (command -v bundle > /dev/null) ; then
|
30
|
+
printf "The rubygem 'bundler' is not installed, installing it now.\n"
|
31
|
+
gem install bundler
|
32
|
+
fi
|
@@ -0,0 +1,162 @@
|
|
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
|
@@ -0,0 +1,164 @@
|
|
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
|
+
|