New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@alias.all Throws An Error When Defining Alias in Intercept With Route Handler in Version 12 #25448
Comments
Is it documented somewhere that setting |
Yup! Here is a guide to working with graphql which happens to be our use case. With the test I linked in the issue, |
TIL! Definitely not working as documented then. I'll route this to my team to investigate. |
I'm getting the same issue when trying to access the last instance of the alias ( |
Good day! |
Hello @chrisbreiding! Can we please have a status update on this issue? |
Also seeing this issue with 12.14.0 |
Also seeing this issue with 12.15.0, have same problem before reported? |
Same issue with 12.17.4 |
Same issue with v13.1.0 😢 |
Same issue with v13.2.0 |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Currently, if you use
cy.intercept
with a route handler to define the alias, grabbing all instances of the alias@alias.all
throws an error. This worked before upgrading to version 12 (verified it works with 11.2.0).There error is:
Desired behavior
Regardless of if you define an alias using
.as
orrequest.alias
, you should still be able to access all of the alias instances using@alias.all
.Test code to reproduce
I grabbed https://github.com/cypress-io/cypress/blob/develop/packages/driver/cypress/e2e/commands/net_stubbing.cy.ts#L3678-L3691 and changed the way we alias the request to expose the issue.
Cypress Version
12.*
Node version
v16.19.0
Operating System
Debian GNU/Linux 11 (bullseye)
Debug Logs
No response
Other
I was following #24653 and #25210 which seem to be related but not exactly the same. Since one issue was closed, I decided to raise this issue which shows a specific example that was working before upgrading to version 12.
The text was updated successfully, but these errors were encountered: