Merge pull request #10513 from jibees/10505-add-shopper-comment-to-order-detail-summary

SplitCheckout: Display special_instructions of the order as emphasized text if present on summary page
This commit is contained in:
Rachel Arnould
2023-03-08 10:30:40 +01:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@@ -34,6 +34,10 @@
= @order.bill_address.zipcode
%div
= @order.bill_address.country
- if @order.special_instructions.present?
%br
%em
= @order.special_instructions
- if @order.shipping_method.description.present?
%div
.summary-subtitle

View File

@@ -793,6 +793,17 @@ describe "As a consumer, I want to checkout my order" do
create(:order_ready_for_confirmation, distributor: distributor)
}
describe "with an order with special instructions" do
before do
order.update_attribute(:special_instructions, "Please deliver on Tuesday")
visit checkout_step_path(:summary)
end
it "displays the special instructions" do
expect(page).to have_content "Please deliver on Tuesday"
end
end
describe "completing the checkout" do
it "keeps the distributor selected for the current user after completion" do
visit checkout_step_path(:summary)