Cypress visible is deprecated try to use exist instead.
Both assertions still exist in Cypress's current version. You need to be specific about what you are asserting about an element.
- Use .should('not.be.visible') for elements that exist in the DOM but would not be visible to a fully sighted person.
- For Instance Toastmessages.
- Use .should('not.exist') for elements that do not exist in the DOM, regardless of their visibility.
https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-6-0