Current behavior
Starting in 14.0.0, we have a situation where an element is failing a .should('not.be.visible') check when the element is not physically visible.
Desired behavior
This element should not be seen as visible.
Test code to reproduce
index.html
<!DOCTYPE html>
<html>
<body>
<div style="display: grid; grid-template-columns: 332px 1fr; grid-template-rows: 62px 1fr;">
<div style="overflow-y: auto;">
<div style="height: 297px; position: relative;">
<div style="height: 96px; position: absolute; left: 0; top: 0;">
<a href="">
test test-1
</a>
</div>
<div style="height: 36px; position: absolute; left: 0; top: 96px; background-color: red;">
<a href="">
test test-2
</a>
</div>
</div>
</div>
</div>
</body>
</html>
spec.cy.js
it('test 1', () => {
cy.visit('index.html')
cy.contains('test-2').should('not.be.visible')
})
13.17.0

14.0.0

Cypress Version
14.0.0
Node version
Operating System
Debug Logs
Other
No response
Current behavior
Starting in 14.0.0, we have a situation where an element is failing a
.should('not.be.visible')check when the element is not physically visible.Desired behavior
This element should not be seen as visible.
Test code to reproduce
index.htmlspec.cy.js13.17.0
14.0.0
Cypress Version
14.0.0
Node version
Operating System
Debug Logs
Other
No response