diff --git a/frontend/application/components/ContactFormClient.tsx b/frontend/application/components/ContactFormClient.tsx index 43d83cd6..0cfbe5b3 100644 --- a/frontend/application/components/ContactFormClient.tsx +++ b/frontend/application/components/ContactFormClient.tsx @@ -150,7 +150,9 @@ export default function ContactFormClient() { setName(e.target.value)} className="w-full bg-medical-gray-50 border border-medical-gray-200 rounded-2xl p-4 text-sm font-bold focus:outline-none focus:ring-2 focus:ring-canina-blue/20" @@ -162,7 +164,10 @@ export default function ContactFormClient() { setPhone(e.target.value)} className="w-full bg-medical-gray-50 border border-medical-gray-200 rounded-2xl p-4 text-sm font-bold text-left focus:outline-none focus:ring-2 focus:ring-canina-blue/20" diff --git a/frontend/application/components/__tests__/ContactFormClient.test.tsx b/frontend/application/components/__tests__/ContactFormClient.test.tsx index 81c379e2..4d6c7403 100644 --- a/frontend/application/components/__tests__/ContactFormClient.test.tsx +++ b/frontend/application/components/__tests__/ContactFormClient.test.tsx @@ -131,4 +131,17 @@ describe("ContactFormClient Component", () => { expect(screen.getByText("خطا در سرور، لطفاً بعداً تلاش کنید.")).toBeInTheDocument(); }); }); + + it("provides standard autocomplete and inputmode attributes on contact inputs", () => { + vi.mocked(api.get).mockResolvedValueOnce({ data: [] }); + render(); + + const nameInput = document.getElementById("contact-name"); + const phoneInput = document.getElementById("contact-phone"); + + expect(nameInput).toHaveAttribute("autocomplete", "name"); + expect(phoneInput).toHaveAttribute("autocomplete", "tel"); + expect(phoneInput).toHaveAttribute("inputmode", "tel"); + }); + });