https://cypress.io logo
Test card payment with different origin without us...
# i-need-help
w
Hello everyone, I started working on cypress few weeks ago. Consider me like a newbie to automation testing. There are different subject in this post because I tried to bypass the first problem of cross origin with common settings. The website I'm testing is made with PrestaShop v1.6.1.24 and I'm using Cypress v11.2 in a pre-prod environment. The test workflow: I fill my cart with product, validate it, choose the address to send it, have to accept TOS and then I go on page where I choose the payment option. My test payment requires to go on a different origin than my website, the app redirects URL to go to credit card form (it uses verifone), then after validation payment it redirects on my website. (I'm using false card number allowed by verifone) The bypass I can't use: I would like to know if there is a solution or best practice to make this payment without using the
chromeWebSecurity: false
and
experimentalSessionAndOrigin: true
settings. The problem using those settings in my case: If I use
chromeWebSecurity
and
experimentalSessionAndOrigin
, I have problem with the cart that doesn't keep products in between pages (problem that I have too with Cypress v12.0 because it sets
experimentalSessionAndOrigin
by default). The cart is filled with a PHP request, I have to put a missing cookie each time and use
cy.visit()
the current URL to get back the cart. But it doesn't work at the end of my workflow where I have to submit form (TOS step) to access page where I can choose the payment option. That's why I don't know if I should use a different way to make payment without those settings, or if I should try to correct the problem with the cart using settings. Thanks for your help. I hope I gave you enough information to understand my problem. Best regards. Mikaël