should or should cypress code example
Example 1: cypress have attribute
cy.get('selector')
.should('have.attr', 'aria-checked', 'true')
Example 2: cypress element css
cy
.get('nav') // yields <nav>
.should('be.visible') // yields <nav>
.should('have.css', 'font-family') // yields 'sans-serif'
.and('match', /serif/) // yields 'sans-serif'