-
Notifications
You must be signed in to change notification settings - Fork 380
Refactor Feature Tests and Increase Coverage #126
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
Conversation
I just thought they might be less confusing this way because before there were examples hidden inside of I also split the different features into different files so that it would be easier to find the specific feature tests you wanted to look at. In the process, I noticed that some of the failure conditions were not being covered, specifically updating with bad parameters, so I wrote tests for them and realized that they were not performing as one would expect (they were successfully updating despite the bad params). Therefore, I added validation logic to pass those tests. While this is additional application logic, I think it's important that users are aware that they cannot rely on JavaScript front-end form validations only. |
|
||
feature "Destroy a comment" do | ||
include_context "Existing Comment" | ||
context "from classic page" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes we want to add a delete feature on the react side! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justin808 Hey, don't look at me that was already in there!
I like this. It takes a bit of getting used to the shared_context and include_context syntax. I've often used shared_examples, and now I'm going to consider using shared_context. |
@justin808 It definitely does take some getting used to as well as understanding how their DSL is working under the hood. This is why Minitest appeals to some developers because it just uses plain Ruby methods instead of making its own DSL so WYSIWYG (yay acronyms!). Sometimes I just write my own plain methods even in RSpec for this reason. But, the tests were already using |
@robwise This is good! |
Refactor Feature Tests and Increase Coverage
Thanks @robwise! LGTM! |
No description provided.