Skip to content
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

Create unit tests for Resources component #48

Open
sunithapatel opened this issue Oct 14, 2021 · 9 comments
Open

Create unit tests for Resources component #48

sunithapatel opened this issue Oct 14, 2021 · 9 comments
Assignees
Labels
frontend Issue related to using frontend technologies

Comments

@sunithapatel
Copy link
Contributor

Create unit tests for the Resources component.

Feel free to list out test scenarios here first for feedback if you like.

@sunithapatel sunithapatel added the frontend Issue related to using frontend technologies label Oct 14, 2021
@IngridFuentes
Copy link
Contributor

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!

@princiya
Copy link
Contributor

@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.

@princiya
Copy link
Contributor

some useful keywords which will help you with searching useful documentation around this are:

  • unit tests
  • unit tests for react components
  • react testing library DOM test

@IngridFuentes
Copy link
Contributor

@princiya Thank you! I'll take a look

@Priyami
Copy link
Contributor

Priyami commented Oct 15, 2021

  • Started to write test cases for the Resources component.
  • Need some feedback.

TestCases

@princiya
Copy link
Contributor

@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.

@Priyami
Copy link
Contributor

Priyami commented Oct 18, 2021

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.

@princiya
Copy link
Contributor

@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 :) 🎉

@IngridFuentes
Copy link
Contributor

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issue related to using frontend technologies
Projects
None yet
Development

No branches or pull requests

4 participants