plain-garden-5374
08/01/2022, 11:18 PM/graphql endpoint
- each request has the same method (POST) and endpoint url; they differ only in their request bodies, in particular the operationName. so the naive cy.intercept('POST', '/endpoint') matches all of them, and i have to implement the aliasing methods from https://docs.cypress.io/guides/end-to-end-testing/working-with-graphql to have a hope of disambiguating them
- i would like to stub all of these requests inside the same test, replacing their responses with mock data stored as fixtures
is this even possible? gleb's blog post https://glebbahmutov.com/blog/cypress-intercept-problems/#multiple-matchers seems to suggest there's no way for me to cy.wait() on more than one `cy.intercept()`s with the same method and endpoint in the same test context, and that my only solution is to not have tests that require more than one of the intercepts.plain-garden-5374
08/01/2022, 11:21 PM