I am trying to check that a list contains 2 specific entries using Cypress.
I have tried:
cy.get('ul.messages_list')
.children()
.contains('text')
.and('contain', 'emailAddress)
.should('have.length', 2)
The problem is that once I use .contains() it is in a single element and I cannot check that there are multiple of them.