You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
given a div with role="checkbox" and a link in the checkbox label, such as
<divclass="checkbox"><divid="DisclosureCheckbox"
role="checkbox"
aria-labelledby="DisclosureCheckbox_label"
aria-checked="false" aria-required="true"></div><labelid="DisclosureCheckbox_label" for="DisclosureCheckbox">
I have read and agree to the
<span><atarget="_blank" href="http://google.com">Disclosure</a> (PDF).</span></label></div>
the following code previously checked the checkbox, but since yesterday it has been clicking on the link in the label, causing test failures in numerous projects.
cy.get('.checkbox > label').click()
Desired behavior
just wanted you to alert you to a breaking change in case it was not intended
Test code to reproduce
cy.get('.checkbox > label').click()
given the checkbox label also contains a link
Cypress Version
13.5.1
Node version
v20.9.0
Operating System
Win 10 enterprise
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered:
DavesPlanet
changed the title
cypress checks links in checkbox labels since 13.5.1
cypress clicks links in checkbox labels since 13.5.1
Nov 15, 2023
@DavesPlanet Thanks for reporting. Could you provide a fully reproducible example? I'm unable to reproduce this given the information we have. I ran a test with a label and checkbox similar to this and it is clicking the checkbox correctly in 13.5.1
apologies I cannot. I have spent the last hour on this and any minor deviation from our production code does not reproduce the issue, even excluding combinations of css files. We corrected the issue by removing all carrots from our package.json, which forced versions of things to stay the way they were. We know the issue first occurred today, the day after your release of 13.5.1 but I am afraid I will need to close this issue as un-reproduceable with anything but our full production suite. Even then it only failed for certain tests which included different css than other tests. Thank you for your time.
Current behavior
given a div with role="checkbox" and a link in the checkbox label, such as
the following code previously checked the checkbox, but since yesterday it has been clicking on the link in the label, causing test failures in numerous projects.
cy.get('.checkbox > label').click()
Desired behavior
just wanted you to alert you to a breaking change in case it was not intended
Test code to reproduce
cy.get('.checkbox > label').click()
given the checkbox label also contains a link
Cypress Version
13.5.1
Node version
v20.9.0
Operating System
Win 10 enterprise
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: