generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TextInput] Add a default max length based on input type (#988)
Added overridable default max length to inputs across the application. This consisted of creating a wrapper component for accomplishing this. Additionally, added/updated e2e tests to verify the fuinctionality. ## Changes - src - components - TextInput.tsx: Added this to work as a component wrapper for the design-system TextInput component. This way the character limit defaults can be enforced anywhere this component is used. - InputEntry.tsx: Updated this to use the new TextInput wrapper and pass relevant required fails. - pages - PointOfContact - index.tsx: Added relevant character limits that were different than the default - ProfileForm - CreateProfileForm - AddFinancialInstitution.tsx: Added relevant character limits that were different than the default - Step1Form - Step1FormInfoFieldGroup.tsx: Removed unnecessary character limits since there is now a default - types - formTypes.ts: Updated default character limits to new variable name - utils - constants.ts: Updated and created input character limit constants for use - e2e - pages - filing-app - complete-user-profile - checkCupFormErrors.spec.tsx: Added new test to verify character limits - point-of-contact - checkPocFormErrors.spec.tsx: Added new test to verify character limits - shared-lending-platform - NonAssociatedUserProfile.spec.tsx: Updated test to verify all character limits - UpdateInstitutionProfile.spec.tsx: Added test to verify character limits - utils - inputValidators.tsx: Added helper functions to unify input content validation ## How to test this PR 1. Pull **986-default-max-length** in **sbl-frontend** 2. Verify that **TextInput.tsx** in **sbl-frontend** has no errors 3. Start the stack 4. Run the e2e tests 5. Verify that the e2e tests pass --------- Co-authored-by: S T <shindigira@gmail.com> Co-authored-by: Bill Himmelsbach <whimmels@gmail.com>
- Loading branch information
1 parent
71edfa8
commit 72bd21d
Showing
12 changed files
with
477 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.