You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix admin/orders_spec spec related to "filling customer details" and making sure user addresses are used in new orders.
Thsi error below can be easily fixed. It's caused by the fact that the factory order_with_totals_and_distribution already has a shipment, so we can't add a new shipment to the order.
Instead of https://github.com/openfoodfoundation/openfoodnetwork/blob/2-0-stable/spec/features/admin/orders_spec.rb#L153
we can set the order ship_address and the existing shipment.address.
But after this problem is solved, we get to the main issue, which is that the create order page is broken.
Same in #2938 where it will also hit the same problem after the "line items blank" issue is solved.
I dont think we should fix this specific issue now, we should first fix the "new order" page.
5)
As an administrator
I want to manage orders
filling customer details
Failure/Error: @order.shipments << create(:shipment_with, :shipping_method, shipping_method: shipping_method)
ActiveRecord::RecordNotUnique:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_spree_shipments_on_order_id"
DETAIL: Key (order_id)=(10) already exists.
: UPDATE "spree_shipments" SET "order_id" = 10, "updated_at" = '2018-11-20 06:40:54.692941' WHERE "spree_shipments"."id" = 11
# ./spec/features/admin/orders_spec.rb:153:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::UniqueViolation:
# ERROR: duplicate key value violates unique constraint "index_spree_shipments_on_order_id"
# DETAIL: Key (order_id)=(10) already exists.
# ./spec/features/admin/orders_spec.rb:153:in `block (2 levels) in <top (required)>'
The text was updated successfully, but these errors were encountered:
luisramos0
changed the title
[Spree Upgrade]
[Spree Upgrade][Admin/Orders/New] New orders page - user address is used in new orders (1 broken test)
Nov 21, 2018
luisramos0
changed the title
[Spree Upgrade][Admin/Orders/New] New orders page - user address is used in new orders (1 broken test)
[Spree Upgrade] Fetch existing user address for the customer details in the edit orders page (1 broken test)
Feb 1, 2019
Fix admin/orders_spec spec related to "filling customer details" and making sure user addresses are used in new orders.
Thsi error below can be easily fixed. It's caused by the fact that the factory order_with_totals_and_distribution already has a shipment, so we can't add a new shipment to the order.
Instead of
https://github.com/openfoodfoundation/openfoodnetwork/blob/2-0-stable/spec/features/admin/orders_spec.rb#L153
we can set the order ship_address and the existing shipment.address.
But after this problem is solved, we get to the main issue, which is that the create order page is broken.
Same in #2938 where it will also hit the same problem after the "line items blank" issue is solved.
I dont think we should fix this specific issue now, we should first fix the "new order" page.
The text was updated successfully, but these errors were encountered: