solidus_backend 2.10.0.beta1 → 2.10.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend.js +1 -0
  3. data/app/assets/javascripts/spree/backend/components/admin_nav.js +24 -0
  4. data/app/assets/javascripts/spree/backend/components/tabs.js +1 -1
  5. data/app/assets/javascripts/spree/backend/views/order/address.js +7 -5
  6. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +2 -0
  7. data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +3 -3
  8. data/app/assets/stylesheets/spree/backend/components/_messages.scss +4 -0
  9. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +182 -49
  10. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +2 -0
  11. data/app/assets/stylesheets/spree/backend/shared/_header.scss +5 -1
  12. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +0 -9
  13. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  14. data/app/controllers/spree/admin/payment_methods_controller.rb +3 -3
  15. data/app/controllers/spree/admin/payments_controller.rb +2 -2
  16. data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
  17. data/app/controllers/spree/admin/products_controller.rb +1 -1
  18. data/app/controllers/spree/admin/resource_controller.rb +12 -3
  19. data/app/controllers/spree/admin/taxons/attachment_controller.rb +20 -0
  20. data/app/controllers/spree/admin/users_controller.rb +4 -0
  21. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  22. data/app/views/spree/admin/option_types/edit.html.erb +1 -1
  23. data/app/views/spree/admin/orders/edit.html.erb +1 -1
  24. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  25. data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -41
  26. data/app/views/spree/admin/promotion_code_batches/new.html.erb +1 -1
  27. data/app/views/spree/admin/promotion_codes/new.html.erb +1 -1
  28. data/app/views/spree/admin/promotions/_actions.html.erb +1 -0
  29. data/app/views/spree/admin/return_authorizations/new.html.erb +1 -1
  30. data/app/views/spree/admin/shared/_calculator_fields.html.erb +5 -0
  31. data/app/views/spree/admin/shared/_navigation.html.erb +3 -0
  32. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  33. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +1 -1
  34. data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
  35. data/app/views/spree/admin/tax_rates/_form.html.erb +1 -1
  36. data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
  37. data/app/views/spree/admin/taxons/_form.html.erb +1 -5
  38. data/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb +16 -0
  39. data/app/views/spree/admin/users/_form.html.erb +12 -10
  40. data/app/views/spree/admin/users/edit.html.erb +1 -2
  41. data/app/views/spree/layouts/admin.html.erb +1 -2
  42. data/config/routes.rb +4 -6
  43. data/lib/spree/backend_configuration.rb +2 -1
  44. data/solidus_backend.gemspec +1 -1
  45. data/spec/controllers/spree/admin/resource_controller_spec.rb +12 -1
  46. data/spec/controllers/spree/admin/users_controller_spec.rb +23 -0
  47. data/spec/features/admin/configuration/payment_methods_spec.rb +11 -2
  48. data/spec/features/admin/configuration/shipping_methods_spec.rb +13 -1
  49. data/spec/features/admin/configuration/taxonomies_spec.rb +7 -0
  50. data/spec/features/admin/orders/customer_returns_spec.rb +20 -7
  51. data/spec/features/admin/orders/new_order_spec.rb +48 -0
  52. data/spec/features/admin/orders/return_authorizations_spec.rb +38 -9
  53. data/spec/features/admin/products/edit/images_spec.rb +1 -1
  54. data/spec/features/admin/products/products_spec.rb +12 -0
  55. data/spec/features/admin/promotion_adjustments_spec.rb +9 -0
  56. data/spec/features/admin/promotions/promotion_code_batches_spec.rb +37 -0
  57. data/spec/features/admin/promotions/promotion_code_spec.rb +31 -0
  58. data/spec/features/admin/taxons_spec.rb +12 -0
  59. data/spec/features/admin/users_spec.rb +18 -8
  60. data/spec/{support → fixtures/files}/ror_ringer.jpeg +0 -0
  61. data/spec/spec_helper.rb +1 -0
  62. data/spec/support/feature/base_feature_helper.rb +6 -1
  63. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_variables.scss +1 -1
  64. metadata +14 -9
@@ -75,4 +75,16 @@ describe "Taxonomies and taxons", type: :feature do
75
75
  end
76
76
  end
77
77
  end
78
+
79
+ scenario "Removes attachments from taxon" do
80
+ taxon = create(:taxon)
81
+ taxon.update(icon: File.new(file_fixture('ror_ringer.jpeg')))
82
+
83
+ visit spree.edit_admin_taxonomy_taxon_path(taxon.taxonomy, taxon.id)
84
+ within('#taxon_icon_field') do
85
+ click_on 'Remove'
86
+ end
87
+
88
+ expect(page).to have_content("Icon has been successfully removed!")
89
+ end
78
90
  end
@@ -158,14 +158,6 @@ describe 'Users', type: :feature do
158
158
  expect(page).to have_field('user_email', with: 'a@example.com99')
159
159
  end
160
160
 
161
- it 'can edit the user password' do
162
- fill_in 'user_password', with: 'welcome'
163
- fill_in 'user_password_confirmation', with: 'welcome'
164
- click_button 'Update'
165
-
166
- expect(page).to have_text 'Account updated'
167
- end
168
-
169
161
  it 'can edit user roles' do
170
162
  click_link 'Account'
171
163
 
@@ -213,6 +205,24 @@ describe 'Users', type: :feature do
213
205
  expect(user_a.reload.bill_address.address1).to eq "1313 Mockingbird Ln"
214
206
  end
215
207
 
208
+ it 'can edit the user password' do
209
+ fill_in 'user_password', with: 'welcome'
210
+ fill_in 'user_password_confirmation', with: 'welcome'
211
+ click_button 'Update'
212
+
213
+ expect(page).to have_text 'Account updated'
214
+ end
215
+
216
+ context 'without password permissions' do
217
+ custom_authorization! do |_user|
218
+ cannot [:update_password], Spree.user_class
219
+ end
220
+
221
+ it 'cannot edit the user password' do
222
+ expect(page).to_not have_text 'Password'
223
+ end
224
+ end
225
+
216
226
  context 'invalid entry' do
217
227
  around do |example|
218
228
  ::AlwaysInvalidUser = Class.new(Spree.user_class) do
File without changes
data/spec/spec_helper.rb CHANGED
@@ -73,6 +73,7 @@ RSpec.configure do |config|
73
73
  # examples within a transaction, comment the following line or assign false
74
74
  # instead of true.
75
75
  config.use_transactional_fixtures = true
76
+ config.fixture_path = "spec/fixtures"
76
77
 
77
78
  config.before :suite do
78
79
  DatabaseCleaner.clean_with :truncation
@@ -4,7 +4,12 @@ module BaseFeatureHelper
4
4
  def click_nav(nav_text, subnav_text = nil)
5
5
  primary_nav = find(".admin-nav-menu>ul>li>a", text: /#{nav_text}/i)
6
6
  if subnav_text
7
- primary_nav.find('+ul>li>a', text: /#{subnav_text}/i).click
7
+ unless Capybara.current_driver == :rack_test
8
+ # we need to make the navigation visible with Selenium driver,
9
+ # and RackTest implementation of `hover`raises NotImplementedError
10
+ primary_nav.hover
11
+ end
12
+ primary_nav.sibling("ul").find("li > a", text: /#{subnav_text}/i).click
8
13
  else
9
14
  primary_nav.click
10
15
  end
@@ -834,7 +834,7 @@ $figure-caption-color: $gray-600 !default;
834
834
  // Breadcrumbs
835
835
 
836
836
  $breadcrumb-padding-y: .75rem !default;
837
- $breadcrumb-padding-x: 1rem !default;
837
+ $breadcrumb-padding-x: 3rem !default;
838
838
  $breadcrumb-item-padding: .5rem !default;
839
839
 
840
840
  $breadcrumb-margin-bottom: 1rem !default;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0.beta1
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2020-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.10.0.beta1
19
+ version: 2.10.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.10.0.beta1
26
+ version: 2.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.10.0.beta1
33
+ version: 2.10.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.10.0.beta1
40
+ version: 2.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coffee-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -186,6 +186,7 @@ files:
186
186
  - app/assets/javascripts/spree/backend/collections/line_items.js
187
187
  - app/assets/javascripts/spree/backend/collections/shipments.js
188
188
  - app/assets/javascripts/spree/backend/collections/states.js
189
+ - app/assets/javascripts/spree/backend/components/admin_nav.js
189
190
  - app/assets/javascripts/spree/backend/components/editable_table.js
190
191
  - app/assets/javascripts/spree/backend/components/number_with_currency.js
191
192
  - app/assets/javascripts/spree/backend/components/sortable_table.js
@@ -386,6 +387,7 @@ files:
386
387
  - app/controllers/spree/admin/tax_categories_controller.rb
387
388
  - app/controllers/spree/admin/tax_rates_controller.rb
388
389
  - app/controllers/spree/admin/taxonomies_controller.rb
390
+ - app/controllers/spree/admin/taxons/attachment_controller.rb
389
391
  - app/controllers/spree/admin/taxons_controller.rb
390
392
  - app/controllers/spree/admin/users_controller.rb
391
393
  - app/controllers/spree/admin/variant_property_rule_values_controller.rb
@@ -688,6 +690,7 @@ files:
688
690
  - app/views/spree/admin/taxonomies/index.html.erb
689
691
  - app/views/spree/admin/taxonomies/new.html.erb
690
692
  - app/views/spree/admin/taxons/_form.html.erb
693
+ - app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb
691
694
  - app/views/spree/admin/taxons/edit.html.erb
692
695
  - app/views/spree/admin/taxons/index.html.erb
693
696
  - app/views/spree/admin/taxons/search.json.jbuilder
@@ -802,6 +805,8 @@ files:
802
805
  - spec/features/admin/promotions/option_value_rule_spec.rb
803
806
  - spec/features/admin/promotions/product_rule_spec.rb
804
807
  - spec/features/admin/promotions/promotion_categories_spec.rb
808
+ - spec/features/admin/promotions/promotion_code_batches_spec.rb
809
+ - spec/features/admin/promotions/promotion_code_spec.rb
805
810
  - spec/features/admin/promotions/promotion_spec.rb
806
811
  - spec/features/admin/promotions/tiered_calculator_spec.rb
807
812
  - spec/features/admin/promotions/user_rule_spec.rb
@@ -811,6 +816,7 @@ files:
811
816
  - spec/features/admin/style_guide_spec.rb
812
817
  - spec/features/admin/taxons_spec.rb
813
818
  - spec/features/admin/users_spec.rb
819
+ - spec/fixtures/files/ror_ringer.jpeg
814
820
  - spec/helpers/admin/base_helper_spec.rb
815
821
  - spec/helpers/admin/navigation_helper_spec.rb
816
822
  - spec/helpers/admin/stock_movements_helper_spec.rb
@@ -831,7 +837,6 @@ files:
831
837
  - spec/support/appear_before_matcher.rb
832
838
  - spec/support/feature/base_feature_helper.rb
833
839
  - spec/support/feature/order_feature_helper.rb
834
- - spec/support/ror_ringer.jpeg
835
840
  - spec/teaspoon_env.rb
836
841
  - spec/test_views/spree/admin/widgets/edit.html.erb
837
842
  - spec/test_views/spree/admin/widgets/new.html.erb
@@ -1001,7 +1006,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1001
1006
  requirements:
1002
1007
  - - ">="
1003
1008
  - !ruby/object:Gem::Version
1004
- version: 2.2.2
1009
+ version: 2.4.0
1005
1010
  required_rubygems_version: !ruby/object:Gem::Requirement
1006
1011
  requirements:
1007
1012
  - - ">="
@@ -1009,7 +1014,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1009
1014
  version: 1.8.23
1010
1015
  requirements:
1011
1016
  - none
1012
- rubygems_version: 3.0.6
1017
+ rubygems_version: 3.0.3
1013
1018
  signing_key:
1014
1019
  specification_version: 4
1015
1020
  summary: Admin interface for the Solidus e-commerce framework.