blacklight-spotlight 1.4.1 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +5 -1
- data/app/assets/javascripts/spotlight/blocks/resources_block.js +3 -2
- data/app/assets/javascripts/spotlight/crop.es6 +2 -0
- data/app/assets/javascripts/spotlight/multi_image_selector.js +5 -4
- data/app/assets/javascripts/spotlight/reindex_monitor.js +16 -3
- data/app/controllers/concerns/spotlight/controller.rb +6 -1
- data/app/controllers/spotlight/browse_controller.rb +27 -0
- data/app/controllers/spotlight/catalog_controller.rb +2 -2
- data/app/helpers/spotlight/browse_helper.rb +0 -29
- data/app/helpers/spotlight/title_helper.rb +2 -2
- data/app/models/concerns/spotlight/custom_translation_extension.rb +23 -0
- data/app/models/concerns/spotlight/solr_document/atomic_updates.rb +4 -2
- data/app/models/spotlight/blacklight_configuration.rb +2 -2
- data/app/models/spotlight/exhibit.rb +1 -1
- data/app/views/layouts/spotlight/spotlight.html.erb +1 -0
- data/app/views/spotlight/dashboards/_analytics.html.erb +4 -4
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +1 -1
- data/db/migrate/20180306142612_create_translations.rb +18 -0
- data/lib/generators/spotlight/install_generator.rb +4 -0
- data/lib/generators/spotlight/templates/config/initializers/translation.rb +17 -0
- data/lib/spotlight/engine.rb +1 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/controllers/spotlight/browse_controller_spec.rb +32 -0
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +1 -1
- data/spec/controllers/spotlight/filters_controller_spec.rb +0 -1
- data/spec/controllers/spotlight/roles_controller_spec.rb +17 -0
- data/spec/controllers/spotlight/tags_controller_spec.rb +6 -1
- data/spec/examples.txt +1280 -1167
- data/spec/factories/translation.rb +6 -0
- data/spec/features/add_iiif_manifest_spec.rb +2 -0
- data/spec/features/browse_category_spec.rb +28 -0
- data/spec/features/edit_search_fields_spec.rb +1 -2
- data/spec/features/exhibit_masthead_spec.rb +2 -2
- data/spec/features/exhibit_themes_spec.rb +1 -1
- data/spec/features/exhibits/add_tags_spec.rb +1 -1
- data/spec/features/item_admin_spec.rb +1 -1
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +41 -28
- data/spec/features/javascript/multi_image_select_spec.rb +1 -1
- data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
- data/spec/features/javascript/search_config_admin_spec.rb +16 -29
- data/spec/features/site_masthead_spec.rb +1 -1
- data/spec/features/slideshow_spec.rb +1 -2
- data/spec/features/translation_scope_spec.rb +24 -0
- data/spec/models/spotlight/ability_spec.rb +7 -10
- data/spec/models/spotlight/contact_email_spec.rb +1 -1
- data/spec/models/spotlight/contact_form_spec.rb +1 -1
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +3 -0
- data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +2 -2
- data/spec/spec_helper.rb +12 -4
- data/spec/support/disable_friendly_id_deprecation_warnings.rb +8 -0
- data/spec/support/features/capybara_default_max_wait_metadata_helper.rb +16 -0
- data/spec/support/features/test_features_helpers.rb +12 -2
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +0 -7
- data/spec/views/spotlight/roles/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/tags/index.html.erb_spec.rb +1 -0
- data/vendor/assets/javascripts/Leaflet.Editable.js +22 -11
- data/vendor/assets/javascripts/leaflet-iiif.js +91 -23
- metadata +246 -227
- data/spec/features/curator_items.rb +0 -10
- data/spec/features/tags_admin_spec.rb +0 -27
- data/spec/features/user_admin_spec.rb +0 -29
@@ -1,10 +0,0 @@
|
|
1
|
-
describe 'A curator can see the items page', type: :feature do
|
2
|
-
let(:exhibit_curator) { FactoryBot.create(:exhibit_curator) }
|
3
|
-
let(:exhibit) { FactoryBot.create(:exhibit) }
|
4
|
-
|
5
|
-
it 'works' do
|
6
|
-
login_as exhibit_curator
|
7
|
-
visit spotlight.exhibit_dashboard_path(exhibit)
|
8
|
-
expect(page).to have_content 'Items'
|
9
|
-
end
|
10
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
describe 'Tags Administration', type: :feature do
|
2
|
-
let(:exhibit) { FactoryBot.create(:exhibit) }
|
3
|
-
let!(:tagging) { FactoryBot.create(:tagging, tagger: exhibit, taggable: exhibit) }
|
4
|
-
let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
|
5
|
-
before { login_as exhibit_curator }
|
6
|
-
|
7
|
-
describe 'index' do
|
8
|
-
it 'has tags' do
|
9
|
-
visit spotlight.exhibit_tags_path(exhibit)
|
10
|
-
expect(page).to have_css('td', text: tagging.tag.name)
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'links tags to a search' do
|
14
|
-
visit spotlight.exhibit_tags_path(exhibit)
|
15
|
-
click_on tagging.tag.name
|
16
|
-
expect(page).to have_content "Remove constraint Exhibit Tags: #{tagging.tag.name}"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe 'destroy' do
|
21
|
-
it 'destroys a tag' do
|
22
|
-
visit spotlight.exhibit_tags_path(exhibit)
|
23
|
-
click_link 'Delete'
|
24
|
-
expect(page).not_to have_css('td', text: tagging.tag.name)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
describe 'User Administration', type: :feature do
|
2
|
-
let!(:exhibit) { FactoryBot.create(:exhibit) }
|
3
|
-
let!(:user) { FactoryBot.create(:exhibit_admin, exhibit: exhibit) }
|
4
|
-
before { login_as user }
|
5
|
-
describe 'index' do
|
6
|
-
it 'shows the users for the exhibit' do
|
7
|
-
visit spotlight.exhibit_roles_path(exhibit)
|
8
|
-
exhibit.roles.each do |role|
|
9
|
-
expect(page).to have_css('td', text: role.user.email)
|
10
|
-
expect(page).to have_css('td', text: role.role.humanize)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'invites new users to the exhibit', js: true do
|
15
|
-
visit spotlight.exhibit_roles_path(exhibit)
|
16
|
-
|
17
|
-
click_link 'Add a new user'
|
18
|
-
|
19
|
-
fill_in 'User key', with: 'a-user-being-invited@example.com'
|
20
|
-
|
21
|
-
expect do
|
22
|
-
click_button 'Save changes'
|
23
|
-
end.to change { Devise::Mailer.deliveries.count }.by(1)
|
24
|
-
expect(User.where(email: 'a-user-being-invited@example.com').first.invitation_sent_at).to be_present
|
25
|
-
|
26
|
-
expect(page).to have_css('.alert-info', text: 'User has been updated.', visible: true)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|