You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Respect maxLength prop in type() function (#1641)
* fix: Respect maxLength prop in type() function
This commit modifies the `type()` function to respect the `maxLength` prop of the input element. If the current text length exceeds the `maxLength` value, typing events will not be emitted. This ensures that the input value does not exceed the specified maximum length.
1. Create an input element with a `maxLength` prop.
2. Use the `type()` function to input text that exceeds the `maxLength` value.
3. Verify that the input value does not exceed the specified maximum length.
4. Check that no typing events are emitted once the `maxLength` is reached.
Additionally, see that `yarn test` passes with an additional test added to `src/user-event/type/__tests__/type.test.tsx`
* refactor: code review changes
* refactor: tweaks
* refactor: final tweaks
* refactor: final tweaks 2
* chore: tweak codecov
---------
Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com>
0 commit comments