diff --git a/app/furniture/marketplace/checkouts/show.html.erb b/app/furniture/marketplace/checkouts/show.html.erb index 6c077ceef..1d1ba486f 100644 --- a/app/furniture/marketplace/checkouts/show.html.erb +++ b/app/furniture/marketplace/checkouts/show.html.erb @@ -1,4 +1,4 @@ -<%= turbo_frame_tag(checkout.marketplace) do %> +<%= turbo_frame_tag(checkout.marketplace, data: { turbo_action: :advance }) do %> <%= link_to(t("marketplace.marketplaces.show.link_to"), marketplace.location) %>

Checkout

<%= render CardComponent.new do %> diff --git a/app/furniture/marketplace/marketplaces/_marketplace.html.erb b/app/furniture/marketplace/marketplaces/_marketplace.html.erb index 4093bfcd5..1aace213d 100644 --- a/app/furniture/marketplace/marketplaces/_marketplace.html.erb +++ b/app/furniture/marketplace/marketplaces/_marketplace.html.erb @@ -1,3 +1,3 @@ -<%= turbo_frame_tag(marketplace) do %> +<%= turbo_frame_tag(marketplace, data: { turbo_action: :advance }) do %> <%= render Marketplace::MarketplaceComponent.new(marketplace: marketplace) %> <%- end %> diff --git a/app/furniture/marketplace/marketplaces/show.html.erb b/app/furniture/marketplace/marketplaces/show.html.erb index 15e944c8c..0727dd5b8 100644 --- a/app/furniture/marketplace/marketplaces/show.html.erb +++ b/app/furniture/marketplace/marketplaces/show.html.erb @@ -1,4 +1,4 @@ <%- breadcrumb :marketplace, marketplace %> -<%= turbo_frame_tag(marketplace) do %> +<%= turbo_frame_tag(marketplace, data: { turbo_action: :advance }) do %> <%= render Marketplace::MarketplaceComponent.new(marketplace: marketplace) %> <%- end %> diff --git a/spec/furniture/marketplace/buying_products_system_spec.rb b/spec/furniture/marketplace/buying_products_system_spec.rb index 3dfc12ff0..7da8fbc8f 100644 --- a/spec/furniture/marketplace/buying_products_system_spec.rb +++ b/spec/furniture/marketplace/buying_products_system_spec.rb @@ -32,11 +32,14 @@ def url_options expect(page).to have_content("Total: #{humanized_money_with_symbol(marketplace.products.first.price + marketplace.delivery_areas.first.price)}") click_link("Checkout") + expect(page).to have_current_path(polymorphic_path(marketplace.carts.first.location(child: :checkout))) set_delivery_details(delivery_address: "123 N West St Oakland, CA", contact_email: "AhsokaTano@example.com", contact_phone_number: "1234567890") + expect(page).to have_current_path(polymorphic_path(marketplace.carts.first.location(child: :checkout))) + pay(card_number: "4000000000000077", card_expiry: "1240", card_cvc: "123", billing_name: "Ahsoka Tano", email: "AhsokaTano@example.com", billing_postal_code: "12345") expect(page).to have_content("Order History", wait: 30)