Repository navigation
Conversation
|
Alright, the tests should be good to go. It will fail in the Ci because secrets do not work in PR's |
|
Thank you for your patience, @Sembauke. I had a chance to look into testing payment elements' (paypal button and stripe elements) best practices. To test the functionality, all papal and stripe calls should be intercepted and replaced with mock responses for different scenarios. That way we avoid the issues associated testing against external apis. To test if the payment elements are displayed properly, there are two routes and both have their pros and cons:
I personally think the hybrid solution of testing actual elements and intercepted api calls would be the way to go, but let's hear from others before proceeding. |
Thanks for looking into this, Ahmad. I agree that this strikes the best balance. It makes sure that we've done our part correctly without the issues inherent to testing a third party. Our part being using the PayPal and Stripe libraries correctly in learn. |
|
Here are further considerations:
|
Checklist:
mainbranch of freeCodeCamp.Closes #XXXXX