cy.wait
on an array of the same alias does not resolve in expected order
#27337
Labels
E2E
Issue related to end-to-end testing
Reproducible
Can be reproduced
Triaged
Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Current behavior
cy.wait
accepts an array of aliases to await - this behavior works as expected when different aliases as supplied (cy.wait(['@a', '@b'])
), however when the same alias is supplied multiple times the resolved subjects are not ordered from first-to-last as one would expect.For example:
Desired behavior
Users can currently await serially to get items in order:
but this prevents easy comparison of multiple awaited subjects. One workaround that been identified is to wait serially and combine into an array, but this relies on variables and state outside of the Cypress command chain which has inherent risks:
Test code to reproduce
https://github.com/mike-plummer/cypress-wait-alias-array
Cypress Version
12.15.0
Node version
16.17.1
Operating System
macOS 13.4.1
Debug Logs
No response
Other
Based off of cypress-io/cypress-support-internal/issues/13
The text was updated successfully, but these errors were encountered: