chore: add data-testid's and some additional testing

This commit is contained in:
Stefan Benz
2024-10-30 18:50:32 +01:00
parent 9af39ac1bc
commit 9c041cc46f
22 changed files with 227 additions and 113 deletions

View File

@@ -140,6 +140,7 @@ export function ChangePasswordForm({
})}
label="New Password"
error={errors.password?.message as string}
data-testid="password-text-input"
/>
</div>
<div className="">
@@ -152,6 +153,7 @@ export function ChangePasswordForm({
})}
label="Confirm Password"
error={errors.confirmPassword?.message as string}
data-testid="password-confirm-text-input"
/>
</div>
</div>
@@ -167,7 +169,7 @@ export function ChangePasswordForm({
{error && <Alert>{error}</Alert>}
<div className="mt-8 flex w-full flex-row items-center justify-between">
<BackButton />
<BackButton data-testid="back-button" />
<Button
type="submit"
variant={ButtonVariants.Primary}
@@ -178,6 +180,7 @@ export function ChangePasswordForm({
watchPassword !== watchConfirmPassword
}
onClick={handleSubmit(submitChange)}
data-testid="submit-button"
>
{loading && <Spinner className="h-5 w-5 mr-2" />}
{t("change.submit")}