Files
callstack__react-native-tes…/.codecov.yml
T
Joshua Yoes 6a51a81728 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>
2024-08-09 15:49:05 +02:00

14 lines
244 B
YAML

coverage:
precision: 2
round: down
range: 70...100
status:
project:
default:
threshold: 0.5% # Allowable coverage drop in percentage points
comment:
behavior: default
require_changes: false
require_base: false