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

Detached DOM: Update $actionability to support cy.currentSubject() #23901

Closed
BlueWinds opened this issue Sep 20, 2022 · 1 comment
Closed

Detached DOM: Update $actionability to support cy.currentSubject() #23901

BlueWinds opened this issue Sep 20, 2022 · 1 comment
Assignees

Comments

@BlueWinds
Copy link
Contributor

BlueWinds commented Sep 20, 2022

What would you like?

Queries solve a major problem: how can Cypress safely requery the DOM when the subject becomes detached? The Cypress command queue also handles this cleanly and internally for queries and their associated assertions.

However, commands - such as .click() - still receive a static subject, and this subject can "go stale" as the DOM mutates. Because there is no generic handling of subjects - each command contains its own logic - fixing this will involved updating each command one at a time.

We have to start somewhere, to understand exactly what this solution looks like and establish patterns for updating future commands. This will also help scope out how much work remains on other commands, whether it is simple or complex to update each one.

Why is this needed?

No response

Other

No response

@BlueWinds BlueWinds changed the title Detached DOM: Update .click() to use cy.currentSubject() Detached DOM: Update $actionability to support cy.currentSubject() Sep 26, 2022
@BlueWinds
Copy link
Contributor Author

Merged into feature branch; closing.

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

1 participant