https://cypress.io logo
This is not working because cy commands are not al...
# e2e-testing
f
This is not working because cy commands are not allowed in there:
Copy code
js
    cy.intercept("POST", "/api/something", (req) => {
      req.on("before:response", () => {
        cy.get("#message").should("equal", "Request sent");
      });
      req.on("after:response", () => {
        cy.get("#message").should("equal", "Response received");
      });
      req.continue();
    });
But what can I do instead?
42 Views