As it is a quantity column, display variant quantity

(this column was confused, and was understood like a simply quantity column not the item quantity separated according to its "state")

Update specs as well
This commit is contained in:
Jean-Baptiste Bellet
2021-08-27 14:19:38 +02:00
parent e833921d2f
commit 5c05be22f5
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