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

cy.focused() does not correctly wait for DOM elements to be found #564

Closed
brian-mann opened this issue Jul 19, 2017 · 2 comments
Closed
Assignees
Labels
type: unexpected behavior User expected result, but got another
Milestone

Comments

@brian-mann
Copy link
Member

  • Cypress Version: 0.19.4

cy.focused() should behave exactly like other querying commands such as cy.get() or cy.contains().

As it stands, it will not wait for the element to exist in the DOM unless there is an assertion you've written. Instead the default assertion needs to be to wait for the element to exist unless you've reversed the default assertion with cy.focused().should("not.exist").

The documentation is correct but the behavior is wrong.

@brian-mann brian-mann added the type: unexpected behavior User expected result, but got another label Jul 19, 2017
@brian-mann brian-mann self-assigned this Jul 19, 2017
@brian-mann
Copy link
Member Author

The code for this is done, but this has yet to be released. We'll update the issue and reference the changelog when it's released.

@brian-mann
Copy link
Member Author

Fixed in 0.20.0

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

2 participants