Open sunithapatel opened 3 years ago
Hey @sunithapatel I want to learn how to create unit tests!! Can I work on this with some guidance? Like if you know a good documentation to start. Thanks!
@IngridFuentes good one. we are using react-testing-library. https://testing-library.com/docs/react-testing-library/intro/ So this is a good place to get started. Feel free to ask more questions.
some useful keywords which will help you with searching useful documentation around this are:
@princiya Thank you! I'll take a look
@Priyami how did you arrive at the above table? are you doing some manual testing too?
Also, can you and @IngridFuentes sync on this issue. Since @IngridFuentes too has claimed the issue, I believe she too has some ideas or doing some work. It's better for both of you to talk & coordinate before create PRs to avoid any duplicate work.
From the above table, we could do manual testing for the Resouce component. so far, I have got five test cases as per the click event functionality on that page. This is a sample table. I would say, we could make each test case automated by the react-testing library or jest.
@Priyami thanks for clarifying. I don't think we have capacity for manual testing, or I am not sure who would take turn to run manual tests. If you have thoughts on this, feel free to brainstorm. But otherwise, using this template to write automated unit test cases for react-testing-library is a great idea. @IngridFuentes based on how far you are into exploring this unit testing topic, feel free to use this template or come up with your own test cases. @Priyami incase you plan to write any test cases using react-testing-library, please coordinate with @IngridFuentes . Happy testing :) 🎉
Yes, I have a few test cases written, so if you want to show me what you have, so we don't do the same @Priyami :)
Create unit tests for the Resources component.
Feel free to list out test scenarios here first for feedback if you like.