Bring back data-test
attributes?
#1477
Replies: 4 comments
-
I'm totally ok with doing this. The attribute removal was only done as a nicety, and if there are additional benefits for Pendo by having them in the build that's a win. I'll approve a PR that reverts 2940458. |
Beta Was this translation helpful? Give feedback.
-
i'm on board with this, they'll help with Pendo and cypress tests |
Beta Was this translation helpful? Give feedback.
-
Alternatively, another solution would be to utilize the default webpack code splitting based off mode and add or remove props based off A simplified example: const props = { src: 'https://github.com'}
if (process.env.NODE_ENV !== 'production') {
Object.assign({}, props, { 'data-test': 'my-component' }
}
// ... The code block for the |
Beta Was this translation helpful? Give feedback.
-
For posterity, we brought back I'll go ahead and lock this conversation. |
Beta Was this translation helpful? Give feedback.
-
I think we should revert 2940458.
babel-plugin-react-remove-properties
and more logic toreact-app-rewired.config.js
.data-test
tags would be useful in alpha for attaching Pendo guides to UI elements, as well as increasing the utility of its auto-generated analytics events.@rbeer @0xApotheosis thoughts?
Beta Was this translation helpful? Give feedback.
All reactions