cy.server();
cy.route('POST', 'my/api').as('myApi');
...
cy.wait('@myApi');
...
cy.route('POST', 'my/api').as('myApi');
cy.wait('@myApi');
When my app calls the same API twice within the same test, from the above code, the 2nd cy.wait finishes immediately since it sees that the first API is already finished. To get around this, I append a random number behind all my route aliases. Is this the correct way?