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

Test for cy.click() loads many links #1388

Closed
Peggy1012 opened this issue Feb 28, 2018 · 2 comments
Closed

Test for cy.click() loads many links #1388

Peggy1012 opened this issue Feb 28, 2018 · 2 comments

Comments

@Peggy1012
Copy link

Peggy1012 commented Feb 28, 2018

  • Operating System: WIn 10
  • Cypress Version: 2.0.2.
  • Browser Version: Chrome 63

Is this a Feature or Bug?

Bug

Current behavior:

cy.get('a[href="/services/all/"]').first().click() load many links

Desired behavior:

cy.get('a[href="/services/all/"]').first().click() load one link

Additional Info (images, stack traces, etc)

url

@Peggy1012 Peggy1012 changed the title Test for cy.click() load urls Test for cy.click() loads many links Feb 28, 2018
@brian-mann brian-mann added the stage: needs information Not enough info to reproduce the issue label Feb 28, 2018
@brian-mann
Copy link
Member

Hello!

Thanks for opening an issue. Unfortunately it's not clear, and there's not enough information in this issue for us to investigate if and what the bug may be.

For instance - it's unclear what you mean by "load many links". The screenshot provided shows the URL changing several times, but its unclear what the expected and correct behavior would be.

For us to look into this, we'd have to have a reproducible repo and a clear understanding of what Cypress is supposed to be doing. It looks as if you're trying to log in, but I can't be sure that's what it is.

@brian-mann
Copy link
Member

Hmmm I just noticed that this is your 2nd test. I am going to guess here the problem is that you are building up state between your tests - that you are logging in the first test, and then running the second test without logging in.

Cypress will automatically clear sessions in between tests to prevent tests from building up state. There are API's to preserve cookies to prevent this - but it's an anti pattern.

Here's a couple links to the docs that explain all of this - and a much large issue that explains what we need to do better to communicate this.

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants