mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Merge pull request #8111 from jibees/4582-remove-units-on-quantity-column-
Display variant quantity on the quantity column on the edit order page in backoffice
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
%td.item-price.align-center
|
||||
= line_item.single_money.to_html
|
||||
%td.item-qty-show.align-center
|
||||
- item.states.each do |state,count|
|
||||
= "#{count} x #{t(state.humanize.downcase, scope: [:spree, :shipment_states], default: [:missing, "none"])}"
|
||||
= item.quantity
|
||||
- unless shipment.shipped?
|
||||
%td.item-qty-edit.hidden
|
||||
= quantity_field_tag(item)
|
||||
|
||||
@@ -148,7 +148,7 @@ feature '
|
||||
|
||||
expect(page).to_not have_content "Loading..."
|
||||
within("tr.stock-item", text: order.products.first.name) do
|
||||
expect(page).to have_text("#{max_quantity} x")
|
||||
expect(page).to have_text("#{max_quantity}")
|
||||
end
|
||||
expect(order.reload.line_items.first.quantity).to eq(max_quantity)
|
||||
end
|
||||
@@ -169,7 +169,7 @@ feature '
|
||||
end
|
||||
|
||||
within("tr.stock-item", text: order.products.first.name) do
|
||||
expect(page).to have_text("1000 x")
|
||||
expect(page).to have_text("1000")
|
||||
end
|
||||
expect(order.reload.line_items.first.quantity).to eq(1000)
|
||||
end
|
||||
@@ -202,7 +202,7 @@ feature '
|
||||
expect(page).to have_selector("table.stock-contents")
|
||||
|
||||
within("tr.stock-item") do
|
||||
expect(page).to have_text("50 x")
|
||||
expect(page).to have_text("50")
|
||||
end
|
||||
|
||||
order = Spree::Order.last
|
||||
|
||||
Reference in New Issue
Block a user