#Yang MR - Checkout rquest

1 messages · Page 1 of 1 (latest)

cloud trench
#

Hello, can you explain more of what you are trying to do here?

vale shell
#

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

cloud trench
#

Ah gotcha, for that we typically recommend mocking out the Stripe responses

vale shell
#

Don't you need a Stripe confirmation code or something for the webhooks to activate though?

cloud trench
#

So having something that returns a fixed Checkout Session json when you make that call or triggering the webhook events with the Stripe CLI

vale shell
#

?

cloud trench
#

That is a good question. If you do a fixed response signature verification might be difficult. Looking in to what we reccommend on that

cloud trench
# vale shell ?

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.

vale shell
#

Alright, thanks

little locust
#

👋 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