solidus_backend 2.0.3 → 2.1.0.beta1
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/handlebars_extensions.coffee +14 -6
- data/app/assets/javascripts/spree/backend/images/upload.js +203 -0
- data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -1
- data/app/assets/javascripts/spree/backend/stock_management/index_update_forms.coffee +1 -1
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +5 -1
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/templates/index.js +15 -0
- data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +12 -0
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +13 -11
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +12 -10
- data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +7 -5
- data/app/assets/javascripts/spree/backend.js +57 -3
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +2 -0
- data/app/assets/stylesheets/spree/backend/components/_table-filter.scss +3 -1
- data/app/assets/stylesheets/spree/backend/components/_tabs.scss +2 -0
- data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +3 -0
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +29 -17
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +6 -0
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -0
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -0
- data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +1 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -3
- data/app/controllers/spree/admin/orders_controller.rb +2 -0
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/prices_controller.rb +7 -1
- data/app/controllers/spree/admin/products_controller.rb +0 -6
- data/app/controllers/spree/admin/promotions_controller.rb +0 -2
- data/app/controllers/spree/admin/users_controller.rb +3 -0
- data/app/helpers/spree/admin/adjustments_helper.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +0 -35
- data/app/helpers/spree/admin/stock_transfers_helper.rb +14 -0
- data/app/models/spree/backend_configuration.rb +2 -2
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/adjustment_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +4 -1
- data/app/views/spree/admin/adjustments/_form.html.erb +24 -20
- data/app/views/spree/admin/cancellations/index.html.erb +2 -3
- data/app/views/spree/admin/countries/_form.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +5 -7
- data/app/views/spree/admin/general_settings/edit.html.erb +55 -46
- data/app/views/spree/admin/images/_form.html.erb +13 -11
- data/app/views/spree/admin/images/_image_row.html.erb +22 -0
- data/app/views/spree/admin/images/create.js.erb +9 -0
- data/app/views/spree/admin/images/edit.html.erb +12 -8
- data/app/views/spree/admin/images/index.html.erb +57 -49
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -3
- data/app/views/spree/admin/orders/_add_product.html.erb +5 -3
- data/app/views/spree/admin/orders/_shipment.html.erb +14 -6
- data/app/views/spree/admin/orders/cart.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +17 -15
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +28 -26
- data/app/views/spree/admin/orders/customer_details/show.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +70 -63
- data/app/views/spree/admin/payment_methods/_form.html.erb +54 -48
- data/app/views/spree/admin/payment_methods/index.html.erb +7 -5
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +32 -30
- data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +1 -0
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +8 -1
- data/app/views/spree/admin/prices/_form.html.erb +38 -43
- data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -0
- data/app/views/spree/admin/prices/_table.html.erb +35 -33
- data/app/views/spree/admin/prices/index.html.erb +37 -35
- data/app/views/spree/admin/product_properties/index.html.erb +0 -7
- data/app/views/spree/admin/products/_form.html.erb +153 -144
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +19 -13
- data/app/views/spree/admin/products/new.html.erb +5 -38
- data/app/views/spree/admin/promotion_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/promotion_rules/create.js.erb +6 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +48 -44
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +8 -4
- data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +9 -5
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +30 -24
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +22 -20
- data/app/views/spree/admin/promotions/new.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +11 -5
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +18 -8
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +7 -5
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +13 -6
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_product.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +15 -9
- data/app/views/spree/admin/promotions/rules/_user.html.erb +5 -3
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +12 -0
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +7 -5
- data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/refund_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +4 -4
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +0 -4
- data/app/views/spree/admin/shared/_head.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +0 -3
- data/app/views/spree/admin/shared/_rebuild_vat_prices_checkbox.html.erb +1 -1
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_variant_search.html.erb +12 -8
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +74 -81
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/states/index.html.erb +9 -5
- data/app/views/spree/admin/stock_locations/_form.html.erb +42 -28
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +10 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +29 -27
- data/app/views/spree/admin/stock_transfers/show.html.erb +26 -24
- data/app/views/spree/admin/store_credits/_form.html.erb +3 -3
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
- data/app/views/spree/admin/store_credits/index.html.erb +2 -2
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +49 -47
- data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +11 -1
- data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +28 -28
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +6 -6
- data/app/views/spree/admin/taxons/index.html.erb +2 -2
- data/app/views/spree/admin/users/_addresses_form.html.erb +19 -15
- data/app/views/spree/admin/users/_form.html.erb +9 -6
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/addresses.html.erb +1 -1
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +2 -2
- data/app/views/spree/admin/users/orders.html.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +73 -49
- data/app/views/spree/admin/variants/_table_filter.html.erb +12 -8
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +34 -31
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -3
- data/app/views/spree/layouts/admin.html.erb +4 -4
- data/config/routes.rb +0 -11
- data/solidus_backend.gemspec +4 -1
- data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -3
- data/spec/controllers/spree/admin/prices_controller_spec.rb +5 -3
- data/spec/features/admin/configuration/general_settings_spec.rb +12 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +3 -2
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/homepage_spec.rb +0 -3
- data/spec/features/admin/orders/adjustments_spec.rb +28 -25
- data/spec/features/admin/orders/customer_details_spec.rb +1 -1
- data/spec/features/admin/orders/order_details_spec.rb +27 -1
- data/spec/features/admin/orders/payments_spec.rb +1 -1
- data/spec/features/admin/products/edit/images_spec.rb +28 -1
- data/spec/features/admin/products/pricing_spec.rb +17 -2
- data/spec/features/admin/products/products_spec.rb +0 -104
- data/spec/features/admin/store_credits_spec.rb +3 -3
- data/spec/features/admin/users_spec.rb +7 -1
- metadata +21 -32
- data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
- data/app/assets/stylesheets/spree/backend/sections/_adjustments_table.scss +0 -8
- data/app/assets/stylesheets/spree/backend/sections/_edit_checkouts.scss +0 -72
- data/app/assets/stylesheets/spree/backend/sections/_tax_zones.scss +0 -15
- data/app/controllers/spree/admin/prototypes_controller.rb +0 -26
- data/app/controllers/spree/admin/trackers_controller.rb +0 -6
- data/app/views/spree/admin/prototypes/_form.html.erb +0 -36
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +0 -25
- data/app/views/spree/admin/prototypes/available.js.erb +0 -2
- data/app/views/spree/admin/prototypes/edit.html.erb +0 -15
- data/app/views/spree/admin/prototypes/index.html.erb +0 -50
- data/app/views/spree/admin/prototypes/new.html.erb +0 -9
- data/app/views/spree/admin/prototypes/new.js.erb +0 -5
- data/app/views/spree/admin/prototypes/select.js.erb +0 -4
- data/app/views/spree/admin/prototypes/show.html.erb +0 -42
- data/app/views/spree/admin/trackers/_form.html.erb +0 -28
- data/app/views/spree/admin/trackers/edit.html.erb +0 -19
- data/app/views/spree/admin/trackers/index.html.erb +0 -54
- data/app/views/spree/admin/trackers/new.html.erb +0 -18
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +0 -50
- data/spec/features/admin/products/prototypes_spec.rb +0 -110
@@ -4,6 +4,7 @@ describe "Product Images", type: :feature do
|
|
4
4
|
stub_authorization!
|
5
5
|
|
6
6
|
let(:file_path) { Rails.root + "../../spec/support/ror_ringer.jpeg" }
|
7
|
+
let(:product) { create(:product) }
|
7
8
|
|
8
9
|
before do
|
9
10
|
# Ensure attachment style keys are symbolized before running all tests
|
@@ -23,7 +24,9 @@ describe "Product Images", type: :feature do
|
|
23
24
|
click_icon(:edit)
|
24
25
|
click_link "Images"
|
25
26
|
click_link "new_image_link"
|
26
|
-
|
27
|
+
within_fieldset 'New Image' do
|
28
|
+
attach_file('image_attachment', file_path)
|
29
|
+
end
|
27
30
|
click_button "Update"
|
28
31
|
expect(page).to have_content("successfully created!")
|
29
32
|
|
@@ -42,6 +45,30 @@ describe "Product Images", type: :feature do
|
|
42
45
|
end
|
43
46
|
end
|
44
47
|
|
48
|
+
context 'Via the upload zone', js: true do
|
49
|
+
it "uploads an image with ajax and appends it to the images table" do
|
50
|
+
visit spree.admin_product_images_path(product)
|
51
|
+
expect(page).to have_content("No images found")
|
52
|
+
|
53
|
+
within_fieldset 'Upload Image' do
|
54
|
+
# Can also pass multiple files in the array, but SQLite gives a deadlock on insert
|
55
|
+
attach_file('image_attachment', [file_path], visible: false)
|
56
|
+
expect(page).to have_css("progress", count: 1)
|
57
|
+
expect(page).to have_text("ror_ringer")
|
58
|
+
end
|
59
|
+
|
60
|
+
expect(page).not_to have_content("No images found")
|
61
|
+
|
62
|
+
within("table.index") do
|
63
|
+
expect(page).to have_css("tbody tr", count: 1)
|
64
|
+
|
65
|
+
within("tbody") do
|
66
|
+
expect(page).to have_xpath("//img[contains(@src,'ror_ringer')]")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
45
72
|
# Regression test for https://github.com/spree/spree/issues/2228
|
46
73
|
it "should see variant images" do
|
47
74
|
variant = create(:variant)
|
@@ -30,12 +30,11 @@ describe 'Pricing' do
|
|
30
30
|
expect(page).to have_content("Prices")
|
31
31
|
end
|
32
32
|
|
33
|
-
within('table.
|
33
|
+
within('table.master_prices') do
|
34
34
|
expect(page).to have_content("$19.99")
|
35
35
|
expect(page).to have_content("USD")
|
36
36
|
expect(page).to have_content("34.56 ₽")
|
37
37
|
expect(page).to have_content("RUB")
|
38
|
-
expect(page).to have_content("Master")
|
39
38
|
expect(page).to have_content("Any Country")
|
40
39
|
expect(page).to have_content("Germany")
|
41
40
|
end
|
@@ -63,6 +62,22 @@ describe 'Pricing' do
|
|
63
62
|
end
|
64
63
|
end
|
65
64
|
|
65
|
+
context "editing" do
|
66
|
+
let(:variant) { create(:variant, price: 20) }
|
67
|
+
let(:product) { variant.product }
|
68
|
+
|
69
|
+
before do
|
70
|
+
product.master.update(price: 49.99)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'has a working edit page' do
|
74
|
+
within "#spree_price_#{product.master.prices.first.id}" do
|
75
|
+
click_icon :edit
|
76
|
+
end
|
77
|
+
expect(page).to have_content("Edit Price")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
66
81
|
context "deleting", js: true do
|
67
82
|
let(:product) { create(:product, price: 65.43) }
|
68
83
|
let!(:variant) { product.master }
|
@@ -109,80 +109,6 @@ describe "Products", type: :feature do
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
-
context "creating a new product from a prototype" do
|
113
|
-
def build_option_type_with_values(name, values)
|
114
|
-
ot = FactoryGirl.create(:option_type, name: name)
|
115
|
-
values.each do |val|
|
116
|
-
ot.option_values.create(name: val.downcase, presentation: val)
|
117
|
-
end
|
118
|
-
ot
|
119
|
-
end
|
120
|
-
|
121
|
-
let(:product_attributes) do
|
122
|
-
# FactoryGirl.attributes_for is un-deprecated!
|
123
|
-
# https://github.com/thoughtbot/factory_girl/issues/274#issuecomment-3592054
|
124
|
-
FactoryGirl.attributes_for(:simple_product)
|
125
|
-
end
|
126
|
-
|
127
|
-
let(:prototype) do
|
128
|
-
size = build_option_type_with_values("size", %w(Small Medium Large))
|
129
|
-
FactoryGirl.create(:prototype, name: "Size", option_types: [size])
|
130
|
-
end
|
131
|
-
|
132
|
-
let(:option_values_hash) do
|
133
|
-
hash = {}
|
134
|
-
prototype.option_types.each do |i|
|
135
|
-
hash[i.id.to_s] = i.option_value_ids
|
136
|
-
end
|
137
|
-
hash
|
138
|
-
end
|
139
|
-
|
140
|
-
before(:each) do
|
141
|
-
@option_type_prototype = prototype
|
142
|
-
@property_prototype = create(:prototype, name: "Random")
|
143
|
-
@shipping_category = create(:shipping_category)
|
144
|
-
click_nav "Products"
|
145
|
-
click_link "admin_new_product"
|
146
|
-
within('#new_product') do
|
147
|
-
expect(page).to have_content("SKU")
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
it "should allow an admin to create a new product and variants from a prototype", js: true do
|
152
|
-
fill_in "product_name", with: "Baseball Cap"
|
153
|
-
fill_in "product_sku", with: "B100"
|
154
|
-
fill_in "product_price", with: "100"
|
155
|
-
fill_in "product_available_on", with: "2012/01/24"
|
156
|
-
select "Size", from: "Prototype"
|
157
|
-
check "Large"
|
158
|
-
select @shipping_category.name, from: "product_shipping_category_id"
|
159
|
-
click_button "Create"
|
160
|
-
expect(page).to have_content("successfully created!")
|
161
|
-
expect(Spree::Product.last.variants.length).to eq(1)
|
162
|
-
end
|
163
|
-
|
164
|
-
it "should not display variants when prototype does not contain option types", js: true do
|
165
|
-
select "Random", from: "Prototype"
|
166
|
-
|
167
|
-
fill_in "product_name", with: "Baseball Cap"
|
168
|
-
|
169
|
-
expect(page).not_to have_content("Variants")
|
170
|
-
end
|
171
|
-
|
172
|
-
it "should keep option values selected if validation fails", js: true do
|
173
|
-
fill_in "product_name", with: "Baseball Cap"
|
174
|
-
fill_in "product_sku", with: "B100"
|
175
|
-
fill_in "product_price", with: "100"
|
176
|
-
select "Size", from: "Prototype"
|
177
|
-
check "Large"
|
178
|
-
click_button "Create"
|
179
|
-
expect(page).to have_content("Shipping category can't be blank")
|
180
|
-
expect(field_labeled("Size")).to be_checked
|
181
|
-
expect(field_labeled("Large")).to be_checked
|
182
|
-
expect(field_labeled("Small")).not_to be_checked
|
183
|
-
end
|
184
|
-
end
|
185
|
-
|
186
112
|
context "creating a new product" do
|
187
113
|
before(:each) do
|
188
114
|
@shipping_category = create(:shipping_category)
|
@@ -296,16 +222,6 @@ describe "Products", type: :feature do
|
|
296
222
|
context 'updating a product', js: true do
|
297
223
|
let(:product) { create(:product) }
|
298
224
|
|
299
|
-
let(:prototype) do
|
300
|
-
size = build_option_type_with_values("size", %w(Small Medium Large))
|
301
|
-
FactoryGirl.create(:prototype, name: "Size", option_types: [size])
|
302
|
-
end
|
303
|
-
|
304
|
-
before(:each) do
|
305
|
-
@option_type_prototype = prototype
|
306
|
-
@property_prototype = create(:prototype, name: "Random")
|
307
|
-
end
|
308
|
-
|
309
225
|
it 'should parse correctly available_on' do
|
310
226
|
visit spree.admin_product_path(product)
|
311
227
|
fill_in "product_available_on", with: "2012/12/25"
|
@@ -313,25 +229,6 @@ describe "Products", type: :feature do
|
|
313
229
|
expect(page).to have_content("successfully updated!")
|
314
230
|
expect(Spree::Product.last.available_on).to eq('Tue, 25 Dec 2012 00:00:00 UTC +00:00')
|
315
231
|
end
|
316
|
-
|
317
|
-
it 'should add option_types when selecting a prototype' do
|
318
|
-
visit spree.admin_product_path(product)
|
319
|
-
click_link 'Product Properties'
|
320
|
-
expect(page).to have_content("Select From Prototype")
|
321
|
-
click_link "Select From Prototype"
|
322
|
-
|
323
|
-
row = find('#prototypes tr', text: 'Size')
|
324
|
-
row.click_link 'Select'
|
325
|
-
|
326
|
-
# The following is unfortunate.
|
327
|
-
# It is tough to distinguish between the different fields, so we assert
|
328
|
-
# that there are two rows (ensuring one has been added) and then
|
329
|
-
# inspect the first one.
|
330
|
-
expect(page).to have_css('#product_properties .product_property', count: 2)
|
331
|
-
within('#product_properties .product_property:nth-child(1)') do
|
332
|
-
expect(find('input[type=text]', match: :first).value).to eq('baseball_cap_color')
|
333
|
-
end
|
334
|
-
end
|
335
232
|
end
|
336
233
|
|
337
234
|
context 'deleting a product', js: true do
|
@@ -371,7 +268,6 @@ describe "Products", type: :feature do
|
|
371
268
|
expect(page).to have_link('Products')
|
372
269
|
expect(page).not_to have_link('Option Types')
|
373
270
|
expect(page).not_to have_link('Properties')
|
374
|
-
expect(page).not_to have_link('Prototypes')
|
375
271
|
|
376
272
|
expect(page).not_to have_link('New Product')
|
377
273
|
expect(page).not_to have_css('a.clone')
|
@@ -23,7 +23,7 @@ describe "Store credits admin" do
|
|
23
23
|
click_link "Store Credit"
|
24
24
|
expect(page.current_path).to eq spree.admin_user_store_credits_path(store_credit.user)
|
25
25
|
|
26
|
-
store_credit_table = page.find("
|
26
|
+
store_credit_table = page.find("#sc-table")
|
27
27
|
expect(store_credit_table).to have_css('tr', count: 1)
|
28
28
|
expect(store_credit_table).to have_content(Spree::Money.new(store_credit.amount).to_s)
|
29
29
|
expect(store_credit_table).to have_content(Spree::Money.new(store_credit.amount_used).to_s)
|
@@ -48,7 +48,7 @@ describe "Store credits admin" do
|
|
48
48
|
click_button "Create"
|
49
49
|
|
50
50
|
expect(page.current_path).to eq spree.admin_user_store_credits_path(store_credit.user)
|
51
|
-
store_credit_table = page.find("
|
51
|
+
store_credit_table = page.find("#sc-table")
|
52
52
|
expect(store_credit_table).to have_css('tr', count: 2)
|
53
53
|
expect(Spree::StoreCredit.count).to eq 2
|
54
54
|
end
|
@@ -67,7 +67,7 @@ describe "Store credits admin" do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "updates the store credit's amount" do
|
70
|
-
page.find("
|
70
|
+
page.find("#sc-table td.actions a.fa-edit").click
|
71
71
|
expect(page).to have_content 'Store credit history'
|
72
72
|
click_link "Change amount"
|
73
73
|
expect(page).to have_content 'Editing store credit amount'
|
@@ -173,7 +173,13 @@ describe 'Users', type: :feature do
|
|
173
173
|
fill_in 'user_email', with: 'something'
|
174
174
|
click_button 'Update'
|
175
175
|
|
176
|
-
|
176
|
+
within('#errorExplanation') do
|
177
|
+
expect(page).to have_content("Email is invalid")
|
178
|
+
end
|
179
|
+
|
180
|
+
within('.flash.error') do
|
181
|
+
expect(page).to have_content("Email is invalid")
|
182
|
+
end
|
177
183
|
end
|
178
184
|
end
|
179
185
|
|
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.0.
|
4
|
+
version: 2.1.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-12-06 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.0.
|
19
|
+
version: 2.1.0.beta1
|
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.0.
|
26
|
+
version: 2.1.0.beta1
|
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.0.
|
33
|
+
version: 2.1.0.beta1
|
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.0.
|
40
|
+
version: 2.1.0.beta1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sass-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,10 +180,10 @@ files:
|
|
180
180
|
- app/assets/javascripts/spree/backend/handlebars_extensions.coffee
|
181
181
|
- app/assets/javascripts/spree/backend/images/index.js.coffee
|
182
182
|
- app/assets/javascripts/spree/backend/images/new.js.coffee
|
183
|
+
- app/assets/javascripts/spree/backend/images/upload.js
|
183
184
|
- app/assets/javascripts/spree/backend/line_items.js.coffee
|
184
185
|
- app/assets/javascripts/spree/backend/line_items_on_order_edit.js
|
185
186
|
- app/assets/javascripts/spree/backend/navigation.coffee
|
186
|
-
- app/assets/javascripts/spree/backend/nested-attribute.js
|
187
187
|
- app/assets/javascripts/spree/backend/number_field_updater.coffee
|
188
188
|
- app/assets/javascripts/spree/backend/option_type_autocomplete.js
|
189
189
|
- app/assets/javascripts/spree/backend/option_value_picker.js
|
@@ -217,8 +217,10 @@ files:
|
|
217
217
|
- app/assets/javascripts/spree/backend/taxon_autocomplete.js
|
218
218
|
- app/assets/javascripts/spree/backend/taxonomy.js.coffee
|
219
219
|
- app/assets/javascripts/spree/backend/taxons.js.coffee
|
220
|
+
- app/assets/javascripts/spree/backend/templates/index.js
|
220
221
|
- app/assets/javascripts/spree/backend/templates/orders/customer_details/autocomplete.hbs
|
221
222
|
- app/assets/javascripts/spree/backend/templates/products/sortable.hbs
|
223
|
+
- app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs
|
222
224
|
- app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs
|
223
225
|
- app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs
|
224
226
|
- app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs
|
@@ -259,9 +261,8 @@ files:
|
|
259
261
|
- app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss
|
260
262
|
- app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss
|
261
263
|
- app/assets/stylesheets/spree/backend/plugins/_select2.scss
|
262
|
-
- app/assets/stylesheets/spree/backend/sections/
|
264
|
+
- app/assets/stylesheets/spree/backend/sections/_adjustments.scss
|
263
265
|
- app/assets/stylesheets/spree/backend/sections/_bulk_transfer.scss
|
264
|
-
- app/assets/stylesheets/spree/backend/sections/_edit_checkouts.scss
|
265
266
|
- app/assets/stylesheets/spree/backend/sections/_image_settings.scss
|
266
267
|
- app/assets/stylesheets/spree/backend/sections/_log_entries.scss
|
267
268
|
- app/assets/stylesheets/spree/backend/sections/_orders.scss
|
@@ -273,7 +274,6 @@ files:
|
|
273
274
|
- app/assets/stylesheets/spree/backend/sections/_stock_transfers.scss
|
274
275
|
- app/assets/stylesheets/spree/backend/sections/_store_credits.scss
|
275
276
|
- app/assets/stylesheets/spree/backend/sections/_style_guide.scss
|
276
|
-
- app/assets/stylesheets/spree/backend/sections/_tax_zones.scss
|
277
277
|
- app/assets/stylesheets/spree/backend/sections/_taxonomies.scss
|
278
278
|
- app/assets/stylesheets/spree/backend/sections/_taxons.scss
|
279
279
|
- app/assets/stylesheets/spree/backend/sections/_transfer_items.scss
|
@@ -313,7 +313,6 @@ files:
|
|
313
313
|
- app/controllers/spree/admin/promotion_rules_controller.rb
|
314
314
|
- app/controllers/spree/admin/promotions_controller.rb
|
315
315
|
- app/controllers/spree/admin/properties_controller.rb
|
316
|
-
- app/controllers/spree/admin/prototypes_controller.rb
|
317
316
|
- app/controllers/spree/admin/refund_reasons_controller.rb
|
318
317
|
- app/controllers/spree/admin/refunds_controller.rb
|
319
318
|
- app/controllers/spree/admin/reimbursement_types_controller.rb
|
@@ -338,7 +337,6 @@ files:
|
|
338
337
|
- app/controllers/spree/admin/tax_rates_controller.rb
|
339
338
|
- app/controllers/spree/admin/taxonomies_controller.rb
|
340
339
|
- app/controllers/spree/admin/taxons_controller.rb
|
341
|
-
- app/controllers/spree/admin/trackers_controller.rb
|
342
340
|
- app/controllers/spree/admin/users_controller.rb
|
343
341
|
- app/controllers/spree/admin/variant_property_rule_values_controller.rb
|
344
342
|
- app/controllers/spree/admin/variants_controller.rb
|
@@ -395,6 +393,8 @@ files:
|
|
395
393
|
- app/views/spree/admin/dashboards/home.html.erb
|
396
394
|
- app/views/spree/admin/general_settings/edit.html.erb
|
397
395
|
- app/views/spree/admin/images/_form.html.erb
|
396
|
+
- app/views/spree/admin/images/_image_row.html.erb
|
397
|
+
- app/views/spree/admin/images/create.js.erb
|
398
398
|
- app/views/spree/admin/images/edit.html.erb
|
399
399
|
- app/views/spree/admin/images/index.html.erb
|
400
400
|
- app/views/spree/admin/images/new.html.erb
|
@@ -442,10 +442,12 @@ files:
|
|
442
442
|
- app/views/spree/admin/payments/show.html.erb
|
443
443
|
- app/views/spree/admin/payments/source_forms/_check.html.erb
|
444
444
|
- app/views/spree/admin/payments/source_forms/_gateway.html.erb
|
445
|
+
- app/views/spree/admin/payments/source_forms/_storecredit.html.erb
|
445
446
|
- app/views/spree/admin/payments/source_views/_check.html.erb
|
446
447
|
- app/views/spree/admin/payments/source_views/_gateway.html.erb
|
447
448
|
- app/views/spree/admin/payments/source_views/_storecredit.html.erb
|
448
449
|
- app/views/spree/admin/prices/_form.html.erb
|
450
|
+
- app/views/spree/admin/prices/_master_variant_table.html.erb
|
449
451
|
- app/views/spree/admin/prices/_table.html.erb
|
450
452
|
- app/views/spree/admin/prices/edit.html.erb
|
451
453
|
- app/views/spree/admin/prices/index.html.erb
|
@@ -496,21 +498,13 @@ files:
|
|
496
498
|
- app/views/spree/admin/promotions/rules/_taxon.html.erb
|
497
499
|
- app/views/spree/admin/promotions/rules/_user.html.erb
|
498
500
|
- app/views/spree/admin/promotions/rules/_user_logged_in.html.erb
|
501
|
+
- app/views/spree/admin/promotions/rules/_user_role.html.erb
|
499
502
|
- app/views/spree/admin/properties/_form.html.erb
|
500
503
|
- app/views/spree/admin/properties/edit.html.erb
|
501
504
|
- app/views/spree/admin/properties/filtered.html.erb
|
502
505
|
- app/views/spree/admin/properties/index.html.erb
|
503
506
|
- app/views/spree/admin/properties/new.html.erb
|
504
507
|
- app/views/spree/admin/properties/new.js.erb
|
505
|
-
- app/views/spree/admin/prototypes/_form.html.erb
|
506
|
-
- app/views/spree/admin/prototypes/_prototypes.html.erb
|
507
|
-
- app/views/spree/admin/prototypes/available.js.erb
|
508
|
-
- app/views/spree/admin/prototypes/edit.html.erb
|
509
|
-
- app/views/spree/admin/prototypes/index.html.erb
|
510
|
-
- app/views/spree/admin/prototypes/new.html.erb
|
511
|
-
- app/views/spree/admin/prototypes/new.js.erb
|
512
|
-
- app/views/spree/admin/prototypes/select.js.erb
|
513
|
-
- app/views/spree/admin/prototypes/show.html.erb
|
514
508
|
- app/views/spree/admin/refund_reasons/edit.html.erb
|
515
509
|
- app/views/spree/admin/refund_reasons/index.html.erb
|
516
510
|
- app/views/spree/admin/refund_reasons/new.html.erb
|
@@ -653,10 +647,6 @@ files:
|
|
653
647
|
- app/views/spree/admin/taxons/edit.html.erb
|
654
648
|
- app/views/spree/admin/taxons/index.html.erb
|
655
649
|
- app/views/spree/admin/taxons/search.rabl
|
656
|
-
- app/views/spree/admin/trackers/_form.html.erb
|
657
|
-
- app/views/spree/admin/trackers/edit.html.erb
|
658
|
-
- app/views/spree/admin/trackers/index.html.erb
|
659
|
-
- app/views/spree/admin/trackers/new.html.erb
|
660
650
|
- app/views/spree/admin/users/_addresses_form.html.erb
|
661
651
|
- app/views/spree/admin/users/_form.html.erb
|
662
652
|
- app/views/spree/admin/users/_sidebar.html.erb
|
@@ -725,7 +715,6 @@ files:
|
|
725
715
|
- spec/controllers/spree/admin/store_credits_controller_spec.rb
|
726
716
|
- spec/controllers/spree/admin/users_controller_spec.rb
|
727
717
|
- spec/controllers/spree/admin/variants_controller_spec.rb
|
728
|
-
- spec/features/admin/configuration/analytics_tracker_spec.rb
|
729
718
|
- spec/features/admin/configuration/countries_spec.rb
|
730
719
|
- spec/features/admin/configuration/general_settings_spec.rb
|
731
720
|
- spec/features/admin/configuration/payment_methods_spec.rb
|
@@ -761,7 +750,6 @@ files:
|
|
761
750
|
- spec/features/admin/products/pricing_spec.rb
|
762
751
|
- spec/features/admin/products/products_spec.rb
|
763
752
|
- spec/features/admin/products/properties_spec.rb
|
764
|
-
- spec/features/admin/products/prototypes_spec.rb
|
765
753
|
- spec/features/admin/products/stock_management_spec.rb
|
766
754
|
- spec/features/admin/products/variant_spec.rb
|
767
755
|
- spec/features/admin/promotion_adjustments_spec.rb
|
@@ -887,7 +875,8 @@ files:
|
|
887
875
|
- vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-hide.scss
|
888
876
|
- vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-truncate.scss
|
889
877
|
homepage: http://solidus.io
|
890
|
-
licenses:
|
878
|
+
licenses:
|
879
|
+
- BSD-3-Clause
|
891
880
|
metadata: {}
|
892
881
|
post_install_message:
|
893
882
|
rdoc_options: []
|
@@ -897,16 +886,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
897
886
|
requirements:
|
898
887
|
- - ">="
|
899
888
|
- !ruby/object:Gem::Version
|
900
|
-
version: 2.
|
889
|
+
version: 2.2.2
|
901
890
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
902
891
|
requirements:
|
903
892
|
- - ">="
|
904
893
|
- !ruby/object:Gem::Version
|
905
|
-
version:
|
894
|
+
version: 1.8.23
|
906
895
|
requirements:
|
907
896
|
- none
|
908
|
-
rubyforge_project:
|
909
|
-
rubygems_version: 2.
|
897
|
+
rubyforge_project:
|
898
|
+
rubygems_version: 2.5.2
|
910
899
|
signing_key:
|
911
900
|
specification_version: 4
|
912
901
|
summary: Admin interface for the Solidus e-commerce framework.
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// On page load
|
2
|
-
var replace_ids = function (s) {
|
3
|
-
var new_id = new Date().getTime();
|
4
|
-
return s.replace(/NEW_RECORD/g, new_id);
|
5
|
-
};
|
6
|
-
|
7
|
-
$(function () {
|
8
|
-
'use strict';
|
9
|
-
|
10
|
-
$('a[id*=nested]').on('click', function () {
|
11
|
-
var template = $(this).prop('href').replace(/.*#/, '');
|
12
|
-
var html = replace_ids(eval(template));
|
13
|
-
$('#ul-' + $(this).prop('id')).append(html);
|
14
|
-
update_remove_links();
|
15
|
-
});
|
16
|
-
update_remove_links();
|
17
|
-
});
|
18
|
-
|
19
|
-
var update_remove_links = function () {
|
20
|
-
'use strict';
|
21
|
-
|
22
|
-
$('.remove').on('click', function () {
|
23
|
-
$(this).prevAll(':first').val(1);
|
24
|
-
$(this).parent().hide();
|
25
|
-
return false;
|
26
|
-
});
|
27
|
-
};
|
@@ -1,72 +0,0 @@
|
|
1
|
-
.ac_results {
|
2
|
-
padding: 0px;
|
3
|
-
border: 1px solid black;
|
4
|
-
background-color: $color-1;
|
5
|
-
overflow: hidden;
|
6
|
-
z-index: 99999;
|
7
|
-
}
|
8
|
-
|
9
|
-
.ac_results ul {
|
10
|
-
width: 100%;
|
11
|
-
list-style-position: outside;
|
12
|
-
list-style: none;
|
13
|
-
padding: 0;
|
14
|
-
margin: 0;
|
15
|
-
}
|
16
|
-
|
17
|
-
.ac_results li {
|
18
|
-
margin: 0px;
|
19
|
-
padding: 5px 5px;
|
20
|
-
cursor: default;
|
21
|
-
display: block;
|
22
|
-
/*
|
23
|
-
if width will be 100% horizontal scrollbar will apear
|
24
|
-
when scroll mode will be used
|
25
|
-
*/
|
26
|
-
/*width: 100%;*/
|
27
|
-
font: menu;
|
28
|
-
font-size: 12px;
|
29
|
-
/*
|
30
|
-
it is very important, if line-height not setted or setted
|
31
|
-
in relative units scroll will be broken in firefox
|
32
|
-
*/
|
33
|
-
line-height: 16px;
|
34
|
-
overflow: hidden;
|
35
|
-
border-bottom: 1px solid black;
|
36
|
-
color: #000;
|
37
|
-
cursor: pointer;
|
38
|
-
}
|
39
|
-
|
40
|
-
.ac_results li img{
|
41
|
-
float:left;
|
42
|
-
padding-right: 5px;
|
43
|
-
width: 30px;
|
44
|
-
}
|
45
|
-
.ac_results li h4 {
|
46
|
-
margin-bottom: 3px;
|
47
|
-
width: 330px;
|
48
|
-
white-space: nowrap;
|
49
|
-
overflow: hidden;
|
50
|
-
}
|
51
|
-
.ac_results li div{
|
52
|
-
float:left;
|
53
|
-
}
|
54
|
-
.ac_results li span{
|
55
|
-
display: block;
|
56
|
-
float: left;
|
57
|
-
margin-left: 8px;
|
58
|
-
}
|
59
|
-
.ac_loading {
|
60
|
-
background: none;
|
61
|
-
}
|
62
|
-
.ac_odd {
|
63
|
-
background-color: #fff;
|
64
|
-
}
|
65
|
-
.ac_over {
|
66
|
-
background-color: #41A6F0;
|
67
|
-
color: #fff!important;
|
68
|
-
}
|
69
|
-
.ac_over h4{
|
70
|
-
color: #fff;
|
71
|
-
text-decoration: underline;
|
72
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Spree
|
2
|
-
module Admin
|
3
|
-
class PrototypesController < ResourceController
|
4
|
-
def show
|
5
|
-
if request.xhr?
|
6
|
-
render layout: false
|
7
|
-
else
|
8
|
-
redirect_to admin_prototypes_path
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def available
|
13
|
-
@prototypes = Prototype.order('name asc')
|
14
|
-
respond_with(@prototypes) do |format|
|
15
|
-
format.html { render layout: !request.xhr? }
|
16
|
-
format.js
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def select
|
21
|
-
@prototype ||= Prototype.find(params[:id])
|
22
|
-
@prototype_properties = @prototype.properties
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<div data-hook="admin_prototype_form_fields" class="row">
|
2
|
-
<div class="alpha four columns">
|
3
|
-
<%= f.field_container :name do %>
|
4
|
-
<%= f.label :name, class: 'required' %><br />
|
5
|
-
<%= f.text_field :name, class: 'fullwidth' %>
|
6
|
-
<%= f.error_message_on :name %>
|
7
|
-
<% end %>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="four columns">
|
11
|
-
<div id='properties' data-hook>
|
12
|
-
<%= f.field_container :property_ids do %>
|
13
|
-
<%= f.label :property_ids, plural_resource_name(Spree::Property) %><br>
|
14
|
-
<%= f.select :property_ids, Spree::Property.all.map { |p| ["#{p.presentation} (#{p.name})", p.id] }, {}, { multiple: true, class: "select2 fullwidth" } %>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="four columns">
|
20
|
-
<div id="option_types" data-hook>
|
21
|
-
<%= f.field_container :option_type_ids do %>
|
22
|
-
<%= f.label :option_type_ids, plural_resource_name(Spree::OptionType) %><br>
|
23
|
-
<%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| ["#{ot.presentation} (#{ot.name})", ot.id] }, {}, { multiple: true, class: "select2 fullwidth" } %>
|
24
|
-
<% end %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="four columns omega">
|
29
|
-
<div id='taxons' data-hook>
|
30
|
-
<%= f.field_container :taxon_ids do %>
|
31
|
-
<%= f.label :taxon_ids, plural_resource_name(Spree::Taxon) %><br>
|
32
|
-
<%= f.select :taxon_ids, Spree::Taxon.all.map { |t| [t.name, t.id] }, {}, { multiple: true, class: "select2 fullwidth" } %>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>
|