solidus_backend 2.3.1 → 2.4.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/admin.js +0 -12
- data/app/assets/javascripts/spree/backend/number_field_updater.coffee +5 -5
- data/app/assets/javascripts/spree/backend/shipments.js +16 -14
- data/app/assets/javascripts/spree/backend/stock_transfers/count_update_forms.coffee +3 -3
- data/app/assets/javascripts/spree/backend/stock_transfers/transfer_item_deleting.coffee +1 -1
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/templates/orders/details_adjustment_row.hbs +2 -2
- data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +3 -3
- data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +5 -5
- data/app/assets/javascripts/spree/backend/templates/stock_transfers/transfer_item.hbs +5 -5
- data/app/assets/javascripts/spree/backend/templates/taxons/_tree.hbs +7 -3
- data/app/assets/javascripts/spree/backend/templates/variants/line_items_autocomplete_stock.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/variants/split.hbs +2 -2
- data/app/assets/javascripts/spree/backend/views/order/customer_details.js +1 -2
- data/app/assets/javascripts/spree/backend.js +1 -1
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +27 -906
- data/app/assets/stylesheets/spree/backend/components/_actions.scss +13 -15
- data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_editable_table.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_messages.scss +8 -8
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_number_field_update.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_number_with_currency.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_pills.scss +92 -0
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +7 -32
- data/app/assets/stylesheets/spree/backend/components/_states.scss +5 -27
- data/app/assets/stylesheets/spree/backend/components/_stock_table.scss +0 -12
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +58 -139
- data/app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss +11 -15
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +7 -5
- data/app/assets/stylesheets/spree/backend/sections/_orders.scss +6 -6
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +5 -1
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +4 -2
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +4 -35
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +14 -15
- data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +9 -16
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +23 -20
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +1 -5
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +3 -23
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +40 -92
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +6 -6
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -1
- data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
- data/app/controllers/spree/admin/customer_returns_controller.rb +0 -1
- data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
- data/app/controllers/spree/admin/shipping_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/style_guide_controller.rb +3 -2
- data/app/controllers/spree/admin/tax_rates_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +9 -4
- data/app/helpers/spree/admin/base_helper.rb +32 -35
- data/app/helpers/spree/admin/stock_transfers_helper.rb +0 -4
- data/app/models/spree/backend_configuration.rb +1 -1
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +6 -4
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +5 -5
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +7 -7
- data/app/views/spree/admin/cancellations/index.html.erb +9 -5
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -3
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +12 -7
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +13 -8
- data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +5 -5
- data/app/views/spree/admin/images/_image_row.html.erb +14 -4
- data/app/views/spree/admin/images/index.html.erb +2 -1
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +6 -6
- data/app/views/spree/admin/option_types/edit.html.erb +2 -1
- data/app/views/spree/admin/option_types/index.html.erb +5 -5
- data/app/views/spree/admin/orders/_adjustments.html.erb +3 -3
- data/app/views/spree/admin/orders/_carton.html.erb +1 -1
- data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -3
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +18 -16
- data/app/views/spree/admin/orders/_shipment.html.erb +26 -30
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +6 -6
- data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -3
- data/app/views/spree/admin/orders/confirm/_payments.html.erb +6 -6
- data/app/views/spree/admin/orders/confirm/_shipment.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -3
- data/app/views/spree/admin/orders/index.html.erb +25 -9
- data/app/views/spree/admin/payment_methods/_form.html.erb +4 -1
- data/app/views/spree/admin/payment_methods/index.html.erb +11 -7
- data/app/views/spree/admin/payments/_capture_events.html.erb +1 -1
- data/app/views/spree/admin/payments/_list.html.erb +9 -5
- data/app/views/spree/admin/payments/show.html.erb +2 -2
- data/app/views/spree/admin/prices/_master_variant_table.html.erb +2 -2
- data/app/views/spree/admin/prices/_table.html.erb +2 -2
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +4 -2
- data/app/views/spree/admin/products/index.html.erb +10 -9
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +3 -6
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +3 -8
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +3 -8
- data/app/views/spree/admin/promotions/index.html.erb +24 -17
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +3 -3
- data/app/views/spree/admin/refund_reasons/index.html.erb +7 -5
- data/app/views/spree/admin/refunds/new.html.erb +1 -1
- data/app/views/spree/admin/reimbursement_types/index.html.erb +2 -2
- data/app/views/spree/admin/reimbursements/edit.html.erb +6 -6
- data/app/views/spree/admin/reimbursements/index.html.erb +9 -2
- data/app/views/spree/admin/reimbursements/show.html.erb +6 -6
- data/app/views/spree/admin/reports/index.html.erb +2 -2
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +9 -5
- data/app/views/spree/admin/return_authorizations/edit.html.erb +9 -2
- data/app/views/spree/admin/return_authorizations/index.html.erb +11 -4
- data/app/views/spree/admin/search/products.json.jbuilder +10 -0
- data/app/views/spree/admin/search/users.json.jbuilder +37 -0
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +4 -1
- data/app/views/spree/admin/shared/_modal.html.erb +18 -0
- data/app/views/spree/admin/shared/_number_field_update_actions.html.erb +2 -2
- data/app/views/spree/admin/shared/_number_field_update_cell.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_summary.html.erb +21 -5
- data/app/views/spree/admin/shared/_refunds.html.erb +6 -6
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +4 -4
- data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
- data/app/views/spree/admin/shared/preference_fields/_boolean.html.erb +13 -0
- data/app/views/spree/admin/shared/preference_fields/_decimal.html.erb +12 -0
- data/app/views/spree/admin/shared/preference_fields/_integer.html.erb +12 -0
- data/app/views/spree/admin/shared/preference_fields/_password.html.erb +12 -0
- data/app/views/spree/admin/shared/preference_fields/_string.html.erb +12 -0
- data/app/views/spree/admin/shared/preference_fields/_text.html.erb +12 -0
- data/app/views/spree/admin/shipping_categories/index.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/index.html.erb +5 -5
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +3 -3
- data/app/views/spree/admin/stock_locations/index.html.erb +9 -11
- data/app/views/spree/admin/stock_movements/index.html.erb +4 -4
- data/app/views/spree/admin/stock_transfers/_transfer_item_actions.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +2 -2
- data/app/views/spree/admin/stock_transfers/index.html.erb +10 -6
- data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +1 -1
- data/app/views/spree/admin/store_credits/index.html.erb +53 -50
- data/app/views/spree/admin/store_credits/show.html.erb +5 -5
- data/app/views/spree/admin/stores/_form.html.erb +9 -0
- data/app/views/spree/admin/style_guide/topics/components/_modals.html.erb +50 -0
- data/app/views/spree/admin/style_guide/topics/components/_pills.html.erb +101 -0
- data/app/views/spree/admin/style_guide/topics/tables/_building_tables.html.erb +4 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +5 -5
- data/app/views/spree/admin/tax_rates/index.html.erb +9 -9
- data/app/views/spree/admin/taxonomies/_list.html.erb +4 -4
- data/app/views/spree/admin/taxons/search.json.jbuilder +5 -0
- data/app/views/spree/admin/users/index.html.erb +64 -23
- data/app/views/spree/admin/users/items.html.erb +9 -13
- data/app/views/spree/admin/users/orders.html.erb +28 -12
- data/app/views/spree/admin/variants/_table.html.erb +6 -5
- data/app/views/spree/admin/variants/index.html.erb +12 -16
- data/app/views/spree/admin/variants/new.html.erb +1 -3
- data/app/views/spree/admin/zones/edit.html.erb +0 -3
- data/app/views/spree/admin/zones/index.html.erb +2 -6
- data/app/views/spree/admin/zones/new.html.erb +0 -3
- data/app/views/spree/layouts/admin.html.erb +9 -30
- data/config/routes.rb +0 -4
- data/lib/spree/backend.rb +2 -1
- data/solidus_backend.gemspec +3 -1
- data/spec/controllers/spree/admin/orders_controller_spec.rb +0 -5
- data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/search_controller_spec.rb +2 -2
- data/spec/features/admin/configuration/payment_methods_spec.rb +1 -1
- data/spec/features/admin/configuration/zones_spec.rb +1 -1
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +4 -4
- data/spec/features/admin/orders/cancelling_inventory_spec.rb +1 -1
- data/spec/features/admin/orders/customer_details_spec.rb +8 -1
- data/spec/features/admin/orders/listing_spec.rb +1 -1
- data/spec/features/admin/orders/new_order_spec.rb +3 -3
- data/spec/features/admin/orders/order_details_spec.rb +17 -16
- data/spec/features/admin/orders/payments_spec.rb +4 -4
- data/spec/features/admin/orders/risk_analysis_spec.rb +2 -2
- data/spec/features/admin/orders/shipments_spec.rb +1 -1
- data/spec/features/admin/products/edit/images_spec.rb +1 -1
- data/spec/features/admin/store_credits_spec.rb +3 -3
- data/spec/features/admin/stores_spec.rb +35 -0
- data/spec/features/admin/users_spec.rb +60 -13
- data/spec/spec_helper.rb +9 -4
- data/vendor/assets/javascripts/solidus_admin/bootstrap.js +657 -361
- data/vendor/assets/javascripts/solidus_admin/popover.js +4 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss +4 -11
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_badge.scss +4 -33
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_breadcrumb.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss +11 -15
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_buttons.scss +13 -42
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss +27 -80
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss +24 -17
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss +0 -2
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss +27 -36
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_dropdown.scss +15 -48
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_forms.scss +70 -68
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_functions.scss +90 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_grid.scss +3 -2
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_images.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_input-group.scss +6 -8
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_jumbotron.scss +0 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_list-group.scss +9 -36
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_media.scss +0 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_mixins.scss +2 -18
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_modal.scss +3 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_nav.scss +15 -16
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_navbar.scss +70 -54
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +3 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_popover.scss +96 -72
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_print.scss +1 -9
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_progress.scss +4 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_reboot.scss +187 -95
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tables.scss +34 -19
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tooltip.scss +52 -35
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_type.scss +8 -28
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_utilities.scss +1 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_variables.scss +286 -410
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-grid.scss +2 -8
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-reboot.scss +1 -2
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap.scss +2 -15
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_alert.scss +4 -5
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_badge.scss +6 -5
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_border-radius.scss +3 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_box-shadow.scss +5 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_breakpoints.scss +23 -13
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_buttons.scss +11 -14
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_clearfix.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_forms.scss +57 -55
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_gradients.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid-framework.scss +9 -18
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid.scss +12 -65
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_hover.scss +6 -6
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_list-group.scss +2 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_nav-divider.scss +3 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_pagination.scss +1 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_reset-text.scss +4 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_resize.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_screen-reader.scss +5 -2
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-truncate.scss +1 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_transition.scss +9 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_visibility.scss +2 -2
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_background.scss +4 -17
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_borders.scss +20 -5
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_display.scss +36 -1
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_flex.scss +0 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_position.scss +5 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_spacing.scss +10 -12
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_text.scss +5 -17
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_visibility.scss +4 -48
- metadata +73 -34
- data/app/assets/stylesheets/spree/backend/shared/_skeleton.scss +0 -242
- data/app/controllers/spree/admin/countries_controller.rb +0 -9
- data/app/controllers/spree/admin/states_controller.rb +0 -29
- data/app/helpers/spree/admin/reimbursements_helper.rb +0 -14
- data/app/views/spree/admin/countries/_form.html.erb +0 -22
- data/app/views/spree/admin/countries/edit.html.erb +0 -19
- data/app/views/spree/admin/countries/index.html.erb +0 -49
- data/app/views/spree/admin/countries/new.html.erb +0 -18
- data/app/views/spree/admin/search/products.rabl +0 -9
- data/app/views/spree/admin/search/users.rabl +0 -30
- data/app/views/spree/admin/shared/_areas_tabs.html.erb +0 -19
- data/app/views/spree/admin/states/_form.html.erb +0 -14
- data/app/views/spree/admin/states/_state_list.html.erb +0 -33
- data/app/views/spree/admin/states/edit.html.erb +0 -19
- data/app/views/spree/admin/states/index.html.erb +0 -39
- data/app/views/spree/admin/states/new.html.erb +0 -17
- data/app/views/spree/admin/style_guide/topics/typography/_tags.html.erb +0 -25
- data/app/views/spree/admin/taxons/search.rabl +0 -5
- data/app/views/spree/admin/variants/new.js.erb +0 -1
- data/spec/features/admin/configuration/countries_spec.rb +0 -22
- data/spec/features/admin/configuration/states_spec.rb +0 -64
- data/spec/helpers/admin/reimbursements_helper_spec.rb +0 -34
- data/vendor/assets/javascripts/solidus_admin/tether.js +0 -1726
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom.scss +0 -4
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_normalize.scss +0 -461
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_cards.scss +0 -47
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_transforms.scss +0 -14
@@ -9,11 +9,6 @@ describe Spree::Admin::OrdersController, type: :controller do
|
|
9
9
|
|
10
10
|
before do
|
11
11
|
request.env["HTTP_REFERER"] = "http://localhost:3000"
|
12
|
-
|
13
|
-
# ensure no respond_overrides are in effect
|
14
|
-
if Spree::BaseController.spree_responders[:OrdersController].present?
|
15
|
-
Spree::BaseController.spree_responders[:OrdersController].clear
|
16
|
-
end
|
17
12
|
end
|
18
13
|
|
19
14
|
let(:order) do
|
@@ -13,7 +13,7 @@ module Spree
|
|
13
13
|
describe '#create' do
|
14
14
|
context "with a valid credit card" do
|
15
15
|
let(:order) { create(:order_with_line_items, state: "payment") }
|
16
|
-
let(:payment_method) { create(:credit_card_payment_method, available_to_admin: true
|
16
|
+
let(:payment_method) { create(:credit_card_payment_method, available_to_admin: true) }
|
17
17
|
let(:attributes) do
|
18
18
|
{
|
19
19
|
order_id: order.number,
|
@@ -13,7 +13,7 @@ describe Spree::Admin::SearchController, type: :controller do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe 'GET #users' do
|
16
|
-
subject { get :users, params:
|
16
|
+
subject { get :users, params: params, as: :json }
|
17
17
|
|
18
18
|
shared_examples_for 'user found by search' do
|
19
19
|
it "should include users matching query" do
|
@@ -66,7 +66,7 @@ describe Spree::Admin::SearchController, type: :controller do
|
|
66
66
|
let!(:product_one) { create(:product, name: 'jersey') }
|
67
67
|
let!(:product_two) { create(:product, name: 'better jersey') }
|
68
68
|
|
69
|
-
subject { get :products, params: params }
|
69
|
+
subject { get :products, params: params, as: :json }
|
70
70
|
|
71
71
|
shared_examples_for 'product search' do
|
72
72
|
it 'should respond with http success' do
|
@@ -19,7 +19,7 @@ describe "Payment Methods", type: :feature do
|
|
19
19
|
expect(all("th")[2].text).to eq("Type")
|
20
20
|
expect(all("th")[3].text).to eq("Available to users")
|
21
21
|
expect(all("th")[4].text).to eq("Available to admin")
|
22
|
-
expect(all("th")[5].text).to eq("
|
22
|
+
expect(all("th")[5].text).to eq("State")
|
23
23
|
end
|
24
24
|
|
25
25
|
within('table#listing_payment_methods') do
|
@@ -21,9 +21,9 @@ describe "Cancelling + Resuming", type: :feature do
|
|
21
21
|
|
22
22
|
it "can cancel an order" do
|
23
23
|
visit spree.edit_admin_order_path(order.number)
|
24
|
-
click_button '
|
24
|
+
click_button 'Cancel'
|
25
25
|
within(".additional-info") do
|
26
|
-
expect(find('dt#order_status + dd')).to have_content("
|
26
|
+
expect(find('dt#order_status + dd')).to have_content("Canceled")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -34,9 +34,9 @@ describe "Cancelling + Resuming", type: :feature do
|
|
34
34
|
|
35
35
|
it "can resume an order" do
|
36
36
|
visit spree.edit_admin_order_path(order.number)
|
37
|
-
click_button '
|
37
|
+
click_button 'Resume'
|
38
38
|
within(".additional-info") do
|
39
|
-
expect(find('dt#order_status + dd')).to have_content("
|
39
|
+
expect(find('dt#order_status + dd')).to have_content("Resumed")
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -48,6 +48,13 @@ describe "Customer Details", type: :feature, js: true do
|
|
48
48
|
expect(Spree::Order.last.user).not_to be_nil
|
49
49
|
end
|
50
50
|
|
51
|
+
# Regression test for https://github.com/solidusio/solidus/pull/2176
|
52
|
+
it "does not reset guest checkout to true when returning to customer tab" do
|
53
|
+
click_button "Update"
|
54
|
+
click_link "Customer"
|
55
|
+
expect(find('#guest_checkout_true')).not_to be_checked
|
56
|
+
end
|
57
|
+
|
51
58
|
context "when required quantity is more than available" do
|
52
59
|
let(:quantity) { 11 }
|
53
60
|
let!(:product) { create(:product_not_backorderable) }
|
@@ -103,7 +110,7 @@ describe "Customer Details", type: :feature, js: true do
|
|
103
110
|
# Regression test for https://github.com/spree/spree/issues/2950 and https://github.com/spree/spree/issues/2433
|
104
111
|
# This act should transition the state of the order as far as it will go too
|
105
112
|
within("#order_tab_summary") do
|
106
|
-
expect(find("dt#order_status + dd")).to have_content("
|
113
|
+
expect(find("dt#order_status + dd")).to have_content("Complete")
|
107
114
|
end
|
108
115
|
end
|
109
116
|
|
@@ -32,7 +32,7 @@ describe "Orders Listing", type: :feature, js: true do
|
|
32
32
|
it "should list existing orders" do
|
33
33
|
within_row(1) do
|
34
34
|
expect(column_text(2)).to eq "R100"
|
35
|
-
expect(column_text(3)).to eq "
|
35
|
+
expect(column_text(3)).to eq "Cart"
|
36
36
|
end
|
37
37
|
|
38
38
|
within_row(2) do
|
@@ -54,7 +54,7 @@ describe "New Order", type: :feature do
|
|
54
54
|
click_on "Ship"
|
55
55
|
|
56
56
|
within '.carton-state' do
|
57
|
-
expect(page).to have_content('
|
57
|
+
expect(page).to have_content('Shipped')
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -155,8 +155,8 @@ describe "New Order", type: :feature do
|
|
155
155
|
click_on "Payments"
|
156
156
|
click_on "Continue"
|
157
157
|
|
158
|
-
within(".additional-info
|
159
|
-
expect(page).to have_content("
|
158
|
+
within(".additional-info") do
|
159
|
+
expect(page).to have_content("Confirm")
|
160
160
|
end
|
161
161
|
end
|
162
162
|
end
|
@@ -90,7 +90,7 @@ describe "Order Details", type: :feature, js: true do
|
|
90
90
|
click_icon :check
|
91
91
|
|
92
92
|
expect(page).not_to have_css("input[name=tracking]")
|
93
|
-
expect(page).to have_content("Tracking
|
93
|
+
expect(page).to have_content("Tracking Number FOOBAR")
|
94
94
|
end
|
95
95
|
|
96
96
|
it "can change the shipping method" do
|
@@ -99,7 +99,7 @@ describe "Order Details", type: :feature, js: true do
|
|
99
99
|
within("table.index tr.show-method") do
|
100
100
|
click_icon :edit
|
101
101
|
end
|
102
|
-
select "UPS Ground $100.00", from: "
|
102
|
+
select "UPS Ground $100.00", from: "selected_shipping_rate_id"
|
103
103
|
click_icon :check
|
104
104
|
|
105
105
|
expect(page).not_to have_css('#selected_shipping_rate_id')
|
@@ -195,7 +195,7 @@ describe "Order Details", type: :feature, js: true do
|
|
195
195
|
within_row(1) { click_icon 'arrows-h' }
|
196
196
|
complete_split_to(stock_location2, quantity: 2)
|
197
197
|
|
198
|
-
expect(page).to have_content("
|
198
|
+
expect(page).to have_content("Pending package from 'Clarksville'")
|
199
199
|
|
200
200
|
expect(order.shipments.count).to eq(1)
|
201
201
|
expect(order.shipments.last.backordered?).to eq(false)
|
@@ -203,17 +203,17 @@ describe "Order Details", type: :feature, js: true do
|
|
203
203
|
expect(order.shipments.first.stock_location.id).to eq(stock_location2.id)
|
204
204
|
end
|
205
205
|
|
206
|
-
it 'should allow me to split more than I
|
206
|
+
it 'should not allow me to split more than I had in the original shipment' do
|
207
207
|
expect(order.shipments.first.stock_location.id).to eq(stock_location.id)
|
208
208
|
|
209
209
|
within_row(1) { click_icon 'arrows-h' }
|
210
210
|
complete_split_to(stock_location2, quantity: 5)
|
211
211
|
|
212
|
-
expect(page).to have_content("
|
212
|
+
expect(page).to have_content("Pending package from 'Clarksville'")
|
213
213
|
|
214
214
|
expect(order.shipments.count).to eq(1)
|
215
215
|
expect(order.shipments.last.backordered?).to eq(false)
|
216
|
-
expect(order.shipments.first.inventory_units_for(product.master).count).to eq(
|
216
|
+
expect(order.shipments.first.inventory_units_for(product.master).count).to eq(2)
|
217
217
|
expect(order.shipments.first.stock_location.id).to eq(stock_location2.id)
|
218
218
|
end
|
219
219
|
|
@@ -222,7 +222,7 @@ describe "Order Details", type: :feature, js: true do
|
|
222
222
|
|
223
223
|
within_row(1) { click_icon 'arrows-h' }
|
224
224
|
|
225
|
-
accept_alert "
|
225
|
+
accept_alert "Quantity must be greater than 0" do
|
226
226
|
complete_split_to(stock_location2, quantity: 0)
|
227
227
|
end
|
228
228
|
|
@@ -232,7 +232,7 @@ describe "Order Details", type: :feature, js: true do
|
|
232
232
|
|
233
233
|
fill_in 'item_quantity', with: -1
|
234
234
|
|
235
|
-
accept_alert "
|
235
|
+
accept_alert "Quantity must be greater than 0" do
|
236
236
|
click_icon :ok
|
237
237
|
end
|
238
238
|
|
@@ -265,7 +265,7 @@ describe "Order Details", type: :feature, js: true do
|
|
265
265
|
within_row(1) { click_icon 'arrows-h' }
|
266
266
|
complete_split_to(stock_location2, quantity: 2)
|
267
267
|
|
268
|
-
accept_alert "
|
268
|
+
accept_alert "Desired shipment not enough stock in desired stock location"
|
269
269
|
|
270
270
|
expect(order.shipments.count).to eq(1)
|
271
271
|
expect(order.shipments.first.inventory_units_for(product.master).count).to eq(2)
|
@@ -281,7 +281,7 @@ describe "Order Details", type: :feature, js: true do
|
|
281
281
|
within_row(1) { click_icon 'arrows-h' }
|
282
282
|
complete_split_to(stock_location2, quantity: 2)
|
283
283
|
|
284
|
-
expect(page).to have_content("
|
284
|
+
expect(page).to have_content("Pending package from 'Clarksville'")
|
285
285
|
|
286
286
|
expect(order.shipments.count).to eq(1)
|
287
287
|
expect(order.shipments.first.inventory_units_for(product.master).count).to eq(2)
|
@@ -364,7 +364,7 @@ describe "Order Details", type: :feature, js: true do
|
|
364
364
|
within(all('.stock-contents', count: 2).first) do
|
365
365
|
within_row(1) { click_icon 'arrows-h' }
|
366
366
|
|
367
|
-
accept_alert("
|
367
|
+
accept_alert("Desired shipment not enough stock in desired stock location") do
|
368
368
|
complete_split_to(@shipment2, quantity: 200)
|
369
369
|
end
|
370
370
|
end
|
@@ -404,6 +404,7 @@ describe "Order Details", type: :feature, js: true do
|
|
404
404
|
|
405
405
|
context 'receiving shipment can backorder' do
|
406
406
|
it 'should add more to the backorder' do
|
407
|
+
@shipment1.inventory_units.update_all(state: :on_hand)
|
407
408
|
product.master.stock_items.last.update_column(:backorderable, true)
|
408
409
|
product.master.stock_items.last.update_column(:count_on_hand, 0)
|
409
410
|
expect(@shipment2.reload.backordered?).to eq(false)
|
@@ -411,16 +412,16 @@ describe "Order Details", type: :feature, js: true do
|
|
411
412
|
within_row(1) { click_icon 'arrows-h' }
|
412
413
|
complete_split_to(@shipment2, quantity: 1)
|
413
414
|
|
414
|
-
expect(page).to have_content("1 x
|
415
|
+
expect(page).to have_content("1 x Backordered")
|
415
416
|
|
416
|
-
within('.stock-contents', text: "1 x
|
417
|
+
within('.stock-contents', text: "1 x On hand") do
|
417
418
|
within_row(1) { click_icon 'arrows-h' }
|
418
419
|
complete_split_to(@shipment2, quantity: 1)
|
419
420
|
end
|
420
421
|
|
421
422
|
# Empty shipment should be removed
|
422
423
|
expect(page).to have_css('.stock-contents', count: 1)
|
423
|
-
expect(page).to have_content("2 x
|
424
|
+
expect(page).to have_content("2 x Backordered")
|
424
425
|
end
|
425
426
|
end
|
426
427
|
end
|
@@ -510,7 +511,7 @@ describe "Order Details", type: :feature, js: true do
|
|
510
511
|
within("table.index tr.show-method") do
|
511
512
|
click_icon :edit
|
512
513
|
end
|
513
|
-
select "UPS Ground $100.00", from: "
|
514
|
+
select "UPS Ground $100.00", from: "selected_shipping_rate_id"
|
514
515
|
click_icon :check
|
515
516
|
|
516
517
|
expect(page).not_to have_css('#selected_shipping_rate_id')
|
@@ -525,7 +526,7 @@ describe "Order Details", type: :feature, js: true do
|
|
525
526
|
find(".ship-shipment-button").click
|
526
527
|
|
527
528
|
within '.carton-state' do
|
528
|
-
expect(page).to have_content('
|
529
|
+
expect(page).to have_content('Shipped')
|
529
530
|
end
|
530
531
|
end
|
531
532
|
end
|
@@ -66,17 +66,17 @@ describe 'Payments', type: :feature do
|
|
66
66
|
within_row(1) do
|
67
67
|
expect(column_text(3)).to eq('$150.00')
|
68
68
|
expect(column_text(4)).to eq('Credit Card')
|
69
|
-
expect(column_text(6)).to eq('
|
69
|
+
expect(column_text(6)).to eq('Checkout')
|
70
70
|
end
|
71
71
|
|
72
72
|
click_icon :void
|
73
|
-
expect(page).to have_css('#payment_status', text: '
|
73
|
+
expect(page).to have_css('#payment_status', text: 'Balance due')
|
74
74
|
expect(page).to have_content('Payment Updated')
|
75
75
|
|
76
76
|
within_row(1) do
|
77
77
|
expect(column_text(3)).to eq('$150.00')
|
78
78
|
expect(column_text(4)).to eq('Credit Card')
|
79
|
-
expect(column_text(6)).to eq('
|
79
|
+
expect(column_text(6)).to eq('Void')
|
80
80
|
end
|
81
81
|
|
82
82
|
click_on 'New Payment'
|
@@ -86,7 +86,7 @@ describe 'Payments', type: :feature do
|
|
86
86
|
|
87
87
|
click_icon(:capture)
|
88
88
|
|
89
|
-
expect(page).to have_selector('#payment_status', text: '
|
89
|
+
expect(page).to have_selector('#payment_status', text: 'Paid')
|
90
90
|
expect(page).not_to have_selector('#new_payment_section')
|
91
91
|
end
|
92
92
|
|
@@ -28,10 +28,10 @@ describe 'Order Risk Analysis', type: :feature do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "can be approved" do
|
31
|
-
click_button('
|
31
|
+
click_button('Approve')
|
32
32
|
expect(page).to have_content 'Approver'
|
33
33
|
expect(page).to have_content 'Approved at'
|
34
|
-
expect(page).to have_content 'Status:
|
34
|
+
expect(page).to have_content 'Status: Complete'
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -33,7 +33,7 @@ describe "Shipments", type: :feature do
|
|
33
33
|
def ship_shipment
|
34
34
|
find(".ship-shipment-button").click
|
35
35
|
|
36
|
-
expect(page).to have_content("
|
36
|
+
expect(page).to have_content("Shipped package")
|
37
37
|
expect(order.reload.shipment_state).to eq("shipped")
|
38
38
|
end
|
39
39
|
|
@@ -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'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Stores', type: :feature do
|
4
|
+
stub_authorization!
|
5
|
+
|
6
|
+
context 'when adding a store' do
|
7
|
+
before { visit spree.new_admin_store_path }
|
8
|
+
|
9
|
+
it 'admin should be able to set the default_currency' do
|
10
|
+
expect(find('#store_default_currency').value).to eq ''
|
11
|
+
|
12
|
+
fill_in 'store_name', with: 'Solidus Store'
|
13
|
+
fill_in 'store_code', with: 'solidus'
|
14
|
+
fill_in 'store_url', with: 'example.solidus.io'
|
15
|
+
fill_in 'store_mail_from_address', with: 'from@solidus.io'
|
16
|
+
select 'EUR', from: 'store_default_currency'
|
17
|
+
click_button 'Create'
|
18
|
+
|
19
|
+
@store = Spree::Store.last
|
20
|
+
|
21
|
+
expect(@store.default_currency).to eq 'EUR'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'when editing a store' do
|
26
|
+
let(:store) { create :store, default_currency: 'AUD' }
|
27
|
+
before { visit spree.edit_admin_store_path(store) }
|
28
|
+
|
29
|
+
it 'admin should be able to change the default_currency' do
|
30
|
+
select 'EUR', from: 'store_default_currency'
|
31
|
+
click_button 'Update'
|
32
|
+
expect(store.reload.default_currency).to eq 'EUR'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -5,6 +5,8 @@ describe 'Users', type: :feature do
|
|
5
5
|
let!(:country) { create(:country) }
|
6
6
|
let!(:user_a) { create(:user_with_addresses, email: 'a@example.com') }
|
7
7
|
let!(:user_b) { create(:user_with_addresses, email: 'b@example.com') }
|
8
|
+
let!(:admin_role) { create(:role, name: 'admin') }
|
9
|
+
let!(:user_role) { create(:role, name: 'user') }
|
8
10
|
|
9
11
|
let(:order) { create(:completed_order_with_totals, user: user_a, number: "R123") }
|
10
12
|
|
@@ -62,7 +64,8 @@ describe 'Users', type: :feature do
|
|
62
64
|
|
63
65
|
it "can sort desc" do
|
64
66
|
within_table(table_id) do
|
65
|
-
|
67
|
+
# Ransack adds a ▲ to the sort link. With exact match Capybara is not able to find that link
|
68
|
+
click_link sort_link, exact: false
|
66
69
|
|
67
70
|
expect(page).to have_text text_match_1
|
68
71
|
expect(page).to have_text text_match_2
|
@@ -86,7 +89,7 @@ describe 'Users', type: :feature do
|
|
86
89
|
end
|
87
90
|
end
|
88
91
|
|
89
|
-
it 'displays the correct results for a user search' do
|
92
|
+
it 'displays the correct results for a user search by email' do
|
90
93
|
fill_in 'q_email_cont', with: user_a.email
|
91
94
|
click_button 'Search'
|
92
95
|
within_table('listing_users') do
|
@@ -94,6 +97,41 @@ describe 'Users', type: :feature do
|
|
94
97
|
expect(page).not_to have_text user_b.email
|
95
98
|
end
|
96
99
|
end
|
100
|
+
|
101
|
+
context "member since" do
|
102
|
+
it_behaves_like "a sortable attribute" do
|
103
|
+
let(:text_match_1) { user_a.email }
|
104
|
+
let(:text_match_2) { user_b.email }
|
105
|
+
let(:table_id) { "listing_users" }
|
106
|
+
let(:sort_link) { Spree.t(:member_since) }
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'displays the correct results for a user search by creation date' do
|
110
|
+
user_a.update_column(:created_at, 2.weeks.ago)
|
111
|
+
fill_in 'q_created_at_lt', with: 1.week.ago
|
112
|
+
click_button 'Search'
|
113
|
+
within_table('listing_users') do
|
114
|
+
expect(page).to have_text user_a.email
|
115
|
+
expect(page).not_to have_text user_b.email
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context 'with users having roles' do
|
121
|
+
before do
|
122
|
+
user_a.spree_roles << admin_role
|
123
|
+
user_b.spree_roles << user_role
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'displays the correct results for a user search by role' do
|
127
|
+
select 'admin', from: Spree.user_class.human_attribute_name(:spree_roles)
|
128
|
+
click_button 'Search'
|
129
|
+
within_table('listing_users') do
|
130
|
+
expect(page).to have_text user_a.email
|
131
|
+
expect(page).not_to have_text user_b.email
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
97
135
|
end
|
98
136
|
|
99
137
|
context 'editing users' do
|
@@ -119,7 +157,6 @@ describe 'Users', type: :feature do
|
|
119
157
|
end
|
120
158
|
|
121
159
|
it 'can edit user roles' do
|
122
|
-
Spree::Role.create name: "admin"
|
123
160
|
click_link 'Account'
|
124
161
|
|
125
162
|
check 'user_spree_role_admin'
|
@@ -260,7 +297,7 @@ describe 'Users', type: :feature do
|
|
260
297
|
end
|
261
298
|
end
|
262
299
|
|
263
|
-
[:number, :
|
300
|
+
[:number, :total].each do |attr|
|
264
301
|
context attr do
|
265
302
|
it_behaves_like "a sortable attribute" do
|
266
303
|
let(:text_match_1) { order.send(attr).to_s }
|
@@ -270,6 +307,13 @@ describe 'Users', type: :feature do
|
|
270
307
|
end
|
271
308
|
end
|
272
309
|
end
|
310
|
+
|
311
|
+
context "state" do
|
312
|
+
let(:text_match_1) { "Complete" }
|
313
|
+
let(:text_match_2) { "Complete" }
|
314
|
+
let(:table_id) { "listing_orders" }
|
315
|
+
let(:sort_link) { "orders_#{attr}_title" }
|
316
|
+
end
|
273
317
|
end
|
274
318
|
|
275
319
|
context 'items purchased with sorting' do
|
@@ -290,15 +334,18 @@ describe 'Users', type: :feature do
|
|
290
334
|
end
|
291
335
|
end
|
292
336
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
337
|
+
context "number" do
|
338
|
+
let(:text_match_1) { "R123" }
|
339
|
+
let(:text_match_2) { "R456" }
|
340
|
+
let(:table_id) { "listing_items" }
|
341
|
+
let(:sort_link) { "orders_#{attr}_title" }
|
342
|
+
end
|
343
|
+
|
344
|
+
context "state" do
|
345
|
+
let(:text_match_1) { "Complete" }
|
346
|
+
let(:text_match_2) { "Complete" }
|
347
|
+
let(:table_id) { "listing_items" }
|
348
|
+
let(:sort_link) { "orders_#{attr}_title" }
|
302
349
|
end
|
303
350
|
|
304
351
|
it "has item attributes" do
|
data/spec/spec_helper.rb
CHANGED
@@ -40,8 +40,6 @@ require 'spree/testing_support/url_helpers'
|
|
40
40
|
require 'spree/testing_support/order_walkthrough'
|
41
41
|
require 'spree/testing_support/capybara_ext'
|
42
42
|
|
43
|
-
require 'paperclip/matchers'
|
44
|
-
|
45
43
|
require 'capybara-screenshot/rspec'
|
46
44
|
Capybara.save_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
|
47
45
|
|
@@ -72,6 +70,15 @@ RSpec.configure do |config|
|
|
72
70
|
DatabaseCleaner.clean_with :truncation
|
73
71
|
end
|
74
72
|
|
73
|
+
config.when_first_matching_example_defined(type: :feature) do
|
74
|
+
config.before :suite do
|
75
|
+
# Preload assets
|
76
|
+
# This should avoid capybara timeouts, and avoid counting asset compilation
|
77
|
+
# towards the timing of the first feature spec.
|
78
|
+
Rails.application.precompiled_assets
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
75
82
|
config.prepend_before(:each) do
|
76
83
|
if RSpec.current_example.metadata[:js]
|
77
84
|
DatabaseCleaner.strategy = :truncation
|
@@ -110,8 +117,6 @@ RSpec.configure do |config|
|
|
110
117
|
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
111
118
|
config.include Spree::TestingSupport::Flash
|
112
119
|
|
113
|
-
config.include Paperclip::Shoulda::Matchers
|
114
|
-
|
115
120
|
config.extend WithModel
|
116
121
|
|
117
122
|
config.fail_fast = ENV['FAIL_FAST'] || false
|