Skip to content

test: add automated tests for per-word name validation in onboarding and settings #1288

Description

@coderabbitai

Summary

This issue tracks the follow-up work to add automated unit tests for the per-word name-length validation logic introduced in #1286.

Background

PR #1286 added a 30-character-per-word limit to the name input fields in:

  • frontend/src/components/OnboardingSteps/AvatarSelectionStep.tsx
  • frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx

Tests were deferred to keep that PR focused on the core navbar layout fix.

Acceptance criteria

The following test cases must be covered for both AvatarSelectionStep and AccountSettingsCard:

  • Boundary – 30 characters (valid): A single word of exactly 30 characters should pass validation; no error message is shown and the submit/Next button remains enabled.
  • Boundary – 31 characters (invalid): A single word of 31 characters should trigger the error message "A single word in your name cannot exceed 30 characters." and disable the submit/Next button.
  • Multi-space input: Multiple consecutive spaces between words should be handled gracefully; only non-empty words are validated.
  • Recovery: After entering an invalid name, changing the input to a valid name should clear the error and re-enable the submit/Next button.

Related

/cc @rohan-pandeyy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions