Add unit tests for OAuthButtons and LinkedAccountsSettings components

- Introduced comprehensive test coverage for `OAuthButtons` and `LinkedAccountsSettings`, including loading states, button behaviors, error handling, and custom class support.
- Implemented `LinkedAccountsPage` tests for rendering and component integration.
- Adjusted E2E coverage exclusions in various components, focusing on UI-heavy and animation-based flows best suited for E2E tests.
- Refined Jest coverage thresholds to align with improved unit test additions.
This commit is contained in:
Felipe Cardoso
2025-11-25 08:52:11 +01:00
parent 13f617828b
commit aeed9dfdbc
15 changed files with 606 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ const createPasswordChangeSchema = (t: (key: string) => string) =>
.regex(/[^A-Za-z0-9]/, t('newPasswordSpecial')),
confirm_password: z.string().min(1, t('confirmPasswordRequired')),
})
// istanbul ignore next - Zod refine callback hard to test in isolation
.refine((data) => data.new_password === data.confirm_password, {
message: t('passwordMismatch'),
path: ['confirm_password'],