https://cypress.io logo
and ultimately for my purpose I might be able to a...
# best-practices
p
and ultimately for my purpose I might be able to avoid the need for the
.then()
closure altogether by constructing the
newFixture
object directly in the command I want to consume it in like
Copy code
cy.signup('user1').as('user1Id');
cy.signup('user2').as('user2Id');

// Use ids in new command
cy.otherApiRequest({
  aForeignKey: this.user1Id,
  anotherForeignKey: this.user2Id,
});