diff --git a/app/views/spree/admin/orders/customer_details/edit.html.haml b/app/views/spree/admin/orders/customer_details/edit.html.haml index e4fa93ffbb..f6a83316da 100644 --- a/app/views/spree/admin/orders/customer_details/edit.html.haml +++ b/app/views/spree/admin/orders/customer_details/edit.html.haml @@ -9,7 +9,7 @@ - content_for :page_actions do %li= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left' -- if @order.cart? +- if @order.cart? || @order.address? #select-customer{"data-hook" => ""} %fieldset.no-border-bottom %legend{:align => "center"}= Spree.t(:customer_search) diff --git a/spec/features/admin/orders_spec.rb b/spec/features/admin/orders_spec.rb index 09bec96ccf..caa0a1613b 100644 --- a/spec/features/admin/orders_spec.rb +++ b/spec/features/admin/orders_spec.rb @@ -169,6 +169,9 @@ feature ' expect(page).to have_selector 'h1.page-title', text: "Customer Details" + # The customer selection partial should be visible + expect(page).to have_selector '#select-customer' + # And I select that customer's email address and save the order targetted_select2_search @customer.email, from: '#customer_search_override', dropdown_css: '.select2-drop' click_button 'Update'