11599-Change page title on checkout pages

This commit is contained in:
Arun Guleria
2023-12-07 20:33:45 +05:30
committed by Arun
parent 029b8ce255
commit 4e408d404b
6 changed files with 28 additions and 1 deletions

View File

@@ -148,4 +148,10 @@ module CheckoutHelper
]
end
end
# Set the Page title of checkout process as step based like
# Checkout Details, Checkout Payment and Checkout Summary
def checkout_page_title
t("checkout_#{checkout_step}_title")
end
end

View File

@@ -1,5 +1,5 @@
- content_for(:title) do
= t :checkout_title
= checkout_page_title
.darkswarm.footer-pad{"data-turbo": "true"}
- content_for :order_cycle_form do

View File

@@ -2227,6 +2227,9 @@ en:
order_back_to_store: Back To Store
order_back_to_cart: Back To Cart
order_back_to_website: Back To Website
checkout_details_title: Checkout Details
checkout_payment_title: Checkout Payment
checkout_summary_title: Checkout Summary
bom_tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required."

View File

@@ -396,6 +396,12 @@ describe "As a consumer, I want to checkout my order" do
expect(page).to have_field "order_bill_address_attributes_zipcode", with: "TST01"
end
end
describe "show page title as Checkout Details - Open Food Network" do
it "should display title as Checkout Details - Open Food Network" do
page.has_title? "Checkout Details - Open Food Network"
end
end
end
end
end

View File

@@ -331,6 +331,12 @@ describe "As a consumer, I want to checkout my order" do
end
end
end
describe "show page title as Checkout Payment - Open Food Network" do
it "should display title as Checkout Payment - Open Food Network" do
page.has_title? "Checkout Payment - Open Food Network"
end
end
end
end

View File

@@ -404,6 +404,12 @@ describe "As a consumer, I want to checkout my order" do
end
end
end
describe "show page title as Checkout Summary - Open Food Network" do
it "should display title as Checkout Summary - Open Food Network" do
page.has_title? "Checkout Summary - Open Food Network"
end
end
end
def add_voucher_to_order(voucher, order)