From 79764c7766cbe3e609febef3441ad632f467588b Mon Sep 17 00:00:00 2001 From: jamey Date: Tue, 24 Feb 2026 23:11:12 +0000 Subject: [PATCH] add test asserting order tracking form has no-JS action Checks the form renders with action='/contact/lookup' and method='post' so it works when JS is unavailable. Co-Authored-By: Claude Opus 4.6 --- test/berrypod_web/live/shop/contact_test.exs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/berrypod_web/live/shop/contact_test.exs b/test/berrypod_web/live/shop/contact_test.exs index f2f4dd4..dda2787 100644 --- a/test/berrypod_web/live/shop/contact_test.exs +++ b/test/berrypod_web/live/shop/contact_test.exs @@ -35,6 +35,14 @@ defmodule BerrypodWeb.Shop.ContactTest do end end + describe "no-JS fallback" do + test "order tracking form has action for no-JS submission", %{conn: conn} do + {:ok, view, _html} = live(conn, ~p"/contact") + + assert has_element?(view, "form[action='/contact/lookup'][method='post']") + end + end + describe "order lookup" do test "sends magic link when orders exist for email", %{conn: conn} do order_fixture(%{customer_email: "buyer@example.com", payment_status: "paid"})