solidus_backend 1.3.2 → 1.4.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +38 -0
- data/app/assets/javascripts/spree/backend/components/tooltips.js +2 -0
- data/app/assets/javascripts/spree/backend/product_picker.js +2 -2
- data/app/assets/javascripts/spree/backend/routes.js +0 -1
- data/app/assets/javascripts/spree/backend/shipments.js +147 -118
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +16 -14
- data/app/assets/javascripts/spree/backend/templates/orders/customer_details/autocomplete.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/variants/autocomplete.hbs.erb +1 -1
- 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 +25 -27
- data/app/assets/javascripts/spree/backend/user_picker.js +14 -8
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +3 -3
- data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +4 -0
- data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_hint.scss +3 -0
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_progress.scss +5 -2
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +14 -5
- data/app/assets/stylesheets/spree/backend/components/_states.scss +1 -2
- data/app/assets/stylesheets/spree/backend/globals/_mixins.css +2 -0
- data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +22 -0
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +12 -3
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +25 -7
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +0 -1
- data/app/assets/stylesheets/spree/backend/sections/_transfer_items.scss +0 -1
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +4 -6
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +5 -2
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +36 -3
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +1 -3
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +3 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/general_settings_controller.rb +0 -6
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +7 -0
- data/app/controllers/spree/admin/orders_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +8 -3
- data/app/controllers/spree/admin/payments_controller.rb +12 -5
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/refunds_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
- data/app/controllers/spree/admin/root_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_items_controller.rb +0 -8
- data/app/controllers/spree/admin/stock_transfers_controller.rb +6 -6
- data/app/controllers/spree/admin/users_controller.rb +7 -3
- data/app/helpers/spree/admin/base_helper.rb +11 -0
- data/app/helpers/spree/admin/navigation_helper.rb +46 -3
- data/app/helpers/spree/admin/orders_helper.rb +0 -1
- data/app/helpers/spree/admin/stock_locations_helper.rb +1 -5
- data/app/models/spree/backend_configuration.rb +100 -0
- data/app/views/spree/admin/adjustment_reasons/edit.html.erb +4 -7
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +4 -4
- data/app/views/spree/admin/adjustment_reasons/new.html.erb +4 -4
- data/app/views/spree/admin/adjustments/edit.html.erb +4 -6
- data/app/views/spree/admin/adjustments/index.html.erb +3 -6
- data/app/views/spree/admin/adjustments/new.html.erb +5 -6
- data/app/views/spree/admin/cancellations/index.html.erb +4 -3
- data/app/views/spree/admin/countries/edit.html.erb +4 -6
- data/app/views/spree/admin/countries/index.html.erb +4 -4
- data/app/views/spree/admin/countries/new.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/edit.html.erb +4 -6
- data/app/views/spree/admin/customer_returns/index.html.erb +2 -5
- data/app/views/spree/admin/customer_returns/new.html.erb +5 -6
- data/app/views/spree/admin/general_settings/edit.html.erb +4 -28
- data/app/views/spree/admin/images/edit.html.erb +6 -2
- data/app/views/spree/admin/images/index.html.erb +3 -0
- data/app/views/spree/admin/images/new.html.erb +3 -3
- data/app/views/spree/admin/log_entries/index.html.erb +4 -8
- data/app/views/spree/admin/option_types/edit.html.erb +7 -9
- data/app/views/spree/admin/option_types/index.html.erb +4 -4
- data/app/views/spree/admin/orders/_shipment.html.erb +4 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +4 -1
- data/app/views/spree/admin/orders/cart.html.erb +4 -8
- data/app/views/spree/admin/orders/confirm.html.erb +3 -4
- data/app/views/spree/admin/orders/confirm/_payments.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm_advance.html.erb +3 -4
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +2 -4
- data/app/views/spree/admin/orders/customer_details/show.html.erb +3 -5
- data/app/views/spree/admin/orders/edit.html.erb +1 -8
- data/app/views/spree/admin/orders/index.html.erb +11 -5
- data/app/views/spree/admin/payment_methods/edit.html.erb +5 -7
- data/app/views/spree/admin/payment_methods/index.html.erb +6 -5
- data/app/views/spree/admin/payment_methods/new.html.erb +6 -7
- data/app/views/spree/admin/payments/_capture_events.html.erb +1 -1
- data/app/views/spree/admin/payments/credit.html.erb +3 -3
- data/app/views/spree/admin/payments/index.html.erb +4 -7
- data/app/views/spree/admin/payments/new.html.erb +4 -5
- data/app/views/spree/admin/payments/show.html.erb +4 -7
- data/app/views/spree/admin/prices/_form.html.erb +1 -0
- data/app/views/spree/admin/prices/index.html.erb +2 -2
- data/app/views/spree/admin/product_properties/index.html.erb +3 -1
- data/app/views/spree/admin/products/_form.html.erb +11 -18
- data/app/views/spree/admin/products/_properties_form.erb +1 -1
- data/app/views/spree/admin/products/edit.html.erb +3 -2
- data/app/views/spree/admin/products/index.html.erb +19 -28
- data/app/views/spree/admin/products/new.html.erb +4 -2
- data/app/views/spree/admin/promotion_categories/edit.html.erb +4 -3
- data/app/views/spree/admin/promotion_categories/index.html.erb +4 -4
- data/app/views/spree/admin/promotion_categories/new.html.erb +4 -3
- data/app/views/spree/admin/promotion_rules/create.js.erb +1 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +3 -3
- data/app/views/spree/admin/promotions/_rules.html.erb +2 -2
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +4 -5
- data/app/views/spree/admin/promotions/index.html.erb +3 -5
- data/app/views/spree/admin/promotions/new.html.erb +3 -3
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +2 -2
- data/app/views/spree/admin/properties/edit.html.erb +3 -6
- data/app/views/spree/admin/properties/index.html.erb +5 -5
- data/app/views/spree/admin/prototypes/_form.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/prototypes/edit.html.erb +3 -6
- data/app/views/spree/admin/prototypes/index.html.erb +4 -4
- data/app/views/spree/admin/prototypes/show.html.erb +2 -2
- data/app/views/spree/admin/refund_reasons/edit.html.erb +4 -4
- data/app/views/spree/admin/refund_reasons/index.html.erb +5 -4
- data/app/views/spree/admin/refund_reasons/new.html.erb +5 -4
- data/app/views/spree/admin/refunds/edit.html.erb +5 -6
- data/app/views/spree/admin/refunds/new.html.erb +6 -6
- data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -3
- data/app/views/spree/admin/reimbursements/edit.html.erb +5 -6
- data/app/views/spree/admin/reimbursements/index.html.erb +2 -4
- data/app/views/spree/admin/reimbursements/show.html.erb +3 -4
- data/app/views/spree/admin/reports/index.html.erb +2 -3
- data/app/views/spree/admin/reports/sales_total.html.erb +2 -4
- data/app/views/spree/admin/return_authorizations/edit.html.erb +15 -16
- data/app/views/spree/admin/return_authorizations/index.html.erb +3 -5
- data/app/views/spree/admin/return_authorizations/new.html.erb +5 -6
- data/app/views/spree/admin/return_reasons/edit.html.erb +3 -2
- data/app/views/spree/admin/return_reasons/index.html.erb +3 -1
- data/app/views/spree/admin/return_reasons/new.html.erb +4 -2
- data/app/views/spree/admin/shared/_areas_tabs.html.erb +3 -3
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_head.html.erb +1 -8
- data/app/views/spree/admin/shared/_header.html.erb +8 -12
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_no_objects_found.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_submenu.html.erb +10 -10
- data/app/views/spree/admin/shared/_order_summary.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_tabs.html.erb +3 -3
- data/app/views/spree/admin/shared/_payments_tabs.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -9
- data/app/views/spree/admin/shared/_report_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -4
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +5 -5
- data/app/views/spree/admin/shared/_shipping_tabs.html.erb +4 -3
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_tabs.html.erb +12 -37
- data/app/views/spree/admin/shared/_taxes_tabs.html.erb +2 -2
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_edit.html.erb +5 -5
- data/app/views/spree/admin/shared/named_types/_index.html.erb +5 -4
- data/app/views/spree/admin/shared/named_types/_new.html.erb +5 -4
- data/app/views/spree/admin/shipping_categories/edit.html.erb +5 -6
- data/app/views/spree/admin/shipping_categories/index.html.erb +5 -4
- data/app/views/spree/admin/shipping_categories/new.html.erb +5 -6
- data/app/views/spree/admin/shipping_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/edit.html.erb +5 -6
- data/app/views/spree/admin/shipping_methods/index.html.erb +5 -5
- data/app/views/spree/admin/shipping_methods/new.html.erb +5 -6
- data/app/views/spree/admin/states/edit.html.erb +5 -6
- data/app/views/spree/admin/states/index.html.erb +5 -4
- data/app/views/spree/admin/states/new.html.erb +5 -3
- data/app/views/spree/admin/stock_items/index.html.erb +4 -7
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/edit.html.erb +5 -5
- data/app/views/spree/admin/stock_locations/index.html.erb +16 -9
- data/app/views/spree/admin/stock_locations/new.html.erb +5 -4
- data/app/views/spree/admin/stock_movements/index.html.erb +3 -4
- data/app/views/spree/admin/stock_movements/new.html.erb +2 -3
- data/app/views/spree/admin/stock_transfers/_location.html.erb +7 -0
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/edit.html.erb +5 -6
- data/app/views/spree/admin/stock_transfers/index.html.erb +5 -5
- data/app/views/spree/admin/stock_transfers/new.html.erb +6 -8
- data/app/views/spree/admin/stock_transfers/receive.html.erb +4 -12
- data/app/views/spree/admin/stock_transfers/show.html.erb +6 -12
- data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +5 -13
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +6 -4
- data/app/views/spree/admin/store_credits/edit_validity.html.erb +8 -6
- data/app/views/spree/admin/store_credits/index.html.erb +5 -5
- data/app/views/spree/admin/store_credits/new.html.erb +5 -4
- data/app/views/spree/admin/store_credits/show.html.erb +5 -4
- data/app/views/spree/admin/style_guide/topics/typography/_icons.html.erb +2 -2
- data/app/views/spree/admin/tax_categories/edit.html.erb +5 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +5 -4
- data/app/views/spree/admin/tax_categories/new.html.erb +5 -4
- data/app/views/spree/admin/tax_rates/edit.html.erb +5 -6
- data/app/views/spree/admin/tax_rates/index.html.erb +5 -4
- data/app/views/spree/admin/tax_rates/new.html.erb +5 -6
- data/app/views/spree/admin/taxonomies/edit.erb +7 -9
- data/app/views/spree/admin/taxonomies/index.html.erb +4 -4
- data/app/views/spree/admin/taxonomies/new.html.erb +5 -7
- data/app/views/spree/admin/taxons/edit.html.erb +5 -6
- data/app/views/spree/admin/taxons/index.html.erb +2 -3
- data/app/views/spree/admin/trackers/edit.html.erb +5 -6
- data/app/views/spree/admin/trackers/index.html.erb +4 -4
- data/app/views/spree/admin/trackers/new.html.erb +4 -6
- data/app/views/spree/admin/users/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_tabs.html.erb +5 -5
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -4
- data/app/views/spree/admin/users/addresses.html.erb +5 -4
- data/app/views/spree/admin/users/edit.html.erb +6 -6
- data/app/views/spree/admin/users/index.html.erb +4 -5
- data/app/views/spree/admin/users/items.html.erb +4 -3
- data/app/views/spree/admin/users/new.html.erb +2 -9
- data/app/views/spree/admin/users/orders.html.erb +4 -3
- data/app/views/spree/admin/variants/_form.html.erb +1 -0
- data/app/views/spree/admin/variants/edit.html.erb +4 -3
- data/app/views/spree/admin/variants/index.html.erb +10 -8
- data/app/views/spree/admin/variants/new.html.erb +5 -0
- data/app/views/spree/admin/zones/_country_members.html.erb +2 -2
- data/app/views/spree/admin/zones/_state_members.html.erb +2 -2
- data/app/views/spree/admin/zones/edit.html.erb +5 -6
- data/app/views/spree/admin/zones/index.html.erb +5 -4
- data/app/views/spree/admin/zones/new.html.erb +6 -7
- data/app/views/spree/layouts/admin.html.erb +28 -15
- data/config/initializers/form_builder.rb +6 -0
- data/config/routes.rb +2 -6
- data/spec/controllers/spree/admin/cancellations_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +4 -4
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/orders_controller_spec.rb +28 -28
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/payments_controller_spec.rb +7 -7
- data/spec/controllers/spree/admin/prices_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/product_properties_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +6 -6
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +7 -7
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/reports_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/resource_controller_spec.rb +6 -6
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +11 -11
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/search_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +10 -10
- data/spec/controllers/spree/admin/store_credits_controller_spec.rb +10 -10
- data/spec/controllers/spree/admin/users_controller_spec.rb +139 -141
- data/spec/controllers/spree/admin/variants_controller_spec.rb +2 -2
- data/spec/features/admin/configuration/general_settings_spec.rb +7 -16
- data/spec/features/admin/configuration/payment_methods_spec.rb +7 -7
- data/spec/features/admin/configuration/stock_locations_spec.rb +1 -1
- data/spec/features/admin/configuration/tax_categories_spec.rb +1 -1
- data/spec/features/admin/configuration/zones_spec.rb +1 -1
- data/spec/features/admin/homepage_spec.rb +2 -2
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/cancelling_inventory_spec.rb +8 -8
- data/spec/features/admin/orders/customer_details_spec.rb +20 -5
- data/spec/features/admin/orders/listing_spec.rb +97 -70
- data/spec/features/admin/orders/new_order_spec.rb +35 -6
- data/spec/features/admin/orders/order_details_spec.rb +37 -58
- data/spec/features/admin/orders/payments_spec.rb +57 -4
- data/spec/features/admin/orders/return_authorizations_spec.rb +25 -0
- data/spec/features/admin/orders/shipments_spec.rb +5 -5
- data/spec/features/admin/products/edit/products_spec.rb +1 -1
- data/spec/features/admin/products/edit/taxons_spec.rb +5 -5
- data/spec/features/admin/products/edit/variants_spec.rb +1 -1
- data/spec/features/admin/products/option_types_spec.rb +2 -2
- data/spec/features/admin/products/products_spec.rb +6 -6
- data/spec/features/admin/products/properties_spec.rb +6 -6
- data/spec/features/admin/products/prototypes_spec.rb +1 -1
- data/spec/features/admin/products/stock_management_spec.rb +5 -5
- data/spec/features/admin/promotion_adjustments_spec.rb +8 -8
- data/spec/features/admin/promotions/option_value_rule_spec.rb +4 -4
- data/spec/features/admin/promotions/product_rule_spec.rb +33 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +2 -2
- data/spec/features/admin/promotions/user_rule_spec.rb +15 -0
- data/spec/features/admin/reports_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +27 -2
- data/spec/helpers/admin/base_helper_spec.rb +30 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +40 -2
- data/spec/spec_helper.rb +10 -8
- data/spec/support/feature/order_feature_helper.rb +17 -0
- metadata +18 -11
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +0 -13
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +0 -41
|
@@ -73,16 +73,16 @@ describe "Payment Methods", type: :feature do
|
|
|
73
73
|
create(:credit_card_payment_method)
|
|
74
74
|
click_link "Payment Methods"
|
|
75
75
|
click_icon :edit
|
|
76
|
-
expect(page).to have_content('
|
|
76
|
+
expect(page).to have_content('Test Mode')
|
|
77
77
|
|
|
78
78
|
select2_search 'Spree::PaymentMethod::Check', from: 'Provider'
|
|
79
79
|
expect(page).to have_content('you must save first')
|
|
80
|
-
expect(page).to have_no_content('
|
|
80
|
+
expect(page).to have_no_content('Test Mode')
|
|
81
81
|
|
|
82
82
|
# change back
|
|
83
83
|
select2_search 'Spree::Gateway::Bogus', from: 'Provider'
|
|
84
84
|
expect(page).to have_no_content('you must save first')
|
|
85
|
-
expect(page).to have_content('
|
|
85
|
+
expect(page).to have_content('Test Mode')
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
it "displays message when changing preference source" do
|
|
@@ -91,16 +91,16 @@ describe "Payment Methods", type: :feature do
|
|
|
91
91
|
create(:credit_card_payment_method)
|
|
92
92
|
click_link "Payment Methods"
|
|
93
93
|
click_icon :edit
|
|
94
|
-
expect(page).to have_content('
|
|
94
|
+
expect(page).to have_content('Test Mode')
|
|
95
95
|
|
|
96
96
|
select2_search 'my_prefs', from: 'Preference Source'
|
|
97
97
|
expect(page).to have_content('you must save first')
|
|
98
|
-
expect(page).to have_no_content('
|
|
98
|
+
expect(page).to have_no_content('Test Mode')
|
|
99
99
|
|
|
100
100
|
# change back
|
|
101
101
|
select2_search 'Custom', from: 'Preference Source'
|
|
102
102
|
expect(page).to have_no_content('you must save first')
|
|
103
|
-
expect(page).to have_content('
|
|
103
|
+
expect(page).to have_content('Test Mode')
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
it "updates successfully and keeps secrets" do
|
|
@@ -118,7 +118,7 @@ describe "Payment Methods", type: :feature do
|
|
|
118
118
|
# change back
|
|
119
119
|
select2_search 'Custom', from: 'Preference Source'
|
|
120
120
|
click_on 'Update'
|
|
121
|
-
expect(page).to have_content('
|
|
121
|
+
expect(page).to have_content('Test Mode')
|
|
122
122
|
expect(page).to have_no_content('secret')
|
|
123
123
|
end
|
|
124
124
|
end
|
|
@@ -32,7 +32,7 @@ describe "Stock Locations", type: :feature do
|
|
|
32
32
|
# Wait for API request to complete.
|
|
33
33
|
wait_for_ajax
|
|
34
34
|
visit current_path
|
|
35
|
-
expect(page).to have_content("
|
|
35
|
+
expect(page).to have_content("No Stock Locations found")
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
it "can update an existing stock location" do
|
|
@@ -12,7 +12,7 @@ describe "Tax Categories", type: :feature do
|
|
|
12
12
|
it "should display the existing tax categories" do
|
|
13
13
|
create(:tax_category, name: "Clothing", tax_code: "CL001", description: "For Clothing")
|
|
14
14
|
click_link "Tax Categories"
|
|
15
|
-
expect(page).to have_content("
|
|
15
|
+
expect(page).to have_content("SettingsTaxesTax Categories")
|
|
16
16
|
within_row(1) do
|
|
17
17
|
expect(column_text(1)).to eq("Clothing")
|
|
18
18
|
expect(column_text(2)).to eq("CL001")
|
|
@@ -43,8 +43,8 @@ describe "Homepage", type: :feature do
|
|
|
43
43
|
within('.selected .admin-subnav') { page.find_link("Option Types")['/admin/option_types'] }
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
it "should have a link to
|
|
47
|
-
within('.selected .admin-subnav') { page.find_link("
|
|
46
|
+
it "should have a link to property types" do
|
|
47
|
+
within('.selected .admin-subnav') { page.find_link("Property Types")['/admin/properties'] }
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
it "should have a link to prototypes" do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe "
|
|
3
|
+
describe "Cancel items" do
|
|
4
4
|
stub_authorization!
|
|
5
5
|
|
|
6
6
|
let!(:order) do
|
|
@@ -20,29 +20,29 @@ describe "Cancelling inventory" do
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
context "when some
|
|
24
|
-
it "can cancel the
|
|
23
|
+
context "when some items are cancelable" do
|
|
24
|
+
it "can cancel the item" do
|
|
25
25
|
visit_order
|
|
26
26
|
|
|
27
|
-
click_link 'Cancel
|
|
27
|
+
click_link 'Cancel Items'
|
|
28
28
|
|
|
29
29
|
within_row(1) do
|
|
30
30
|
check 'inventory_unit_ids[]'
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
click_button "Cancel
|
|
33
|
+
click_button "Cancel Items"
|
|
34
34
|
expect(page).to have_content("Inventory canceled")
|
|
35
35
|
expect(page).to have_content("1 x canceled")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
context "when all
|
|
39
|
+
context "when all items are not cancelable" do
|
|
40
40
|
before { order.inventory_units.each(&:cancel!) }
|
|
41
41
|
|
|
42
|
-
it "does not display the link to cancel
|
|
42
|
+
it "does not display the link to cancel items" do
|
|
43
43
|
visit_order
|
|
44
44
|
|
|
45
|
-
expect(page).to have_no_content('Cancel
|
|
45
|
+
expect(page).to have_no_content('Cancel Items')
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
@@ -16,20 +16,25 @@ describe "Customer Details", type: :feature, js: true do
|
|
|
16
16
|
let!(:user) { create(:user, email: 'foobar@example.com', ship_address: ship_address, bill_address: bill_address) }
|
|
17
17
|
|
|
18
18
|
context "brand new order" do
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
let(:quantity) { 1 }
|
|
20
|
+
|
|
21
|
+
before do
|
|
21
22
|
visit spree.admin_path
|
|
22
23
|
click_link "Orders"
|
|
23
24
|
click_link "New Order"
|
|
24
25
|
click_on 'Cart'
|
|
25
26
|
select2_search product.name, from: Spree.t(:name_or_sku)
|
|
26
27
|
within("table.stock-levels") do
|
|
27
|
-
find('.variant_quantity').set(
|
|
28
|
+
find('.variant_quantity').set(quantity)
|
|
28
29
|
end
|
|
29
|
-
|
|
30
|
+
click_button 'Add'
|
|
30
31
|
expect(page).to have_css('.line-item')
|
|
31
32
|
click_link "Customer"
|
|
32
33
|
targetted_select2 "foobar@example.com", from: "#s2id_customer_search"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Regression test for https://github.com/spree/spree/issues/3335 and https://github.com/spree/spree/issues/5317
|
|
37
|
+
it "associates a user when not using guest checkout" do
|
|
33
38
|
# 5317 - Address prefills using user's default.
|
|
34
39
|
expect(page).to have_field('First Name', with: user.bill_address.firstname)
|
|
35
40
|
expect(page).to have_field('Last Name', with: user.bill_address.lastname)
|
|
@@ -43,6 +48,16 @@ describe "Customer Details", type: :feature, js: true do
|
|
|
43
48
|
click_button "Update"
|
|
44
49
|
expect(Spree::Order.last.user).not_to be_nil
|
|
45
50
|
end
|
|
51
|
+
|
|
52
|
+
context "when required quantity is more than available" do
|
|
53
|
+
let(:quantity) { 11 }
|
|
54
|
+
let!(:product) { create(:product_not_backorderable) }
|
|
55
|
+
|
|
56
|
+
it "displays an error" do
|
|
57
|
+
click_button "Update"
|
|
58
|
+
expect(page).to have_content Spree.t(:insufficient_stock_for_order)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
46
61
|
end
|
|
47
62
|
|
|
48
63
|
context "editing an order" do
|
|
@@ -89,7 +104,7 @@ describe "Customer Details", type: :feature, js: true do
|
|
|
89
104
|
# Regression test for https://github.com/spree/spree/issues/2950 and https://github.com/spree/spree/issues/2433
|
|
90
105
|
# This act should transition the state of the order as far as it will go too
|
|
91
106
|
within("#order_tab_summary") do
|
|
92
|
-
expect(find("dt#order_status + dd")).to have_content("
|
|
107
|
+
expect(find("dt#order_status + dd")).to have_content("complete")
|
|
93
108
|
end
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -17,7 +17,7 @@ describe "Orders Listing", type: :feature, js: true do
|
|
|
17
17
|
it "should list existing orders" do
|
|
18
18
|
within_row(1) do
|
|
19
19
|
expect(column_text(2)).to eq "R100"
|
|
20
|
-
expect(column_text(3)).to eq "
|
|
20
|
+
expect(column_text(3)).to eq "cart"
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
within_row(2) do
|
|
@@ -45,105 +45,132 @@ describe "Orders Listing", type: :feature, js: true do
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
context "searching orders" do
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
context "when there are multiple stores" do
|
|
49
|
+
let(:stores) { FactoryGirl.create_pair(:store) }
|
|
50
|
+
|
|
51
|
+
before do
|
|
52
|
+
stores.each do |store|
|
|
53
|
+
FactoryGirl.create(:completed_order_with_totals, number: "R#{store.id}999", store: store)
|
|
54
|
+
end
|
|
54
55
|
end
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
end
|
|
57
|
+
it "can find the orders belonging to a specific store" do
|
|
58
|
+
main_store, other_store = stores
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
click_on 'Filter Results'
|
|
60
|
+
click_on "Filter"
|
|
61
|
+
select2 main_store.name, from: Spree.t(:store)
|
|
62
|
+
click_on "Filter Results"
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
within_row(1) do
|
|
65
|
+
expect(page).to have_content("R#{main_store.id}999")
|
|
66
|
+
end
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
# Ensure that the other order doesn't show up
|
|
69
|
+
within("table#listing_orders") { expect(page).not_to have_content("R#{other_store.id}999") }
|
|
70
|
+
end
|
|
70
71
|
end
|
|
71
72
|
|
|
72
|
-
context "when
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
context "when there's a single store" do
|
|
74
|
+
it "should be able to search orders" do
|
|
75
|
+
click_on 'Filter'
|
|
76
|
+
fill_in "q_number_cont", with: "R200"
|
|
77
|
+
click_on 'Filter Results'
|
|
78
|
+
within_row(1) do
|
|
79
|
+
expect(page).to have_content("R200")
|
|
80
|
+
end
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
# Ensure that the other order doesn't show up
|
|
83
|
+
within("table#listing_orders") { expect(page).not_to have_content("R100") }
|
|
80
84
|
end
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
it "should be able to go from page to page for incomplete orders" do
|
|
84
|
-
10.times { Spree::Order.create email: "incomplete@example.com" }
|
|
86
|
+
it "should be able to filter on variant_id" do
|
|
85
87
|
click_on 'Filter'
|
|
86
|
-
|
|
88
|
+
select2_search @order1.products.first.sku, from: Spree.t(:variant)
|
|
87
89
|
click_on 'Filter Results'
|
|
88
|
-
within(".pagination", match: :first) do
|
|
89
|
-
click_link "2"
|
|
90
|
-
end
|
|
91
|
-
expect(page).to have_content("incomplete@example.com")
|
|
92
|
-
click_on 'Filter'
|
|
93
|
-
expect(find("#q_completed_at_not_null")).not_to be_checked
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
within_row(1) do
|
|
92
|
+
expect(page).to have_content(@order1.number)
|
|
93
|
+
end
|
|
100
94
|
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
expect(page).not_to have_content(@order2.number)
|
|
96
|
+
end
|
|
103
97
|
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
context "when pagination is really short" do
|
|
99
|
+
before do
|
|
100
|
+
@old_per_page = Spree::Config[:orders_per_page]
|
|
101
|
+
Spree::Config[:orders_per_page] = 1
|
|
102
|
+
end
|
|
106
103
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
after do
|
|
105
|
+
Spree::Config[:orders_per_page] = @old_per_page
|
|
106
|
+
end
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
# Regression test for https://github.com/spree/spree/issues/4004
|
|
109
|
+
it "should be able to go from page to page for incomplete orders" do
|
|
110
|
+
10.times { Spree::Order.create email: "incomplete@example.com" }
|
|
111
|
+
click_on 'Filter'
|
|
112
|
+
uncheck "q_completed_at_not_null"
|
|
113
|
+
click_on 'Filter Results'
|
|
114
|
+
within(".pagination", match: :first) do
|
|
115
|
+
click_link "2"
|
|
116
|
+
end
|
|
117
|
+
expect(page).to have_content("incomplete@example.com")
|
|
118
|
+
click_on 'Filter'
|
|
119
|
+
expect(find("#q_completed_at_not_null")).not_to be_checked
|
|
120
|
+
end
|
|
119
121
|
end
|
|
120
122
|
|
|
121
|
-
it "
|
|
123
|
+
it "should be able to search orders using only completed at input" do
|
|
122
124
|
click_on 'Filter'
|
|
123
|
-
fill_in "
|
|
125
|
+
fill_in "q_created_at_gt", with: Date.current
|
|
126
|
+
|
|
127
|
+
# Just so the datepicker gets out of poltergeists way.
|
|
128
|
+
page.execute_script("$('#q_created_at_gt').datepicker('widget').hide();")
|
|
129
|
+
|
|
124
130
|
click_on 'Filter Results'
|
|
125
131
|
within_row(1) { expect(page).to have_content("R100") }
|
|
132
|
+
|
|
133
|
+
# Ensure that the other order doesn't show up
|
|
126
134
|
within("table#listing_orders") { expect(page).not_to have_content("R200") }
|
|
127
135
|
end
|
|
128
|
-
end
|
|
129
136
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
context "filter on promotions" do
|
|
138
|
+
before(:each) do
|
|
139
|
+
@order1.order_promotions.build(
|
|
140
|
+
promotion: promotion,
|
|
141
|
+
promotion_code: promotion_code
|
|
142
|
+
)
|
|
143
|
+
@order1.save
|
|
144
|
+
visit spree.admin_orders_path
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
it "only shows the orders with the selected promotion" do
|
|
148
|
+
click_on 'Filter'
|
|
149
|
+
fill_in "q_promotions_codes_value_cont", with: promotion.codes.first.value
|
|
150
|
+
click_on 'Filter Results'
|
|
151
|
+
within_row(1) { expect(page).to have_content("R100") }
|
|
152
|
+
within("table#listing_orders") { expect(page).not_to have_content("R200") }
|
|
153
|
+
end
|
|
133
154
|
end
|
|
134
155
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
156
|
+
context "when toggling the completed orders checkbox" do
|
|
157
|
+
before do
|
|
158
|
+
create(:order, number: 'R300', completed_at: nil, state: 'cart')
|
|
159
|
+
end
|
|
138
160
|
|
|
139
|
-
|
|
140
|
-
|
|
161
|
+
it "shows both complete and incomplete orders" do
|
|
162
|
+
check "q_completed_at_not_null"
|
|
163
|
+
click_on 'Filter'
|
|
141
164
|
|
|
142
|
-
|
|
143
|
-
|
|
165
|
+
expect(page).to have_content("R200")
|
|
166
|
+
expect(page).to_not have_content("R300")
|
|
144
167
|
|
|
145
|
-
|
|
146
|
-
|
|
168
|
+
uncheck "q_completed_at_not_null"
|
|
169
|
+
click_on 'Filter Results'
|
|
170
|
+
|
|
171
|
+
expect(page).to have_content("R200")
|
|
172
|
+
expect(page).to have_content("R300")
|
|
173
|
+
end
|
|
147
174
|
end
|
|
148
175
|
end
|
|
149
176
|
end
|
|
@@ -28,7 +28,7 @@ describe "New Order", type: :feature do
|
|
|
28
28
|
|
|
29
29
|
fill_in_quantity("table.stock-levels", "quantity_0", 2)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
click_button 'Add'
|
|
32
32
|
click_on "Customer"
|
|
33
33
|
|
|
34
34
|
within "#select-customer" do
|
|
@@ -56,10 +56,39 @@ describe "New Order", type: :feature do
|
|
|
56
56
|
click_on "ship"
|
|
57
57
|
|
|
58
58
|
within '.carton-state' do
|
|
59
|
-
expect(page).to have_content('
|
|
59
|
+
expect(page).to have_content('shipped')
|
|
60
60
|
end
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
it 'can create split payments', js: true do
|
|
64
|
+
click_on 'Cart'
|
|
65
|
+
select2_search product.name, from: Spree.t(:name_or_sku)
|
|
66
|
+
|
|
67
|
+
fill_in_quantity("table.stock-levels", "quantity_0", 2)
|
|
68
|
+
|
|
69
|
+
click_button 'Add'
|
|
70
|
+
click_on "Customer"
|
|
71
|
+
|
|
72
|
+
within "#select-customer" do
|
|
73
|
+
targetted_select2_search user.email, from: "#s2id_customer_search"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
check "order_use_billing"
|
|
77
|
+
fill_in_address
|
|
78
|
+
click_on "Update"
|
|
79
|
+
|
|
80
|
+
click_on "Payments"
|
|
81
|
+
fill_in "Amount", with: '10.00'
|
|
82
|
+
click_on 'Update'
|
|
83
|
+
|
|
84
|
+
click_on 'New Payment'
|
|
85
|
+
fill_in "Amount", with: '29.98'
|
|
86
|
+
click_on 'Update'
|
|
87
|
+
|
|
88
|
+
expect(page).to have_content("$10.00")
|
|
89
|
+
expect(page).to have_content("$29.98")
|
|
90
|
+
end
|
|
91
|
+
|
|
63
92
|
context "adding new item to the order", js: true do
|
|
64
93
|
it "inventory items show up just fine and are also registered as shipments" do
|
|
65
94
|
click_on 'Cart'
|
|
@@ -67,7 +96,7 @@ describe "New Order", type: :feature do
|
|
|
67
96
|
|
|
68
97
|
fill_in_quantity('table.stock-levels', 'quantity_0', 2)
|
|
69
98
|
|
|
70
|
-
|
|
99
|
+
click_button 'Add'
|
|
71
100
|
|
|
72
101
|
within(".line-items") do
|
|
73
102
|
expect(page).to have_content(product.name)
|
|
@@ -103,7 +132,7 @@ describe "New Order", type: :feature do
|
|
|
103
132
|
|
|
104
133
|
fill_in_quantity('table.stock-levels', 'quantity_0', 1)
|
|
105
134
|
|
|
106
|
-
|
|
135
|
+
click_button 'Add'
|
|
107
136
|
|
|
108
137
|
within(".line-items") do
|
|
109
138
|
within(".line-item-name") do
|
|
@@ -144,7 +173,7 @@ describe "New Order", type: :feature do
|
|
|
144
173
|
click_on "Continue"
|
|
145
174
|
|
|
146
175
|
within(".additional-info .state") do
|
|
147
|
-
expect(page).to have_content("
|
|
176
|
+
expect(page).to have_content("confirm")
|
|
148
177
|
end
|
|
149
178
|
end
|
|
150
179
|
end
|
|
@@ -161,7 +190,7 @@ describe "New Order", type: :feature do
|
|
|
161
190
|
find('.variant_quantity').set(1)
|
|
162
191
|
end
|
|
163
192
|
|
|
164
|
-
|
|
193
|
+
click_button 'Add'
|
|
165
194
|
|
|
166
195
|
expect(page).to have_css('.line-item')
|
|
167
196
|
|