Skip to content
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

Get multiple aliases #27572

Open
Kazathur92 opened this issue Aug 17, 2023 · 1 comment
Open

Get multiple aliases #27572

Kazathur92 opened this issue Aug 17, 2023 · 1 comment
Labels
E2E Issue related to end-to-end testing type: feature New feature that does not currently exist

Comments

@Kazathur92
Copy link

Kazathur92 commented Aug 17, 2023

What would you like?

Hi there, I would love to be able to get multiple aliases in one single cy.get()
Examples:
what I want:

cy.get('@alias1', '@alias2').then((alias1, alias2) => { 
       console.log(alias1, alias2) 
});

what we have:

cy.get('@alias1').then((alias1) => {
     cy.get('@alias2').then((alias2) => {
          console.log(alias1, alias2);
     });
});

Why is this needed?

I think, since its discouraged to declare global variables in a file, if I need multiple values that have been aliased to be passed down into other tests via a cy.keepAliases() function, that I should be able to get as many as I can in a single cy.get() to avoid nesting as much as possible. It would be nice.

Other

Keep up the great work! My team and I love Cypress!

@nagash77 nagash77 added type: feature New feature that does not currently exist E2E Issue related to end-to-end testing labels Aug 17, 2023
@nagash77
Copy link
Contributor

@Kazathur92 thank you for the feature request. I have passed this on to our product team for consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

2 participants