quaint-butcher-3955
07/28/2022, 3:41 PMit('Should Click the edit button on the table', () => {
cy.url().should('contain', '/profile');
cy.get('[data-cy="profile-table"] > :nth-child(2) > :nth-child(8) > :nth-child(8)').invoke('text').as('data');
cy.get('@data').then((data) => {
cy.get(`[data-cy="edit_${data}"]`).click();
});
});
The cy on the button element
cy={`edit_${row.original.profileId}`}