you can probably do conditional commands based on ...
# help
g
you can probably do conditional commands based on some env variable to turn cy.stub
Copy code
const isProd = Cypress.env('PROD')
if (isProd) {
  cy.spy('...').as('foo')
} else {
  cy.stub('...', {fixture: }).as('foo')
}
cy.wait('@foo')
b
thank you very much
3 Views