diff --git a/components/Forms/Register/index.tsx b/components/Forms/Register/index.tsx index 9494e59a7..28d10a4f6 100644 --- a/components/Forms/Register/index.tsx +++ b/components/Forms/Register/index.tsx @@ -146,6 +146,7 @@ export default function Form() { type="submit" intent="primary" disabled={methods.formState.isSubmitting} + data-testid="submit" > {intl.formatMessage({ id: "Sign up to Scandic Friends" })} diff --git a/components/TempDesignSystem/Form/Checkbox/index.tsx b/components/TempDesignSystem/Form/Checkbox/index.tsx index 339dff676..8b2885ebc 100644 --- a/components/TempDesignSystem/Form/Checkbox/index.tsx +++ b/components/TempDesignSystem/Form/Checkbox/index.tsx @@ -26,6 +26,7 @@ export default function Checkbox({ className={styles.container} isSelected={field.value} onChange={field.onChange} + data-testid={name} > {({ isSelected }) => ( <> diff --git a/components/TempDesignSystem/Form/Country/index.tsx b/components/TempDesignSystem/Form/Country/index.tsx index 9777a4a48..0a5406640 100644 --- a/components/TempDesignSystem/Form/Country/index.tsx +++ b/components/TempDesignSystem/Form/Country/index.tsx @@ -68,6 +68,7 @@ export default function CountrySelect({ onSelectionChange={handleChange} ref={field.ref} selectedKey={field.value} + data-testid={name} >
) @@ -135,7 +138,9 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { placeholder="MM" required tabIndex={2} - value={segment.isPlaceholder ? undefined : segment.value} + defaultValue={ + segment.isPlaceholder ? undefined : segment.value + } /> ) @@ -151,7 +156,9 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { placeholder="YYYY" required tabIndex={1} - value={segment.isPlaceholder ? undefined : segment.value} + defaultValue={ + segment.isPlaceholder ? undefined : segment.value + } /> )