add legal page generator for privacy, delivery, and terms
All checks were successful
deploy / deploy (push) Successful in 1m23s
All checks were successful
deploy / deploy (push) Successful in 1m23s
Replaces hardcoded PreviewData placeholders with generated content derived from real shop state: connected providers (production lead times), shipping countries (grouped by region), shop country (jurisdiction language and governing law), and feature flags (abandoned cart recovery section, newsletter, VAT clause). Returns policy correctly cites Consumer Contracts Regulations Reg 28(1)(b) for POD exemption and Consumer Rights Act for defective goods. Cart recovery section uses jurisdiction-specific wording: PECR Reg 22 for UK, GDPR Art 6(1)(f) for EU, generic otherwise. About page unchanged — shop owner's story to tell. 26 new tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,16 +36,15 @@ defmodule BerrypodWeb.Shop.ContentTest do
|
||||
test "displays delivery content", %{conn: conn} do
|
||||
{:ok, _view, html} = live(conn, ~p"/delivery")
|
||||
|
||||
assert html =~ "Shipping"
|
||||
assert html =~ "Production time"
|
||||
assert html =~ "Returns & exchanges"
|
||||
assert html =~ "Cancellations"
|
||||
end
|
||||
|
||||
test "displays list items", %{conn: conn} do
|
||||
test "displays shipping fallback when no rates are configured", %{conn: conn} do
|
||||
{:ok, _view, html} = live(conn, ~p"/delivery")
|
||||
|
||||
assert html =~ "United Kingdom"
|
||||
assert html =~ "5–8 business days"
|
||||
assert html =~ "worldwide"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -78,7 +77,7 @@ defmodule BerrypodWeb.Shop.ContentTest do
|
||||
{:ok, _view, html} = live(conn, ~p"/terms")
|
||||
|
||||
assert html =~ "Products"
|
||||
assert html =~ "Orders & payment"
|
||||
assert html =~ "Payment"
|
||||
assert html =~ "Intellectual property"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user