blacklight-spotlight 2.5.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,11 @@ describe 'spotlight/contacts/edit.html.erb' do
22
22
  form: {
23
23
  new_field: {
24
24
  placeholder: 'place'
25
+ },
26
+ source: {
27
+ remote: {
28
+ help: 'Help!'
29
+ }
25
30
  }
26
31
  }
27
32
  }
@@ -32,6 +37,7 @@ describe 'spotlight/contacts/edit.html.erb' do
32
37
  it 'has an IIIF crop' do
33
38
  render
34
39
  expect(rendered).to have_content 'Upload an image'
40
+ expect(rendered).to have_css '.help-block', text: 'Help!'
35
41
  expect(rendered).to have_selector '#contact_avatar_attributes_iiif_cropper'
36
42
  end
37
43
  end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe 'spotlight/featured_images/_form', type: :view do
4
+ let(:exhibit) { FactoryBot.create(:exhibit, :with_thumbnail) }
5
+ let(:builder) { ActionView::Helpers::FormBuilder.new 'z', exhibit.thumbnail, view, {} }
6
+
7
+ before do
8
+ assign(:exhibit, exhibit)
9
+ allow(builder).to receive_messages(file_field_without_bootstrap: nil)
10
+ allow(view).to receive_messages(exhibit_thumbnails_path: nil)
11
+ I18n.backend.backends.second.store_translations(
12
+ :en,
13
+ spotlight: {
14
+ featured_images: {
15
+ form: {
16
+ source: {
17
+ remote: {
18
+ help: 'Help!'
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ )
25
+ end
26
+
27
+ it 'has help block' do
28
+ render partial: 'spotlight/featured_images/form',
29
+ locals: { f: builder, initial_crop_selection: [], crop_type: :thumbnail }
30
+ expect(rendered).to have_css '.help-block', text: 'Help!'
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe 'spotlight/featured_images/_upload_form', type: :view do
4
+ let(:exhibit) { FactoryBot.create(:exhibit, :with_thumbnail) }
5
+ let(:builder) { ActionView::Helpers::FormBuilder.new 'z', exhibit.thumbnail, view, {} }
6
+
7
+ before do
8
+ assign(:exhibit, exhibit)
9
+ allow(builder).to receive_messages(file_field_without_bootstrap: nil)
10
+ allow(view).to receive_messages(exhibit_thumbnails_path: nil)
11
+ I18n.backend.backends.second.store_translations(
12
+ :en,
13
+ spotlight: {
14
+ featured_images: {
15
+ upload_form: {
16
+ source: {
17
+ remote: {
18
+ help: 'Help!'
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ )
25
+ end
26
+
27
+ it 'has help block' do
28
+ render partial: 'spotlight/featured_images/upload_form',
29
+ locals: { f: builder, initial_crop_selection: [], crop_type: :thumbnail }
30
+ expect(rendered).to have_css '.help-block', text: 'Help!'
31
+ end
32
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-05-13 00:00:00.000000000 Z
14
+ date: 2019-05-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -1506,6 +1506,8 @@ files:
1506
1506
  - spec/views/spotlight/exhibits/index.html.erb_spec.rb
1507
1507
  - spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
1508
1508
  - spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb
1509
+ - spec/views/spotlight/featured_images/_form.html.erb_spec.rb
1510
+ - spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
1509
1511
  - spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
1510
1512
  - spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb
1511
1513
  - spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb
@@ -1588,7 +1590,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1588
1590
  - !ruby/object:Gem::Version
1589
1591
  version: '0'
1590
1592
  requirements: []
1591
- rubygems_version: 3.0.3
1593
+ rubyforge_project:
1594
+ rubygems_version: 2.7.6
1592
1595
  signing_key:
1593
1596
  specification_version: 4
1594
1597
  summary: Enable librarians, curators, and others who are responsible for digital collections
@@ -1799,6 +1802,8 @@ test_files:
1799
1802
  - spec/views/spotlight/catalog/admin.html.erb_spec.rb
1800
1803
  - spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb
1801
1804
  - spec/views/spotlight/resources/new.html.erb_spec.rb
1805
+ - spec/views/spotlight/featured_images/_form.html.erb_spec.rb
1806
+ - spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
1802
1807
  - spec/views/spotlight/roles/index.html.erb_spec.rb
1803
1808
  - spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb
1804
1809
  - spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb