Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<body> and <html> should always be considered visible #4475

jennifer-shehane opened this issue Jun 17, 2019 · 2 comments


1 participant
Copy link

commented Jun 17, 2019

Current behavior:

If you assert cy.get('body').should('be.hidden') this can pass. This is a bit misleading because the body can technically never be hidden. All of its contents inside can be hidden and it could have a property of display: none, which you can assert on separately,'s never really 'hidden'. Same for html

Desired behavior:

Asserting cy.get('body') visibility should always return is visible.

Steps to reproduce: (app code and test code)

<!DOCTYPE html>
<body style="display: none;">
    <h1>Hello, World</h1>



Cypress 3.3.1


This comment has been minimized.

Copy link

commented Jun 19, 2019

The code for this is done in cypress-io/cypress#4421, but has yet to be released.
We'll update this issue and reference the changelog when it's released.


This comment has been minimized.

Copy link

commented Jun 27, 2019

Released in 3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.