Is it possible to express optionality inside a `cy...
# help
a
Is it possible to express optionality inside a
cy.wait()
that consumes aliases? eg.
Copy code
// create env1 alias
    cy.intercept("GET", "*env1/request?*").as(
      "waitEnv1"
    );
    // create env2 alias
    cy.intercept("GET", "*env2/request?*").as("waitEnv2");
and then I'd like to use them in a
cy.wait()
statement like:
Copy code
cy.wait("@waitEnv1" || "@waitEnv2", { timeout: 25000 })
.its("response.statusCode").should("be.oneOf", [200, 304]);
But that
||
doesn't work there. Is there any way to achieve what I'm trying here?