late-planet-4481
02/02/2023, 8:55 PMcy.waitForSpinner() that waits for the loading animation to disappear (if it exists). I would like to overwrite cy.click() to execute this after every click. I've tried a few ways of doing this, but I don't know the proper syntax to make it work.
This doesn't work:
Cypress.Commands.overwrite('click', (click, ...args) => {
return click(...args).then(() => cy.waitForSpinner())
})
What's the right way to do this?