#misha_smp
1 messages · Page 1 of 1 (latest)
Can you summarize what you're trying to do overall?
The above doesn't make much sense
You shouldn't ever have to create a payment intent explicitly if using checkout
original message: Hello, I have a question about checkout.stripe. I'm running a Cypress test on localhost, and when the test reaches the checkout.stripe page, it doesn't fully load. It displays the page, but the page elements load indefinitely. However, when I do the same manually, the page loads. I don't understand what the cause could be. Has anyone encountered something similar?
Oh
Yeah we discourage that sort of automated testing
You should use mocks
Read more here: https://stripe.com/docs/automated-testing
just need go through this checkout page
this page doesn't say how to mock checkout.stripe
You mock api responses
You don't mock anything in the ui
That's not possible
You shouldn't be ui testing against our hosted flows
how response object for checkout.stripe should look like?
Recommend creating a checkout session in test mode to see: https://stripe.com/docs/api/checkout/sessions/create
You can create test requests in test mode and base your mocks off that
Also stripe-mock might be useful for you: https://github.com/stripe/stripe-mock