-
Notifications
You must be signed in to change notification settings - Fork 5
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
Guide on creating idompotent tests using React Testing library #79
Comments
vitest-cucumber is framework agnostic, so it won't provide logic for a specific framework. I made a template repo for Vue not for React. |
Great, I will take this as a task, if youd like to add me as the assignee, I will have it in my task list as something to get around to when I have some extra time. |
CC// @saiNaruUFL will be working on this as well. Create sample with https://github.com/testing-library/react-testing-library-help Refs: |
@amiceli I notice you say this repo is for
Is there a reason you did not specify all types of testing? We are trying to use this structure for component and e2e, and want to make sure that the scenarios are isolated from each other. Can you confirm that the Scenarios of a feature do not share any state that is defined within the scenario block? |
I made this repo when I needed Gherkin in my company/side projects for unit tests. For state, each |
We are still having issues with creating idempotent tests. We are unsure where the problem stems from, but are continuing to look into this to create a testing template with Our main issue is with the redux state
|
To add on to the post above, the issue we are having follows this -> https://stackoverflow.com/questions/67062331/how-to-reset-redux-store-after-each-test-using-testing-library-react-in-next-js#comment118538998_67062331 |
If you use |
We found a fix, we were messing up with our @saiNaruUFL can be assigned to this since he will be making the example repo. |
No updated for a while, I closed. |
@amiceli We were not able to generate an example library yet due to other priority tasks, however, we are having @saiNaruUFL create test documentation and if he thinks he can do it within a day, this will be a helpful piece of our internal docs. I would keep this open in favor of amiceli/vitest-cucumber-example#1 given its documented much better with more context. |
All right, I keep it open ;). |
Here is the Vitest-Cucumber_RTL_Template: https://github.com/Agriculture-Intelligence/vitest-cucumber_rtl_template |
@amiceli this repo is now available to be added into your docs as a template for your awesome package. I will close it out on my end as the task is now complete. |
Well done ! I'm going to add it in the doc ;). |
I added it on the readme. |
With only a few months under my belt with BDD/TDD, I am still learning how to structure these tests to be valid and isolated from each other.
With the Feature/Scenario hierarchy, I am still figuring out how to test unique capabilities (scenarios) of a component (feature) within the same test file without having overlap between scenarios.
For example, when testing a search bar, I type
abc
and then check for results. In the next scenario, I would typedef
. However, I am having an issue where it does not reset the previous scenario and I getabcdef
in the search bar. I ham includingBefore/AfterEachScenario
hooks, but it would be nice to have some sort of auto reset if we are using the React Testing Library render methodI will continue developing and possibly make a template repo for this if I figure it out.
The text was updated successfully, but these errors were encountered: