thumbprint
thumbprint copied to clipboard
Change usage of `data-test` attribute to `data-testid`
We should also rename the prop dataTest
to dataTestId
in the process.
I propose that we do this in a few steps:
- Add temporary support for both props and attributes.
- Either find and replace to perform the migration or create a codemod: https://github.com/thumbtack/thumbprint/tree/master/packages/thumbprint-codemods (We can likely borrow a lot from the other codemods.)
- Once the migration in website is complete, remove the deprecated prop. Release as a breaking change.
We might not need to adjust the dataTest attribute https://testing-library.com/docs/dom-testing-library/api-helpers#custom-queries
For example, the code below shows a way to override the default testId queries to use a different data-attribute
https://testing-library.com/docs/react-testing-library/api#queries