Adding data-testid attribute to input tag to make the CSV Upload functionality testable #143
daminipurohit
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @Bunlong
Can we add an optional prop testId for CSVReader component and use it for underlying input tag ?
Doing so will help developers write testcases to test the CSV upload functionality.
We can even give this prop some default value eg:
test-csv-reader
to keep this prop as optional.Please share your thoughts on this.
referring to -
<input {...getInputProps()} data-testid={testId} /> // testId read from the passed props or default
Beta Was this translation helpful? Give feedback.
All reactions