Skip to content

Signup #38

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

Merged
merged 7 commits into from
Jun 3, 2019
Merged

Signup #38

merged 7 commits into from
Jun 3, 2019

Conversation

afontcu
Copy link
Member

@afontcu afontcu commented Jun 3, 2019

Hi! I noticed % code coverage descended a bit with the introducion of fireEvent.update, mostly because we didn't have tests for each element.

I added a few in this PR (to make it look more "natural", I switched from Login form to a Signup one, when it kinda makes more sense to have additional form elements).

However, some use cases are still missing (<input type="radio">, for instance). So my question is: should I add all use cases in the same component? Or is it already too large? The Signup form is quite simple (just handles inputs and emits...) but it might become too much at some point.

Any thoughts on this? 😃

@dfcook
Copy link
Collaborator

dfcook commented Jun 3, 2019

I think it's better to split it out or come up with a better example than a signup form if we're going to add new components to it.

@afontcu
Copy link
Member Author

afontcu commented Jun 3, 2019

I think it's better to split it out or come up with a better example than a signup form if we're going to add new components to it.

Fair enough! What about a "Create Review" form?

Title -> input text
Review -> textarea
Rating -> radio button
Genre -> select
Would you recommend? -> checkbox
Submit -> input submit

We might need something for optgroups too 🤔

Thanks!

Copy link
Collaborator

@dfcook dfcook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

@afontcu
Copy link
Member Author

afontcu commented Jun 3, 2019

Ok, so I updated the PR! 😃

  • Renamed old Form component to Stubs, to match the test filename.
  • Changed the example from a contrived signup form to an Add Review form.

Do you feel it has improved? Any other ideas?

@afontcu
Copy link
Member Author

afontcu commented Jun 3, 2019

Glad you liked it! I'll merge this, but feel free to suggest any potential improvement! I'll happily update it.

@afontcu afontcu merged commit c2ae9b8 into testing-library:master Jun 3, 2019
@afontcu afontcu deleted the signup branch June 3, 2019 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants