feat(SW-360): Added test for register user form

This commit is contained in:
Tobias Johansson
2024-09-12 16:08:03 +02:00
committed by Pontus Dreij
parent 88c343691d
commit 3872664d1d
6 changed files with 95 additions and 7 deletions

View File

@@ -48,7 +48,6 @@ export default function Form() {
const zipCode = intl.formatMessage({ id: "Zip code" })
async function handleSubmit(data: RegisterSchema) {
console.log("submit", data)
const isSuccessResponse = await registerUser(data)
if (!isSuccessResponse) {
toast.error("Something went wrong!")
@@ -66,11 +65,6 @@ export default function Form() {
<section className={styles.container}>
<FormProvider {...methods}>
<form
/**
* Ignoring since ts doesn't recognize that tRPC
* parses FormData before reaching the route
* @ts-ignore */
action={registerUser}
className={styles.form}
id="register"
onSubmit={methods.handleSubmit(handleSubmit)}