import '@testing-library/cypress/add-commands' ; declare global { namespace Cypress { interface Chainable { example dataCy ( value ) : Chainable < Element > ; } } } Cypress . Commands . add ( 'dataCy' , value => cy . get ( `[data-cy="${ value }"]` ) ) ;