I\'m starting to learn Cypress. I have a 4 row table (with a class of datatable). I can verify the number of rows this way:
cy.get(\'.datatable\').find(\'tr\
From the cypress API docs .should() section, using an arrow function:
cy.get('.datatable').find('tr').should(($listOfElements) => {
expect($listOfElements).to.have.length(4)
// any other assertions, for example the below one
// expect($listOfElements).to.have.any.keys('key1', 'key2')
})
This approach will allow you to use Chai BDD notation and assert more than one thing on your list of elements.