I'm working on the automation of a ticket sales page for soccer matches. The web is in pre-production and for this reason it asks me for a basic auth when accessing to the page.
That's why when accessing I do the following command:
cy.visit('https://user:pass@tickets.demo.com/')
But currently the client has added another basic auth that appears in the payment gateway after pressing the pay button with a simple click.
In the previous version of the project, he magically ignore the pop-up and kept going, but recently I migrate to the latest version of Cypress and now the project crashes when I reach that step with an Authentication error. How can I handle it?
Researching a bit I have seen the following code but it only works after a visit command, but I need after a click.
cy.visit('your url', {
auth: {
username: 'enter username',
password: 'enter password,
},
})
Old Cypress: 9.5.1 New Cypress: 10.8.0 Node: 8.13.2