https://cypress.io logo
How should I intercept multiple GET requests from ...
# general-chat
g
How should I intercept multiple GET requests from different enpoints on the same page url and add fixture to them ? Is the following correct:
Copy code
js
    cy.intercept("GET", "/api/q1", {
      fixture: "fixture1.json",
    }).as("getData1");

    cy.intercept("GET", "/api/q2", {
      fixture: "fixture2.json",
    }).as("getData2");

    cy.wait(["@getData1", "@getData2"]);

    cy.visit(pageURL);