Luis Ramos
f0183cd17e
Merge pull request #2762 from luisramos0/2-0-order-model-spec
...
[Spree Upgrade] Fixed updates of order.shipping_method_id and improved order, stock_location and shipment factories
2018-09-27 13:43:58 +01:00
Pau Pérez Fabregat
060b3c55f1
Merge pull request #2751 from luisramos0/2-0-order-details
...
[Spree Upgrade] Refactored spree/order_details, extracted delivery and pickup details into separate partials
2018-09-27 14:30:42 +02:00
luisramos0
4f32a8efc2
Fixed shipment factory by making shipments unique per order and stock_location factory by making stock_location unique
2018-09-25 00:49:03 +01:00
Pau Perez
eb64569c9a
Destroy all shipments when clearing order
...
Now we only clear the order's shipping_method, and in Spree 2.0 it can
have many shipments.
2018-09-24 15:25:33 +01:00
luisramos0
89114655fd
Fixed shipping_method update in features/consumer/shopping/orders_spec, order.shipment is now updated instead of order.shipping_method_id
2018-09-24 15:13:36 +01:00
luisramos0
4476b88044
Fixed shipping_method update in models/spree/order_spec, order.shipment is now updated instead of order.shipping_method_id
2018-09-24 15:13:36 +01:00
luisramos0
99fff3d279
Fixed factory completed_order_with_fees by skipping a failing and unnecessary part of the checkout workflow
...
Fixed factory's shipment_with shipping_fees trait by ensuring only one shipping_rate in the shipment
2018-09-24 15:13:35 +01:00
Luis Ramos
08104c62be
Merge pull request #2667 from luisramos0/2-0-ship-method-last-used-address
...
[Spree Upgrade] Adapt Address_Finder.last_used_ship_address to spree 2
2018-09-24 15:07:27 +01:00
Luis Ramos
0eb2854f8a
Merge pull request #2680 from luisramos0/2-0-stable-x
...
[Spree Upgrade] Fixed inexistent order#shipping_method= in several specs
2018-09-24 15:07:04 +01:00
Pau Pérez Fabregat
128ec1623a
Merge pull request #2760 from luisramos0/2-0-admin-enterprise-spec
...
[Spree Upgrade] In admin enterprises spec, replacing select2_search with select2_select
2018-09-24 11:15:18 +02:00
Pau Pérez Fabregat
52a412a218
Merge pull request #2638 from coopdevs/unit-test-variant-stock
...
Unit test variant stock
2018-09-24 11:14:03 +02:00
Maikel
26eb79f5f2
Merge pull request #2729 from luisramos0/2-0-ship-method-curr-order-ser
...
[Spree Upgrade] Replace order.shipping_method_id in current_order_serializer
2018-09-24 08:56:21 +10:00
luisramos0
a04e90d188
In admin enterprises spec, replacing select2_search with select2_select makes all tests pass. Also made screen size longer to avoid errors with overlaying components
2018-09-20 23:58:14 +01:00
luisramos0
57bb1fec9a
Adapt ShippingMethodsController to keep disallowing delete of shipping_methods associated with orders. Added controller tests to verify behaviour
2018-09-19 16:21:12 +01:00
Pau Pérez Fabregat
99ba9d7d1b
Merge branch '2-0-stable' into unit-test-variant-stock
2018-09-19 15:41:21 +02:00
Pau Perez
b77dd41eb0
Refactored spree/order_details, extracted delivery and pickup details into separate partials.
...
This was copied/adapted from 6f7c8bb8b1
2018-09-19 14:20:44 +01:00
luisramos0
edcdf59621
In current_order_serializer, serialize shipping_method_id from order.shipping_method.id. Adapted respective spec.
2018-09-18 16:11:01 +01:00
Pau Perez
314ad5400f
Move variant_stock.rb to concerns/
2018-09-18 12:18:50 +02:00
luisramos0
843cd44b23
In paypal_spec, fixed setting shipping_method in order, this is now done through order shipments
2018-09-17 00:51:01 +01:00
luisramos0
c66b611b99
Fixed setting shipping_method in the order through order.shipments in proxy_order_spec, lib/open_food_network/customers_report_spec and features/admin/shipping_methods_spec
2018-09-17 00:51:01 +01:00
luisramos0
75656668cd
Fixed query in order_cycle_management_report and fixed the respective spec by setting shipping_method in order through shipments
2018-09-17 00:51:01 +01:00
luisramos0
38c2f52278
In features/admin/reports_spec, fixed setting shipping_method in order, this is now done through order shipments
2018-09-17 00:51:01 +01:00
luisramos0
fbd2d96b05
Moved shipment and shipping_method factories with flat rate and shipping fees to traits
2018-09-17 00:51:01 +01:00
luisramos0
7b6e4825e7
Fixed controllers/spree/admin/orders/customer_details_controller_spec:
...
- fixed order creation to use order.shipments instead of order.shipping_method
- adapted test to new spree 2 controller logic (shipments page is gone since 67f568914988bcc0a1fc520d15ed6444a6d12824 and redirect logic changed on e9cde1b4d570dd4f7f979ac71a58d6f3f342ebb4)
2018-09-17 00:44:14 +01:00
luisramos0
93ac99b5cc
Added new factory for shipping_method_with trait delivery to fix order.shipping_method issue in features/admin/orders_spec
2018-09-17 00:44:14 +01:00
luisramos0
8e5f43ed25
Fixed current order serializer spec name
2018-09-14 23:12:00 +01:00
luisramos0
5b3a529487
Adapted address_finder_spec to spree 2 shipments
2018-09-14 18:41:59 +01:00
Pau Perez
ce148e0197
Fix failing spec due to wrong attribute
2018-09-12 18:19:08 +02:00
luisramos0
3577f3790d
Moved order.shipping_method to the OrderShippingMethod concern
2018-09-11 00:24:35 +01:00
luisramos0
62951f7d48
Removing duplicated factories inserted by previous PRs: 2668 and 2670
2018-09-10 16:51:20 +01:00
Pau Pérez Fabregat
cde2f98514
Merge pull request #2590 from luisramos0/spree2_mail_method_create
...
Spree 2 - MailMethod - CreateMailMethod is now MailConfiguration
2018-09-10 12:08:23 +02:00
Pau Pérez Fabregat
a906ad15bd
Merge pull request #2670 from luisramos0/2-0-ship-method-adjustment-spec
...
[Spree 2 Upgrade] Fix issues related to shipments in adjustment_spec
2018-09-10 11:32:54 +02:00
luisramos0
44d81622ac
CreateMailMethod is now MailConfiguration and it uses Spree Config instead of MailMethod. The call from db/seeds was updated accordingly
2018-09-10 10:21:23 +01:00
Pau Pérez Fabregat
5a11af9118
Merge pull request #2668 from luisramos0/2-0-ship-method-order-spec
...
[Spree 2 Upgrade] Fixed models/order_spec issues related to order.shipping_method
2018-09-10 11:18:10 +02:00
Maikel
bce2c1cfd5
Merge pull request #2588 from luisramos0/spree2_mail_method_specs
...
Spree 2 Upgrade - MailMethod - Fix "undefined mail method" error in specs
2018-09-10 11:28:34 +10:00
luisramos0
2f1616a286
Changed reference from order.shipping_method to order.shipments in adjustment_spec
2018-09-09 23:32:59 +01:00
luisramos0
5bcc49a61c
Removed calls to the now inexistent order.create_shipment! from specs
2018-09-09 23:16:19 +01:00
luisramos0
73512d3591
Replaced order.shipping_method with order.shipments in models.order_spec.
...
Fixed factory completed_order_with_fees used in order_spec and also in line_items_controller_spec and orders_controller_spec.
2018-09-09 23:13:32 +01:00
luisramos0
afedbe45ab
Fixed scenario "guest order with registered email" in order_spec
...
Spree order factory requires user (we are setting it to nil below so, no impact on the test)
Defining shipping method is not necessary for this test
2018-09-09 23:13:32 +01:00
luisramos0
d6cff9bc68
Removed calls to the now inexistent order.create_shipment! from specs
2018-09-09 23:13:27 +01:00
Pau Perez
8848af15ee
Raise when a variant has more than a stock item
...
This means we violated the business rules of having a single stock
location for the OFN instance and hence a single stock item per variant.
Although it is too late to preserve the data integrity we can know data
needs to be cleaned up.
2018-09-06 13:20:52 +02:00
Pau Perez
fc5882686a
Add unit tests to VariantStock
...
This also replaces the after_save callback to after_update.
We enforce a stock_item exists when modifying the variant and the
stock_item gets created on variant's after_create. This means it's not
possible to use any of the VariantStock's setters before the variant is
persisted so executing the callback on creation is pointless.
2018-09-06 13:20:52 +02:00
luisramos0
89d51d75ae
Merge branch 'master' into 2-0-stable-sept
2018-09-04 17:43:20 +01:00
Maikel
0d2fa3dc40
Merge pull request #2611 from luisramos0/cookies_banner_font_size
...
[Cookies] Increased cookies banner font size for med/large screens to improve readability
2018-09-04 11:35:32 +10:00
Maikel
1b6bb72966
Merge pull request #2587 from luisramos0/spree2_order_mailer_decorator_bug
...
Spree 2 Upgrade - MailMethod - Fixed bug on order_mailer_decorator (only visible in spree 2)
2018-09-04 11:29:51 +10:00
Pau Pérez Fabregat
7dbbc3e9d8
Merge pull request #2610 from luisramos0/cookies_banner_bug
...
[Cookies] Added new test to cookies spec to cover bug on cookies banner and fix…
2018-09-03 17:23:17 +02:00
Pau Pérez Fabregat
0f118baa4e
Merge pull request #2615 from mkllnk/2575-variant-on-hand-api
...
2575 variant on hand api
2018-09-03 11:16:02 +02:00
luisramos0
8004abbb9f
Improved Order mailer and Subscriptions mailer specs by removing dependency to old mail method
2018-09-03 10:03:06 +01:00
Maikel
1b264403e0
Merge pull request #2624 from kristinalim/fix-no_order_link_in_subscription_emails_unless_user
...
Subscription emails for customer should not link to order page if customer has no user account
2018-09-03 14:38:56 +10:00
Maikel
3fadd06dc7
Merge pull request #2613 from luisramos0/cookies_better_policy_page
...
[Cookies] Updated cookies policy page text
2018-09-03 11:49:14 +10:00