https://cypress.io logo
Hello I have a problem, I have my component which ...
# e2e-testing
l
Hello I have a problem, I have my component which looks like this:
Copy code
js
<Tooltip label={t('words.unlink')} hasArrow>
              <IconButton
                data-test-id={`unlink-token-${tokenId}`}
                icon={<BiTrash />}
                size="sm"
                colorScheme="red"
                variant="outline"
                onClick={openRemove}
              />
            </Tooltip>
And my test:
Copy code
js
it('Disassociate FT', () => {
    cy.contains(accountId).click({ force: true });
    cy.get('[placeholder="Escribe tu contraseƱa"]').type(defaultPass);
    cy.contains('Continuar', { timeout: 12000 }).click();
    cy.getBySel('unlink-token-0.0.2276691').click({force:true});
    cy.getBySel('button-portal-footer-right', { timeout: 4000 }).click();
  });
When I inspect the element has the correct property but Cypress is telling me:
Copy code
js
Syntax error, unrecognized expression: [data-test-id=unlink-token-0.0.2276691]