powerful-gigabyte-69168
05/23/2022, 8:23 PM.then() calls just in order to get the aliasing all inside a given closure. That said, now that I think of it, because cypress already handles the async nature of commands, I might not need Promise.all() to wait for the previous values because I would expect that a .then() on a given command will already have awaited the previous command's resolution. So I can probably do:
it('my test', function () {
cy.myCustomApiCommand('user1').as('user1Id');
cy.myCustomApiCommand('user2').as('user2Id')
// I bet this waits for the 1st command to finish too
.then(() => {
const myNewFixture = {
user1: this.user1Id,
user2: this.user2Id
};
});
});