Copied from https://codesandbox.io/s/react-stripe-official-q1loc from https://github.com/stripe/react-stripe-js
Uses cypress-react-unit-test v2
See spec files src/components/demos/*.cy-spec.js
TODO:
- โ add iframe commands to reach into the Stripe's iframe to type the CC number (via cypress-iframe)
- figure out why I cannot spy or stub
stripe.createPaymentMethod
method. Seems there is a weird getter that does not allow setting new method property - figure out XHR interception against the Stripe's API