Visibility check fails after upgrading to Cypress 14 #31601
Unanswered
DaringuL
asked this question in
Questions and Help
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hello. I have a test, which asserts how many fields are currently hidden on the page.
cy.get('form-field').filter(':hidden').should('have.length', 5);
It worked perfectly fine on Cypress 13.17.0.
But after upgrade to 14.3.2, it started to fail. Cypress is not considering as hidden element, which have height 0. The height is not explicitly set on the element, but on it's direct child. Child has height:0 and overflow:hidden.
When I set overflow: hidden, also on the parent element - the test passes again. But I wonder, what should have changed between versions, that test, which worked previously, suddenly started to fail. Also, I don't quite get, why the element started to be considered as visible, if it has height:0?
Beta Was this translation helpful? Give feedback.
All reactions