spree_backend 3.1.0.rc1 → 3.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spree/backend/components/_labels.scss +1 -1
  3. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +2 -1
  4. data/app/controllers/spree/admin/resource_controller.rb +2 -8
  5. data/app/helpers/spree/admin/base_helper.rb +0 -5
  6. data/app/views/spree/admin/countries/_form.html.erb +6 -4
  7. data/app/views/spree/admin/countries/edit.html.erb +2 -5
  8. data/app/views/spree/admin/countries/new.html.erb +2 -5
  9. data/app/views/spree/admin/option_types/edit.html.erb +2 -3
  10. data/app/views/spree/admin/option_types/new.html.erb +1 -4
  11. data/app/views/spree/admin/orders/cart.html.erb +0 -3
  12. data/app/views/spree/admin/orders/edit.html.erb +0 -3
  13. data/app/views/spree/admin/payment_methods/_form.html.erb +5 -4
  14. data/app/views/spree/admin/payment_methods/edit.html.erb +2 -5
  15. data/app/views/spree/admin/payment_methods/new.html.erb +1 -4
  16. data/app/views/spree/admin/products/edit.html.erb +0 -1
  17. data/app/views/spree/admin/products/new.html.erb +1 -4
  18. data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -1
  19. data/app/views/spree/admin/promotion_categories/edit.html.erb +2 -5
  20. data/app/views/spree/admin/promotion_categories/new.html.erb +1 -4
  21. data/app/views/spree/admin/promotions/_form.html.erb +1 -0
  22. data/app/views/spree/admin/promotions/edit.html.erb +5 -8
  23. data/app/views/spree/admin/promotions/new.html.erb +2 -5
  24. data/app/views/spree/admin/properties/edit.html.erb +2 -5
  25. data/app/views/spree/admin/properties/new.html.erb +1 -4
  26. data/app/views/spree/admin/prototypes/edit.html.erb +2 -5
  27. data/app/views/spree/admin/prototypes/new.html.erb +1 -4
  28. data/app/views/spree/admin/refund_reasons/edit.html.erb +1 -2
  29. data/app/views/spree/admin/refund_reasons/new.html.erb +2 -2
  30. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  31. data/app/views/spree/admin/refunds/new.html.erb +1 -1
  32. data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
  33. data/app/views/spree/admin/reports/sales_total.html.erb +1 -4
  34. data/app/views/spree/admin/return_authorization_reasons/edit.html.erb +1 -2
  35. data/app/views/spree/admin/return_authorization_reasons/new.html.erb +2 -2
  36. data/app/views/spree/admin/return_authorizations/edit.html.erb +2 -2
  37. data/app/views/spree/admin/return_authorizations/index.html.erb +5 -1
  38. data/app/views/spree/admin/roles/_form.html.erb +3 -2
  39. data/app/views/spree/admin/roles/edit.html.erb +3 -4
  40. data/app/views/spree/admin/roles/new.html.erb +2 -3
  41. data/app/views/spree/admin/shared/_address_form.html.erb +24 -16
  42. data/app/views/spree/admin/shared/named_types/_edit.html.erb +2 -5
  43. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -0
  44. data/app/views/spree/admin/shared/named_types/_new.html.erb +1 -4
  45. data/app/views/spree/admin/shipping_categories/_form.html.erb +5 -2
  46. data/app/views/spree/admin/shipping_categories/edit.html.erb +2 -5
  47. data/app/views/spree/admin/shipping_categories/new.html.erb +1 -4
  48. data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
  49. data/app/views/spree/admin/shipping_methods/edit.html.erb +2 -1
  50. data/app/views/spree/admin/shipping_methods/new.html.erb +1 -0
  51. data/app/views/spree/admin/states/_form.html.erb +1 -0
  52. data/app/views/spree/admin/states/edit.html.erb +2 -5
  53. data/app/views/spree/admin/states/new.html.erb +1 -4
  54. data/app/views/spree/admin/stock_locations/_form.html.erb +3 -2
  55. data/app/views/spree/admin/stock_locations/edit.html.erb +1 -5
  56. data/app/views/spree/admin/stock_locations/new.html.erb +2 -5
  57. data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
  58. data/app/views/spree/admin/stock_movements/new.html.erb +2 -4
  59. data/app/views/spree/admin/stock_transfers/new.html.erb +2 -1
  60. data/app/views/spree/admin/stock_transfers/show.html.erb +2 -1
  61. data/app/views/spree/admin/store_credit_categories/_form.html.erb +3 -2
  62. data/app/views/spree/admin/store_credit_categories/edit.html.erb +4 -1
  63. data/app/views/spree/admin/store_credit_categories/new.html.erb +3 -0
  64. data/app/views/spree/admin/store_credits/edit.html.erb +5 -3
  65. data/app/views/spree/admin/store_credits/index.html.erb +4 -4
  66. data/app/views/spree/admin/store_credits/new.html.erb +5 -3
  67. data/app/views/spree/admin/tax_categories/_form.html.erb +1 -0
  68. data/app/views/spree/admin/tax_categories/edit.html.erb +2 -5
  69. data/app/views/spree/admin/tax_categories/new.html.erb +1 -4
  70. data/app/views/spree/admin/tax_rates/_form.html.erb +5 -2
  71. data/app/views/spree/admin/tax_rates/edit.html.erb +2 -5
  72. data/app/views/spree/admin/tax_rates/new.html.erb +1 -4
  73. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  74. data/app/views/spree/admin/taxonomies/edit.erb +2 -5
  75. data/app/views/spree/admin/taxonomies/new.html.erb +2 -4
  76. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  77. data/app/views/spree/admin/taxons/edit.html.erb +3 -1
  78. data/app/views/spree/admin/trackers/_form.html.erb +8 -7
  79. data/app/views/spree/admin/trackers/edit.html.erb +6 -3
  80. data/app/views/spree/admin/trackers/new.html.erb +1 -0
  81. data/app/views/spree/admin/users/_form.html.erb +1 -1
  82. data/app/views/spree/admin/users/_sidebar.html.erb +4 -0
  83. data/app/views/spree/admin/users/_user_page_actions.html.erb +0 -1
  84. data/app/views/spree/admin/users/addresses.html.erb +5 -4
  85. data/app/views/spree/admin/users/edit.html.erb +4 -4
  86. data/app/views/spree/admin/users/items.html.erb +5 -4
  87. data/app/views/spree/admin/users/new.html.erb +1 -4
  88. data/app/views/spree/admin/users/orders.html.erb +5 -4
  89. data/app/views/spree/admin/zones/_form.html.erb +1 -0
  90. data/app/views/spree/admin/zones/edit.html.erb +2 -1
  91. data/app/views/spree/admin/zones/new.html.erb +1 -0
  92. data/spec/controllers/spree/admin/resource_controller_spec.rb +0 -26
  93. data/spec/features/admin/products/option_types_spec.rb +3 -2
  94. data/spec/features/admin/promotions/adjustments_spec.rb +19 -15
  95. data/spec/features/admin/returns/return_authorizations_spec.rb +1 -1
  96. data/spec/features/admin/users_spec.rb +1 -1
  97. metadata +6 -6
@@ -55,10 +55,11 @@ describe "Option Types", type: :feature, js: true do
55
55
 
56
56
  # Regression test for #2277
57
57
  it "can remove an option value from an option type" do
58
- create(:option_value)
58
+ option_type = create(:option_type)
59
+ create(:option_value, option_type: option_type)
59
60
  click_link "Option Types"
60
61
  within('table#listing_option_types') { click_icon :edit }
61
- expect(page).to have_content("Editing Option Type")
62
+ expect(page).to have_content(option_type.name)
62
63
  expect(all("tbody#option_values tr").count).to eq(1)
63
64
  within("tbody#option_values") do
64
65
  find('.spree_remove_fields').click
@@ -13,7 +13,8 @@ describe "Promotion Adjustments", type: :feature, js: true do
13
13
  fill_in "Name", with: "Promotion"
14
14
  fill_in "Code", with: "order"
15
15
  click_button "Create"
16
- expect(page).to have_content("Editing Promotion")
16
+ promotion = Spree::Promotion.find_by_name("Promotion")
17
+ expect(page).to have_content(promotion.name)
17
18
 
18
19
  select2 "Item total", from: "Add rule of type"
19
20
  within('#rule_fields') { click_button "Add" }
@@ -30,7 +31,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
30
31
  within('.calculator-fields') { fill_in "Amount", with: 5 }
31
32
  within('#actions_container') { click_button "Update" }
32
33
 
33
- promotion = Spree::Promotion.find_by_name("Promotion")
34
34
  expect(promotion.code).to eq("order")
35
35
 
36
36
  first_rule = promotion.rules.first
@@ -50,7 +50,8 @@ describe "Promotion Adjustments", type: :feature, js: true do
50
50
  fill_in "Usage Limit", with: "1"
51
51
  fill_in "Code", with: "single_use"
52
52
  click_button "Create"
53
- expect(page).to have_content("Editing Promotion")
53
+ promotion = Spree::Promotion.find_by_name("Promotion")
54
+ expect(page).to have_content(promotion.name)
54
55
 
55
56
  select2 "Create whole-order adjustment", from: "Add action of type"
56
57
  within('#action_fields') { click_button "Add" }
@@ -59,7 +60,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
59
60
  within('#action_fields') { fill_in "Amount", with: "5" }
60
61
  within('#actions_container') { click_button "Update" }
61
62
 
62
- promotion = Spree::Promotion.find_by_name("Promotion")
63
63
  expect(promotion.usage_limit).to eq(1)
64
64
  expect(promotion.code).to eq("single_use")
65
65
 
@@ -73,7 +73,9 @@ describe "Promotion Adjustments", type: :feature, js: true do
73
73
  it "should allow an admin to create an automatic promo with flat percent discount" do
74
74
  fill_in "Name", with: "Promotion"
75
75
  click_button "Create"
76
- expect(page).to have_content("Editing Promotion")
76
+ promotion = Spree::Promotion.find_by_name("Promotion")
77
+
78
+ expect(page).to have_content(promotion.name)
77
79
 
78
80
  select2 "Item total", from: "Add rule of type"
79
81
  within('#rule_fields') { click_button "Add" }
@@ -89,7 +91,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
89
91
  within('.calculator-fields') { fill_in "Flat Percent", with: "10" }
90
92
  within('#actions_container') { click_button "Update" }
91
93
 
92
- promotion = Spree::Promotion.find_by_name("Promotion")
93
94
  expect(promotion.code).to be_blank
94
95
 
95
96
  first_rule = promotion.rules.first
@@ -109,7 +110,9 @@ describe "Promotion Adjustments", type: :feature, js: true do
109
110
 
110
111
  fill_in "Name", with: "Promotion"
111
112
  click_button "Create"
112
- expect(page).to have_content("Editing Promotion")
113
+ promotion = Spree::Promotion.find_by_name("Promotion")
114
+
115
+ expect(page).to have_content(promotion.name)
113
116
 
114
117
  select2 "Product(s)", from: "Add rule of type"
115
118
  within("#rule_fields") { click_button "Add" }
@@ -123,7 +126,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
123
126
  within('.calculator-fields') { fill_in "Percent", with: "10" }
124
127
  within('#actions_container') { click_button "Update" }
125
128
 
126
- promotion = Spree::Promotion.find_by_name("Promotion")
127
129
  expect(promotion.code).to be_blank
128
130
 
129
131
  first_rule = promotion.rules.first
@@ -168,7 +170,9 @@ describe "Promotion Adjustments", type: :feature, js: true do
168
170
  fill_in "Name", with: "Promotion"
169
171
  fill_in "Path", with: "content/cvv"
170
172
  click_button "Create"
171
- expect(page).to have_content("Editing Promotion")
173
+ promotion = Spree::Promotion.find_by_name("Promotion")
174
+
175
+ expect(page).to have_content(promotion.name)
172
176
 
173
177
  select2 "Create whole-order adjustment", from: "Add action of type"
174
178
  within('#action_fields') { click_button "Add" }
@@ -177,7 +181,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
177
181
  within('.calculator-fields') { fill_in "Amount", with: "4" }
178
182
  within('#actions_container') { click_button "Update" }
179
183
 
180
- promotion = Spree::Promotion.find_by_name("Promotion")
181
184
  expect(promotion.path).to eq("content/cvv")
182
185
  expect(promotion.code).to be_blank
183
186
  expect(promotion.rules).to be_blank
@@ -194,7 +197,9 @@ describe "Promotion Adjustments", type: :feature, js: true do
194
197
  fill_in "Name", with: "Promotion"
195
198
  fill_in "Code", with: "complex"
196
199
  click_button "Create"
197
- expect(page).to have_content("Editing Promotion")
200
+ promotion = Spree::Promotion.find_by_name("Promotion")
201
+
202
+ expect(page).to have_content(promotion.name)
198
203
 
199
204
  select2 "Create line items", from: "Add action of type"
200
205
 
@@ -213,7 +218,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
213
218
  within('.create_adjustment .calculator-fields') { fill_in "Amount", with: "40.00" }
214
219
  within('#actions_container') { click_button "Update" }
215
220
 
216
- promotion = Spree::Promotion.find_by_name("Promotion")
217
221
  expect(promotion.code).to eq("complex")
218
222
 
219
223
  first_action = promotion.actions.first
@@ -224,7 +228,9 @@ describe "Promotion Adjustments", type: :feature, js: true do
224
228
  it "ceasing to be eligible for a promotion with item total rule then becoming eligible again" do
225
229
  fill_in "Name", with: "Promotion"
226
230
  click_button "Create"
227
- expect(page).to have_content("Editing Promotion")
231
+ promotion = Spree::Promotion.find_by_name("Promotion")
232
+
233
+ expect(page).to have_content(promotion.name)
228
234
 
229
235
  select2 "Item total", from: "Add rule of type"
230
236
  within('#rule_fields') { click_button "Add" }
@@ -239,8 +245,6 @@ describe "Promotion Adjustments", type: :feature, js: true do
239
245
  within('.calculator-fields') { fill_in "Amount", with: "5" }
240
246
  within('#actions_container') { click_button "Update" }
241
247
 
242
- promotion = Spree::Promotion.find_by_name("Promotion")
243
-
244
248
  first_rule = promotion.rules.first
245
249
  expect(first_rule.class).to eq(Spree::Promotion::Rules::ItemTotal)
246
250
  expect(first_rule.preferred_amount_min).to eq(50)
@@ -91,7 +91,7 @@ describe "Return Authorizations", type: :feature do
91
91
  it 'opens return authorization edit page' do
92
92
  visit spree.admin_return_authorizations_path
93
93
  click_link return_authorization.number
94
- expect(page).to have_content("Return Authorization #{return_authorization.number}")
94
+ expect(page).to have_content(return_authorization.number)
95
95
  end
96
96
  end
97
97
 
@@ -40,7 +40,7 @@ describe 'Users', type: :feature do
40
40
  end
41
41
 
42
42
  it 'can go back to the users list' do
43
- expect(page).to have_link Spree.user_class.model_name.human, href: spree.admin_users_path
43
+ expect(page).to have_link Spree.t(:users), href: spree.admin_users_path
44
44
  end
45
45
 
46
46
  it 'can navigate to the account page' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.rc1
4
+ version: 3.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.0.rc1
19
+ version: 3.1.0.rc2
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: 3.1.0.rc1
26
+ version: 3.1.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.0.rc1
33
+ version: 3.1.0.rc2
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: 3.1.0.rc1
40
+ version: 3.1.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement