#Yang MR - Checkout rquest
1 messages · Page 1 of 1 (latest)
End-to-end testing
Visiting the checkout page breaks the entire test, and is bad practice, and I can't exactly insert an element while running the test either
Ah gotcha, for that we typically recommend mocking out the Stripe responses
Don't you need a Stripe confirmation code or something for the webhooks to activate though?
So having something that returns a fixed Checkout Session json when you make that call or triggering the webhook events with the Stripe CLI
?
That is a good question. If you do a fixed response signature verification might be difficult. Looking in to what we reccommend on that
Basically, we agree with you that actually directing to the test Checkout Session's URL is not a good practice for testing. We recommend avoiding actually using Checkout in your tests.
I have to jump to another question on the server now but will look more in to what we recommend here and will get back to you.
Alright, thanks
👋 Sorry this thread got dropped - what specifically are you trying to test end-to-end? We don't have any way of directly completing the checkout session w/o actually going to the URL, but if you're trying to test something specific then maybe we can come up with an alternative