From 5c05be22f58849b7c9eb563757bba24b411b017d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 27 Aug 2021 14:19:38 +0200 Subject: [PATCH] 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 --- app/views/spree/admin/orders/_shipment_manifest.html.haml | 3 +-- spec/features/admin/order_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/spree/admin/orders/_shipment_manifest.html.haml b/app/views/spree/admin/orders/_shipment_manifest.html.haml index 5393b4a5d3..28a1596f06 100644 --- a/app/views/spree/admin/orders/_shipment_manifest.html.haml +++ b/app/views/spree/admin/orders/_shipment_manifest.html.haml @@ -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) diff --git a/spec/features/admin/order_spec.rb b/spec/features/admin/order_spec.rb index 6a97135dea..a144755045 100644 --- a/spec/features/admin/order_spec.rb +++ b/spec/features/admin/order_spec.rb @@ -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