Closed mhssmnn closed 3 days ago
I reproduced with the repository provided. Definitely a bug, we should fix this.
Would you be interested in making a PR by any chance?
I'd love to, but I wouldn't know where to start. 🤷
If you'd like to give it a try
--depth=1
to clone faster, you do not need the full history. yarn
to installyarn watch
in packages/runner
to rebuild the runner (which includes the packages/driver
, which contains Cypress
and cy
, among other things) on save. yarn cypress:open
in packages/driver
to open Cypress and develop the driver (so you would do yarn watch
in one terminal, and
yarn cypress:open` in another).cy.check
and cy.uncheck
looks like they live here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cy/commands/actions/check.tsYou can let me know if you need more help/tips - I don't know exactly how to fix this off the top of my head, but that should point you in the right direction.
I've created a PR with the failing test so far.
After some investigation, I think the issue stems from changes made in https://github.com/cypress-io/cypress/pull/24628.
Specifically the changes that requery the DOM:
So if :checked
is used in a selector, when the DOM is re-queried after a un/check event the selector will be dealing with a subset of the original elements. That will render the index
of this line incorrect:
Ahh https://github.com/cypress-io/cypress/pull/24628 is a likely candidate for a breaking change, it rejiggered the internals quite a bit. Great detective work.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
I'm with cy13 and still facing this issue
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.
Current behavior
Currently running the following command only unchecks some of the checkboxes:
Desired behavior
Cypress should uncheck all checkboxes, as it did in at least v10.2
Test code to reproduce
Here is the failing code:
And a test repo:
https://github.com/mhssmnn/cypress-issue-checkboxes-repro
Cypress Version
12.7.0
Node version
v18.11.0
Operating System
macOS 12.3.1
Debug Logs
Other
No response