ember-test-selectors: utils/bind-data-test-attributes: Handle failing `set()` with assert instead of warning
Reference Commit
After experiencing some issues after trying to add a data-test-selector to tagless components, I realized afterwards, by looking at the commit on master, that a warning was created to give some information. This is a great idea, but maybe not explicit enough (I didn’t see this warning, in the middle of other warnings).
If you agree, I can make a PR to make an assert instead of a warn, to be more explicit and to force the user to fix it as soon as this is done. What do you think?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (10 by maintainers)
We could add a
supportsDataTestPropertiesproperty that a) will disable thetagName == ''check and b) will be removed by an AST transform so that it doesn’t exist in prod builds. If we do that we wouldn’t even need to revert the current behavior and could keep using assertions, and we could adjust the assertion message to hint about this workaround. PRs welcome 😉