To see whether a DOM element is hidden, use Cypress.Dom.isHidden()
.
var hiddenP = Cypress.$('.dom-p p.hidden').get(0)
var visibleP = Cypress.$('.dom-p p.visible').get(0)
// our first paragraph has css class 'hidden'
expect(Cypress.Dom.isHidden(hiddenP)).to.be.true
expect(Cypress.Dom.isHidden(visibleP)).to.be.false
I'm hiding!
I'm visible!