-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Testing? #103
Comments
Hello. What you want to test? This library is a wrapper above react-select. If you use selenium-like test framework with css-selectors, you can use props https://react-select.com/props If you want to inspect DOM with devtools, I can recommend a strange solution:
setTimeout(() => {
debugger;
}, 2000);
|
@vtaits Thank you for your response. I am using Cypress test runner. Checking out your suggestions. What do you want to test?
|
This is the generated react-select-async-paginate:
This is the attempt for selecting an option, but it does not loads selected option into This Cypress script selects an option:
As would able to validated using this Cypress script:
|
since I am also struggling right now with testing a filterable selection box maybe we could help each other ✌️
With what I still struggle is when I do not use .click()
Because cypress delay functionality does not seem to work together with this library(?):
each line is a console.log of the fetch function to our API |
FYI: I resolved the issue with testing the filtering:
and in Cypress it works as follows:
|
Hello! Could you please explain how to correctly use Thank you in advance |
I am not a maintainer of the library but a user. Nevertheless, I believe that this question has nothing |
how to test with jest and testing-library? |
Great module, and great results.
Question: How does one test this component when in use?
Before switching out
<select>
for this solution, testing involved navigating through this component using CSS selectors, and then was able to verify all expected<option>
(s).DevTools inspection shows nothing to navigate to validate runtime usage of this component.
Thank you
The text was updated successfully, but these errors were encountered: