I have a list of items in the table, each item has an image , active (blue) and not active (black), how do I make this query for cypress.
This is the image of the table list :

Then this is the html code for the table :

When expanded the image is below, it has a src path of /static/images/icon_profile.png

My current test is like this :
it('Should create a legal form of a Customer profile', ()=>{
cy.get('th').eq(50).find('img').should('have.attr', 'src', '/static/images/icon_profile.png').first().click()
})
But when I ran it I get this error :
