fresh-doctor-14925
10/11/2022, 2:39 PMcy.spy()
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