Open Ray-Frost opened 2 days ago
Hi @Ray-Frost, thanks for reporting this. I can recreate this as you described, the click succeeds immediately but the click event handlers never fire.
It appears that #28807 got us half way to what is ideal. It ensured that click events wouldn't fire when a parent was disabled; however, you are right we should actually retry (and eventually fail) in case the parent eventually becomes enabled. I'd also need to check, but I'm not sure this logic works properly if there are multiple levels of nesting.
In the meantime, I believe you could work around this by doing something like:
cy.get('#test-button').should('be.enabled').click()
Current behavior
If a button's parent element, such as a fieldset, becomes actionable after being disabled, the
click()
associated with the button will be skipped instead of retried.Desired behavior
click()
should automatically wait for the element to reach an actionable state as the document describedTest code to reproduce
Cypress Version
13.15.0
Node version
20.14.0
Operating System
MacOS 15.1
Debug Logs
No response
Other
This issue might be related to this condition, given PR #28807