mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Merge pull request #3527 from luisramos0/2-0-fix-admin-edit-order-page
[Spree Upgrade] Fix edit ship method and tracking number in backoffice order page
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
.no-objects-found
|
||||
= Spree.t(:your_order_is_empty_add_product)
|
||||
|
||||
%div
|
||||
%div{"data-hook" => "admin_order_edit_form"}
|
||||
= render :partial => 'form', :locals => { :order => @order }
|
||||
|
||||
- content_for :head do
|
||||
|
||||
@@ -221,6 +221,8 @@ feature %q{
|
||||
end
|
||||
|
||||
feature "viewing the edit page" do
|
||||
let!(:different_shipping_method) { create(:shipping_method, name: "Different Shipping Method") }
|
||||
|
||||
background do
|
||||
Spree::Config[:enable_receipt_printing?] = true
|
||||
|
||||
@@ -283,6 +285,28 @@ feature %q{
|
||||
end
|
||||
end
|
||||
|
||||
scenario "can edit shipping method" do
|
||||
expect(page).to_not have_content different_shipping_method.name
|
||||
|
||||
find('.edit-method').click
|
||||
expect(page).to have_select2 'selected_shipping_rate_id', with_options: [different_shipping_method.name]
|
||||
select2_select different_shipping_method.name, from: 'selected_shipping_rate_id'
|
||||
find('.save-method').click
|
||||
|
||||
expect(page).to have_content different_shipping_method.name
|
||||
end
|
||||
|
||||
scenario "can edit tracking number" do
|
||||
test_tracking_number = "ABCCBA"
|
||||
expect(page).to_not have_content test_tracking_number
|
||||
|
||||
find('.edit-tracking').click
|
||||
fill_in "tracking", with: test_tracking_number
|
||||
find('.save-tracking').click
|
||||
|
||||
expect(page).to have_content test_tracking_number
|
||||
end
|
||||
|
||||
scenario "can print an order's ticket" do
|
||||
find("#links-dropdown .ofn-drop-down").click
|
||||
|
||||
|
||||
Reference in New Issue
Block a user