Update admin adjustments controller

This commit is contained in:
Matt-Yorkley
2021-02-11 16:53:59 +00:00
parent f94f424b63
commit 833aae23e5
2 changed files with 6 additions and 2 deletions

View File

@@ -15,7 +15,11 @@ module Spree
end
def collection
parent.adjustments.eligible
parent.adjustments.eligible | parent.shipment_adjustments.shipping
end
def find_resource
parent.all_adjustments.eligible.find(params[:id])
end
# Choose a default tax rate to show on the edit form. The adjustment stores its included

View File

@@ -323,7 +323,7 @@ feature '
scenario "editing shipping fees" do
click_link "Adjustments"
shipping_adjustment_tr_selector = "tr#spree_adjustment_#{order.adjustments.shipping.first.id}"
shipping_adjustment_tr_selector = "tr#spree_adjustment_#{order.shipment_adjustments.first.id}"
page.find("#{shipping_adjustment_tr_selector} td.actions a.icon-edit").click
fill_in "Amount", with: "5"