fix(contact): add standard autocomplete, inputmode and attributes for contact inputs
Deploy Canina / deploy (push) Successful in 2m10s
Deploy Canina / deploy (push) Successful in 2m10s
This commit is contained in:
1 parent
f9d70bc196
commit
b4fdd7abb8
2 files changed
+19
-1
No files matched your search
@@ -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(<ContactFormClient />);
|
||||
|
||||
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");
|
||||
});
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user