-
-
Notifications
You must be signed in to change notification settings - Fork 163
Adds unit and e2e tests for CopyrightWaiverStep Component #152
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
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.
Thank you for contribution, @JackieBinya , it looks great!
Could you please run the linter on the file? After that, there are only two minor issues that I will comment on on the corresponding lines.
@obulat I have cleared the errors as advised in the review. After going through the logic what I realized was that the logic makes it seem like there are checkboxes where the user has an option to check not to agree OR not confirmed. But in reality, that's not the case the user can only check agree or confirm. |
Coverage shows that 4 lines are not covered. They have to do with the state when both checkboxes are checked, and the user 'deselects' one of them. Once you add tests for them, I will approve this PR. |
I guess you have already understood the answer to your question, but I will still write it just in case: The user can check both checkboxes at first, but then go back and click on one of them again. If this happens, the CopyrightWaiverStep should not let the user proceed. So, if you set both props to true, and then click on them ( |
…to ft-copyright-unit I cannot find my commits on the remote PR
Hi, @obulat I have added the tests. But I had a problem with my Github account for some reason it was not showing all my pushed commits, hence the reason, I pushed the same commit twice. In the meantime, I will try to write the e2e tests as I await your review. |
Actually, github was down about 7-8 hours ago, I think that's the reason for some problems you had. Don't worry!
I tried to figure it out, but I don't quite understand how that line can be untested, when we actually do get inside that condition, and the line after 'if' is executed. |
Thank you so much for that pointer @obulat. It will forever change my approach to writing unit tests. Finally, I had my 'Aha' moment. I was familiar with the approach of treating logic/code as Blackbox but today I finally understood. Coverage is now at 100% |
Great! To be honest, I got this approach after reading the article from vuejsdevelopers.com on "Knowing what to test". |
Fixes
Related #133 by @akmadian
Description
Technical details
Tests
Screenshots
Checklist
Update index.md
).master
branch of the repository.visible errors.
Developer Certificate of Origin
Developer Certificate of Origin