Hi have this code and i want to assert the $element if visible or not visible. How can i do it? i tried should and expect but its failing
cy.get('.cloudfront_new_header').then(($element) => {
if ($element.style.visibility = "hidden"){
cy.log('Visible')
} else {
cy.log('NotVisible')
}
})