Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
parkerdavis1 committed Jan 8, 2024
1 parent d2ed1ec commit 3b85c3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/routes/_auth+/onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export default function OnboardingPage() {
htmlFor: fields.username.id,
children: 'Username',
}}
description="Used for logging in (cannot be an email address)"
inputProps={{
...conform.input(fields.username),
autoComplete: 'username',
Expand All @@ -181,7 +182,6 @@ export default function OnboardingPage() {
typeof fields.username.initialError !== 'undefined',
}}
errors={fields.username.errors}
description="Cannot be an email address"
/>
<Field
labelProps={{ htmlFor: fields.name.id, children: 'Full Name' }}
Expand Down
2 changes: 1 addition & 1 deletion app/utils/user-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const passwordSchema = z

export const nameSchema = z
.string()
.min(3, { message: 'Name is too short' })
.min(2, { message: 'Name is too short' })
.max(40, { message: 'Name is too long' })

export const emailSchema = z
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/onboarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ test('onboarding with link', async ({ page }) => {
.getByRole('textbox', { name: /^username/i })
.fill(onboardingData.username)

await page.getByRole('textbox', { name: /^name/i }).fill(onboardingData.name)
await page
.getByRole('textbox', { name: /^full name/i })
.fill(onboardingData.name)

await page
.getByRole('textbox', { name: /number/i })
Expand Down

0 comments on commit 3b85c3b

Please sign in to comment.