In a Cypress.io test, while checking for the 'data' displayed in a table after applying the filter, it throws "CypressError: Timed out retrying: Cannot read property 'eq' of undefined". Can someone please advise how to fix the problem in below test? Table HTML image added below.
describe('Filter Test', function() {
it.only('Check if the records are filtered successfully', function() {
cy.visit('http://www.seleniumeasy.com/test/table-search-filter-demo.html')
cy.get('button').contains('Filter').click()
cy.get('input[placeholder="Username"]').type('jacobs')
cy.get('table').should(($tr) => {
const $tds = $tr.find('td') // find all the tds
expect($tds.cells.eq(0)).to.contain('jacobs')
})
})
})
console.log($tds)
to see if it hascells
object inside ?