Skip to content

Visibility assertion passes in situation where element is NOT visible.  #410

@jennifer-shehane

Description

@jennifer-shehane

I've created a repo with the failing Cypress test that demonstrates the issue here: overflow-visibility-issue

To summarize, I wanted to write a test to ensure that an element was visible in my app. My element was currently hidden, yet the test kept passing saying it was visible. The element was position: absolute with top: -100px and left: -100px so that it sat outside of it's container, and the container was overflow: hidden to not allow it to be seen.

cy.get('.element').should('be.visible') // this incorrectly passes
cy.get('.element').click() //this correctly fails because the element is not visible.

Metadata

Metadata

Labels

pkg/driverThis is due to an issue in the packages/driver directory

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions