https://cypress.io logo
Is there a best practice for storing response valu...
# best-practices
p
Is there a best practice for storing response values from api calls in order to load subsequent fixtures with them? I have a signup endpoint (and a cypress command to call it) which returns the new user's database id. I want to call this action several times, collect the database ids and then include them in the response body of a subsequent request for loading a fixture into the database which requires user ids that are used as foreign keys. I can't seem to use
Promise.all()
to group the commands and form an array of the resulting database ids as the array instead fills with only the last value, presumably because of the way cypress subject-yielding works