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:
Matt-Yorkley
2021-09-02 20:45:22 +02:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@@ -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)

View File

@@ -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