-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
Added POC test cases for Avatar.test #1029
Added POC test cases for Avatar.test #1029
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@amjadorfali just a heads up - I haven't forgot about your PR here. I'm still just heads down prepping on the documentation side. We're making good progress, so I hope to circle back later this week. Thanks again for your patience in the meantime! |
@endigo9740 thanks for letting me know, and good luck! You guys are doing amazing work in this library. |
Hey @amjadorfali, I've finally had a chance for a preliminary review. Just so you know, we're in mad sprint towards our v1.0 launch and focusing on a big series of documentation updates per: Given this, our priority is 110% documentation right now. I am interested in improving our test cases, but this is not a blocking issue for us getting v1.0 out the door. Just so you're aware of where this resides as far as priority. Also, thank you for taking the time to discuss your influence and document your references. This looks like astounding work. This is the most well documented PR we've received, bar none! That said, I know our current test cases are barebones. I think we can agree there. But what you've done here is like on a whole other level. I'll be honest, I'm struggling to give this a proper review. Mainly because I don't really understanding everything going on yet. If I had more bandwidth right now I'd stop, educate myself, and return to this. Unfortunately time is now allowing for that right this second. However, before we get into specifics, I want to take a step back and reflect on the overall goal here. My knee jerk reaction is a 300 loc test case for an avatar component feels like overkill. In fact I have a few concerns here:
Honestly I wasn't opposed to the minimal testing we had. It is essentially a litmus test of "is X component functional right now", which is a great starting point. The area I most wanted to extend to was ensuring that properties are being receive and implemented as expected. We will typically have a good idea if the basics and defaults are working browsing the live components on the docs. However, if someone is using a component and supply a So, I'll leave it here, and give you a chance to respond. But my gut is telling me we might need to circle back to this post v1.0 and get more of a community and group consensus on how far we want to go with testing. Testing is great, extensive testing is great, but there is something to be said for "K.I.S.S", if you know what I mean. Would you be down for us opening this up for discussion in a more official capacity in the near future? |
Hi @endigo9740, thanks for taking the time to review my PR. I'm glad to see that you've been pushing for documentation fixes lately, and I'm happy to help out with any other issues that need attention. Regarding the tests I added, I understand your concerns about maintainability and fully agree with your points, it does seem like an overkill. However, I believe that testing UI components is important to ensure that they work as intended and don't break as changes are made. Here are some specific points to consider:
If you do a quick run at any test, and. type in I am not a QA engineer, and I have much to learn about automated testing. I would love to hear what others think about the best practices for unit testing UI libraries. Let's work together to figure out the best approach. Thanks again for your feedback! |
You could have fooled me my friend :D But sounds good, I agree with your points above. I'll noodle on things in the meantime and we can give this the proper attention it deserves in the near future when I'm not running around putting out fires. Thanks again! |
@endigo9740 Sounds awesome! Best of luck 🙏🏼 |
@amjadorfali again just letting you know I haven't forgot about you. This week has been all about ramping back up, collecting ourselves, and prepping for our future milestones for the project. We have a core team meeting scheduled tomorrow and testing will be one of the items discussed. I'll let you know where we fall on that asap. |
@endigo9740 thanks for the update, i really appreciate it. And no worries at all, you guys have been doing some amazing stuff! I'm looking forward to what comes next, and how i can contribute further in Skeleton🎉🚀 |
@amjadorfali I'm so sorry this has taken me so long to get back to. But I wanted to share where we've landed after talking with the team. Essentially it's what I stated before, the quality of test as presented is top notch, but we feel this might be overkill for us and much harder to maintain over time. Going forward I'll go ahead and close this PR out, but we'll have it for reference going forward. Nothing will be lost. Then when an opportunity presents itself we'll devote a bit more time and attention to testing. I know testing is a great practice, but there's also the common saying that "startups shouldn't use automated tests" and I think that's where we fall right now. I hope you understand. Hopefully over time things solidify a bit more and more in depth testing will be more practical. I appreciate your effort and patience all the same! |
Hey @endigo9740 , I get that, it's understandable. Thanks for letting me know. I'll see where i can help elsewhere |
Before submitting the PR:
npm run test
?branch -m new-branch-name
What does your PR address?
Fixes #150
Improve automated test coverage and depth
Please briefly describe your changes here.
Introduced a new standard in automated testing, although can be improved more. Since i am new to writing automated tests for a UI Library, I couldn't quietly determine how "Deep" i needed to go. Nevertheless, I tried my best to adhere to the standards that Kent C Dodds and Testing-library has set to writing automated tests.
Notes :
I took certain initiatives for the current test cases for specific reasons, you can find a reference for each change/decision i took :
props
property in the config ofrender
fngetBy...
automatically throw errors when the element isn't foundNice to haves :