https://cypress.io logo
Yeah, you can do that using `cy.spy()` ``` cy.i...
# e2e-testing
f
Yeah, you can do that using
cy.spy()
Copy code
cy.intercept('/api/v1/tradeareas/states'), cy.spy().as('statesEndpoint'))
  cy.get('@statesEndpoint').should('have.been.calledOnce')
I learned how to do this from @gray-kilobyte-89541 's advanced Cypress network testing exercises. I cannot recommend them enough https://cypress.tips/courses/network-testing