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

Add Vitest, React Testing Library and Cypress #29

Closed
chadstewart opened this issue Nov 30, 2022 · 6 comments · Fixed by #50
Closed

Add Vitest, React Testing Library and Cypress #29

chadstewart opened this issue Nov 30, 2022 · 6 comments · Fixed by #50
Assignees
Labels
developer experience Improves the experience of working on the project enhancement New feature or request good first issue Good for newcomers

Comments

@chadstewart
Copy link
Collaborator

chadstewart commented Nov 30, 2022

Feature Request

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I have an issue when [...]

There is currently no automated tests for the project.

Describe the solution you'd like
A clear and concise description of what you want to happen. Add any considered drawbacks.

We should add Vitest, React Testing Library and Cypress to the project.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Haven't considered any alternatives at this time.

Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs.
Maybe a screenshot or design?

n/a

@chadstewart chadstewart changed the title Add Jest, React Testing Library and Cypress Add Vitest, React Testing Library and Cypress Feb 1, 2023
@chadstewart chadstewart added the good first issue Good for newcomers label Feb 3, 2023
@chadstewart chadstewart mentioned this issue Feb 3, 2023
@takanome-dev
Copy link
Contributor

Hey @chadstewart, I saw a couple of issues about testing and it seems like you're not really sure how to structure the tests.
I haven't checked the project yet, but I saw that you set up the atomic design like you did in insights.opensauced.pizza 🍕
Do you want to test each component (organism 🤔 ) in isolation + unit tests or just an e2e test?

@chadstewart
Copy link
Collaborator Author

Hey @chadstewart, I saw a couple of issues about testing and it seems like you're not really sure how to structure the tests. I haven't checked the project yet, but I saw that you set up the atomic design like you did in insights.opensauced.pizza pizza Do you want to test each component (organism thinking ) in isolation + unit tests or just an e2e test?

So honestly, I'm really thinking about mostly e2e tests for the components and unit tests for whatever business logic I have that makes sense. I honestly don't see the value of testing components that's mostly markup.

What are your opinions on testing an Atomic Design code base?

@takanome-dev
Copy link
Contributor

So honestly, I'm really thinking about mostly e2e tests for the components and unit tests for whatever business logic I have that makes sense. I honestly don't see the value of testing components that's mostly markup.

Totally agree with you.

What are your opinions on testing an Atomic Design code base?

I have never done it and I'm new to Atomic Design 😅 I think we don't need to test each atom, molecule etc, we can build them and test them with Storybook. Checkout jest integration with Storybook

@chadstewart
Copy link
Collaborator Author

So honestly, I'm really thinking about mostly e2e tests for the components and unit tests for whatever business logic I have that makes sense. I honestly don't see the value of testing components that's mostly markup.

Totally agree with you.

What are your opinions on testing an Atomic Design code base?

I have never done it and I'm new to Atomic Design 😅 I think we don't need to test each atom, molecule etc, we can build them and test them with Storybook. Checkout jest integration with Storybook

I'll check this out! If anything, for now we can focus on e2e tests unless it's specific business logic. This will be interesting to go through!

@takanome-dev
Copy link
Contributor

Great, assign it to me and I'll set up the test environments.
Btw, just curious to know about why you choose Cypress over Playwright 🤔

@chadstewart
Copy link
Collaborator Author

Great, assign it to me and I'll set up the test environments. Btw, just curious to know about why you choose Cypress over Playwright 🤔

Didn't know about Playwright before I made the choice about Cypress. Just heard of it a few weeks ago and thought about considering it.

We can try out Playwright if you're interested in it. I think we're at the point of the project where we don't have to worry too much about committing to a technology.

@chadstewart chadstewart added enhancement New feature or request developer experience Improves the experience of working on the project labels Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Improves the experience of working on the project enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants