mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Display special_instructions of order as emphasized text if present
+ update spec as well
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user